]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathGrid.cpp
Display the correct horizontal alignment in AMS environments
[features.git] / src / mathed / InsetMathGrid.cpp
index 12e871aa5c1256eb308afd99420ccd65d073b415..2ee5ece9f44fd9b00049d4d921210b4b9fe5e7f6 100644 (file)
@@ -1827,4 +1827,29 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
+// static
+char InsetMathGrid::colAlign(HullType type, col_type col)
+{
+       switch (type) {
+       case hullEqnArray:
+               return "rcl"[col % 3];
+
+       case hullMultline:
+       case hullGather:
+               return 'c';
+
+       case hullAlign:
+       case hullAlignAt:
+       case hullXAlignAt:
+       case hullXXAlignAt:
+       case hullFlAlign:
+               return "rl"[col & 1];
+
+       default:
+               return 'c';
+       }
+}
+
+
+
 } // namespace lyx