]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathGrid.cpp
reduce line noise
[features.git] / src / mathed / InsetMathGrid.cpp
index da27366a7c3a74d99336b72bb38f37d1a58f3c82..f357c2e43cad36568ab6335c2f5497e5679383e7 100644 (file)
 #include <config.h>
 
 #include "InsetMathGrid.h"
+
 #include "MathData.h"
 #include "MathParser.h"
 #include "MathStream.h"
+#include "MetricsInfo.h"
 
 #include "BufferView.h"
 #include "CutAndPaste.h"
@@ -27,6 +29,7 @@
 #include "frontends/Painter.h"
 
 #include "support/lstrings.h"
+#include "support/docstream.h"
 
 #include <sstream>
 
@@ -224,10 +227,8 @@ void InsetMathGrid::halign(docstring const & hh)
                                colinfo_[col].lines_ = std::count(
                                        colinfo_[col].special_.begin(),
                                        colinfo_[col].special_.end(), '|');
-                               LYXERR(Debug::MATHED)
-                                       << "special column separator: `"
-                                       << to_utf8(colinfo_[col].special_)
-                                       << '\'' << endl;
+                               LYXERR(Debug::MATHED, "special column separator: `"
+                                       << to_utf8(colinfo_[col].special_) << '\'');
                                ++col;
                                colinfo_[col].lines_ = 0;
                                colinfo_[col].special_.clear();
@@ -243,10 +244,8 @@ void InsetMathGrid::halign(docstring const & hh)
                                colinfo_[col].lines_ = std::count(
                                                colinfo_[col].special_.begin(),
                                                colinfo_[col].special_.end(), '|');
-                               LYXERR(Debug::MATHED)
-                                       << "special column separator: `"
-                                       << to_utf8(colinfo_[col].special_)
-                                       << '\'' << endl;
+                               LYXERR(Debug::MATHED, "special column separator: `"
+                                       << to_utf8(colinfo_[col].special_) << '\'');
                        }
                        ++col;
                        colinfo_[col].lines_ = 0;
@@ -677,7 +676,7 @@ docstring InsetMathGrid::eocString(col_type col, col_type lastcol) const
 }
 
 
-void InsetMathGrid::appendRow(row_type row)
+void InsetMathGrid::addRow(row_type row)
 {
        rowinfo_.insert(rowinfo_.begin() + row + 1, RowInfo());
        cells_.insert
@@ -715,7 +714,7 @@ void InsetMathGrid::delRow(row_type row)
 
 void InsetMathGrid::copyRow(row_type row)
 {
-       appendRow(row);
+       addRow(row);
        for (col_type col = 0; col < ncols(); ++col)
                cells_[(row + 1) * ncols() + col] = cells_[row * ncols() + col];
 }
@@ -830,9 +829,9 @@ bool InsetMathGrid::idxUpDown(Cursor & cur, bool up) const
 }
 
 
-bool InsetMathGrid::idxLeft(Cursor & cur) const
+bool InsetMathGrid::idxBackward(Cursor & cur) const
 {
-       // leave matrix if on the left hand edge
+       // leave matrix if at the front edge
        if (cur.col() == 0)
                return false;
        --cur.idx();
@@ -841,9 +840,9 @@ bool InsetMathGrid::idxLeft(Cursor & cur) const
 }
 
 
-bool InsetMathGrid::idxRight(Cursor & cur) const
+bool InsetMathGrid::idxForward(Cursor & cur) const
 {
-       // leave matrix if on the right hand edge
+       // leave matrix if at the back edge
        if (cur.col() + 1 == ncols())
                return false;
        ++cur.idx();
@@ -1121,7 +1120,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_BREAK_LINE: {
                cur.recordUndoInset();
                row_type const r = cur.row();
-               appendRow(r);
+               addRow(r);
 
                // split line
                for (col_type c = col(cur.idx()) + 1; c < ncols(); ++c)
@@ -1159,7 +1158,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                        halign('c', cur.col());
                else if (s == "append-row")
                        for (int i = 0, n = extractInt(is); i < n; ++i)
-                               appendRow(cur.row());
+                               addRow(cur.row());
                else if (s == "delete-row") {
                        cur.clearSelection(); // bug 4323
                        for (int i = 0, n = extractInt(is); i < n; ++i) {