]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.cpp
Transfer current_font and real_current_font from Text to Cursor.
[lyx.git] / src / rowpainter.cpp
index cf0f98f9e14e5237064e779fd80d20fd890cf3d5..f85af08eef5f7d10b435bb0d001fcf03e67cfb71 100644 (file)
@@ -55,7 +55,7 @@ using frontend::FontMetrics;
 
 RowPainter::RowPainter(PainterInfo & pi,
        Text const & text, pit_type pit, Row const & row, Bidi & bidi, int x, int y)
-       : pi_(pi_), text_(text),
+       : pi_(pi), text_(text),
          text_metrics_(pi_.base.bv->textMetrics(&text)),
          pars_(text.paragraphs()),
          row_(row), pit_(pit), par_(text.paragraphs()[pit]),
@@ -82,7 +82,7 @@ Font const RowPainter::getLabelFont() const
 
 int RowPainter::leftMargin() const
 {
-       return text_.leftMargin(pi_.base.bv->buffer(), text_metrics_.width(), pit_,
+       return text_metrics_.leftMargin(text_metrics_.width(), pit_,
                row_.pos());
 }
 
@@ -96,7 +96,7 @@ void RowPainter::paintHfill(pos_type const pos, pos_type const body_pos)
 
        pi_.pain.line(int(x_), y1, int(x_), y0, Color::added_space);
 
-       if (par_.hfillExpansion(row_, pos)) {
+       if (pm_.hfillExpansion(row_, pos)) {
                int const y2 = (y0 + y1) / 2;
 
                if (pos >= body_pos) {
@@ -389,7 +389,7 @@ void RowPainter::paintChangeBar()
        if (start == end || !par_.isChanged(start, end))
                return;
 
-       int const height = text_.isLastRow(pit_, row_)
+       int const height = text_metrics_.isLastRow(pit_, row_)
                ? row_.ascent()
                : row_.height();
 
@@ -421,7 +421,7 @@ void RowPainter::paintDepthBar()
                return;
 
        depth_type prev_depth = 0;
-       if (!text_.isFirstRow(pit_, row_)) {
+       if (!text_metrics_.isFirstRow(pit_, row_)) {
                pit_type pit2 = pit_;
                if (row_.pos() == 0)
                        --pit2;
@@ -429,7 +429,7 @@ void RowPainter::paintDepthBar()
        }
 
        depth_type next_depth = 0;
-       if (!text_.isLastRow(pit_, row_)) {
+       if (!text_metrics_.isLastRow(pit_, row_)) {
                pit_type pit2 = pit_;
                if (row_.endpos() >= pars_[pit2].size())
                        ++pit2;