]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.cpp
Fix assertion when checking if change in selection
[lyx.git] / src / mathed / InsetMathHull.cpp
index dffef8473132b179c5c369f246800d78a1a6ea6b..582685e4f968a512b383a13958194b16811e05c8 100644 (file)
@@ -430,7 +430,7 @@ InsetMath::mode_type InsetMathHull::currentMode() const
 // alignment is not implemented in the LyXHTML output.
 char InsetMathHull::defaultColAlign(col_type col)
 {
-       return colAlign(type_, col);
+       return colAlign(type_, col, buffer().params());
 }
 
 
@@ -452,7 +452,7 @@ char InsetMathHull::displayColAlign(idx_type idx) const
        case hullXAlignAt:
        case hullXXAlignAt:
        case hullFlAlign:
-               return colAlign(type_, col(idx));
+               return colAlign(type_, col(idx), buffer().params());
        default:
                break;
        }
@@ -1295,8 +1295,8 @@ void InsetMathHull::addRow(row_type row)
        if (type_ == hullMultline) {
                if (row + 1 == nrows())  {
                        numbered_[row] = NONUMBER;
-                       std::swap(label, label_[row]);
-                       std::swap(number, numbers_[row]);
+                       swap(label, label_[row]);
+                       swap(number, numbers_[row]);
                } else
                        numbered = false;
        }
@@ -1314,9 +1314,9 @@ void InsetMathHull::swapRow(row_type row)
                return;
        if (row + 1 == nrows())
                --row;
-       std::swap(numbered_[row], numbered_[row + 1]);
-       std::swap(numbers_[row], numbers_[row + 1]);
-       std::swap(label_[row], label_[row + 1]);
+       swap(numbered_[row], numbered_[row + 1]);
+       swap(numbers_[row], numbers_[row + 1]);
+       swap(label_[row], label_[row + 1]);
        InsetMathGrid::swapRow(row);
 }
 
@@ -1326,9 +1326,9 @@ void InsetMathHull::delRow(row_type row)
        if (nrows() <= 1 || !rowChangeOK())
                return;
        if (row + 1 == nrows() && type_ == hullMultline) {
-               std::swap(numbered_[row - 1], numbered_[row]);
-               std::swap(numbers_[row - 1], numbers_[row]);
-               std::swap(label_[row - 1], label_[row]);
+               swap(numbered_[row - 1], numbered_[row]);
+               swap(numbers_[row - 1], numbers_[row]);
+               swap(label_[row - 1], label_[row]);
                InsetMathGrid::delRow(row);
                return;
        }