X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathGrid.cpp;h=0d6918d1bbdd99b8645a25be07f449fad005ff98;hb=fc6ce7cd08562fd7bab4427880b46390bb7d2f07;hp=85068dea758ced6ca42ab86dcac807b476d62def;hpb=42123ab8a71080b6d15fca4e0c43ae76abf00a1e;p=lyx.git diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 85068dea75..0d6918d1bb 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -11,14 +11,14 @@ #include #include "InsetMathGrid.h" -#include "MathArray.h" +#include "MathData.h" #include "MathParser.h" #include "MathStream.h" #include "BufferView.h" #include "CutAndPaste.h" #include "FuncStatus.h" -#include "LColor.h" +#include "Color.h" #include "Cursor.h" #include "debug.h" #include "FuncRequest.h" @@ -71,7 +71,7 @@ public: } protected: - InsetBase & inset() const { return inset_; } + Inset & inset() const { return inset_; } InsetMathGrid & inset_; }; @@ -184,9 +184,9 @@ InsetMathGrid::InsetMathGrid(col_type m, row_type n, char v, docstring const & h } -auto_ptr InsetMathGrid::doClone() const +auto_ptr InsetMathGrid::doClone() const { - return auto_ptr(new InsetMathGrid(*this)); + return auto_ptr(new InsetMathGrid(*this)); } @@ -311,13 +311,13 @@ InsetMathGrid::row_type InsetMathGrid::row(idx_type idx) const } -void InsetMathGrid::vcrskip(LyXLength const & crskip, row_type row) +void InsetMathGrid::vcrskip(Length const & crskip, row_type row) { rowinfo_[row].crskip_ = crskip; } -LyXLength InsetMathGrid::vcrskip(row_type row) const +Length InsetMathGrid::vcrskip(row_type row) const { return rowinfo_[row].crskip_; } @@ -333,7 +333,7 @@ void InsetMathGrid::metrics(MetricsInfo & mi) const int asc = 0; int desc = 0; for (col_type col = 0; col < ncols(); ++col) { - MathArray const & c = cell(index(row, col)); + MathData const & c = cell(index(row, col)); asc = max(asc, c.ascent()); desc = max(desc, c.descent()); } @@ -492,7 +492,7 @@ void InsetMathGrid::drawWithMargin(PainterInfo & pi, int x, int y, - i * hlinesep() - hlinesep()/2 - rowsep()/2; pi.pain.line(x + lmargin + 1, yy, x + dim_.width() - rmargin - 1, yy, - LColor::foreground); + Color::foreground); } for (col_type col = 0; col <= ncols(); ++col) @@ -501,7 +501,7 @@ void InsetMathGrid::drawWithMargin(PainterInfo & pi, int x, int y, - i * vlinesep() - vlinesep()/2 - colsep()/2; pi.pain.line(xx, y - dim_.ascent() + 1, xx, y + dim_.descent() - 1, - LColor::foreground); + Color::foreground); } drawMarkers2(pi, x, y); } @@ -519,7 +519,7 @@ void InsetMathGrid::metricsT(TextMetricsInfo const & mi, Dimension & dim) const int asc = 0; int desc = 0; for (col_type col = 0; col < ncols(); ++col) { - MathArray const & c = cell(index(row, col)); + MathData const & c = cell(index(row, col)); asc = max(asc, c.ascent()); desc = max(desc, c.descent()); } @@ -614,7 +614,7 @@ docstring InsetMathGrid::eolString(row_type row, bool emptyline, bool fragile) c // make sure an upcoming '[' does not break anything if (row + 1 < nrows()) { - MathArray const & c = cell(index(row + 1, 0)); + MathData const & c = cell(index(row + 1, 0)); if (c.size() && c.front()->getChar() == '[') //eol += "[0pt]"; eol += "{}"; @@ -640,7 +640,7 @@ void InsetMathGrid::addRow(row_type row) { rowinfo_.insert(rowinfo_.begin() + row + 1, RowInfo()); cells_.insert - (cells_.begin() + (row + 1) * ncols(), ncols(), MathArray()); + (cells_.begin() + (row + 1) * ncols(), ncols(), MathData()); cellinfo_.insert (cellinfo_.begin() + (row + 1) * ncols(), ncols(), CellInfo()); } @@ -649,7 +649,7 @@ void InsetMathGrid::addRow(row_type row) void InsetMathGrid::appendRow() { rowinfo_.push_back(RowInfo()); - //cells_.insert(cells_.end(), ncols(), MathArray()); + //cells_.insert(cells_.end(), ncols(), MathData()); for (col_type col = 0; col < ncols(); ++col) { cells_.push_back(cells_type::value_type()); cellinfo_.push_back(CellInfo()); @@ -1016,7 +1016,7 @@ void InsetMathGrid::splitCell(Cursor & cur) { if (cur.idx() == cur.lastidx()) return; - MathArray ar = cur.cell(); + MathData ar = cur.cell(); ar.erase(0, cur.pos()); cur.cell().erase(cur.pos(), cur.lastpos()); ++cur.idx();