]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetTabular.cpp
Use new display() values to remove some inset hardcoding.
[features.git] / src / insets / InsetTabular.cpp
index f1cf912de53537894b3ac55e8baea48079f66dc8..0680d93be8a7e60702400c2ee8030d602b82a926 100644 (file)
@@ -5396,13 +5396,13 @@ Inset::DisplayType InsetTabular::display() const
                if (tabular.is_long_tabular) {
                        switch (tabular.longtabular_alignment) {
                        case Tabular::LYX_LONGTABULAR_ALIGN_LEFT:
-                               return AlignLeft;
+                               return Display | AlignLeft;
                        case Tabular::LYX_LONGTABULAR_ALIGN_CENTER:
-                               return AlignCenter;
+                               return Display;
                        case Tabular::LYX_LONGTABULAR_ALIGN_RIGHT:
-                               return AlignRight;
+                               return Display | AlignRight;
                        default:
-                               return AlignCenter;
+                               return Display;
                        }
                } else
                        return Inline;
@@ -6572,12 +6572,12 @@ void InsetTabular::getSelection(Cursor & cur,
        cs = tabular.cellColumn(beg.idx());
        ce = tabular.cellColumn(end.idx());
        if (cs > ce)
-               swap(cs, ce);
+               std::swap(cs, ce);
 
        rs = tabular.cellRow(beg.idx());
        re = tabular.cellRow(end.idx());
        if (rs > re)
-               swap(rs, re);
+               std::swap(rs, re);
 }