]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.C
fix some C++ parsing bugs
[lyx.git] / src / rowpainter.C
index f283598386a44a776a346316ef3c6ffe620d2645..faf9eb1d1657879f1da35bac4b7b21dea91b9d09 100644 (file)
@@ -102,7 +102,7 @@ int RowPainter::leftMargin() const
 }
 
 
-bool RowPainter::paintInset(pos_type const pos)
+void RowPainter::paintInset(pos_type const pos)
 {
        Inset * inset = const_cast<Inset*>(par_.getInset(pos));
 
@@ -110,13 +110,10 @@ bool RowPainter::paintInset(pos_type const pos)
 
        LyXFont const & font = getFont(pos);
 
-       inset->update(perv(bv_), font, false);
-       inset->draw(perv(bv_), font, yo_ + row_.baseline(), x_);
-
-       // return true if something changed when we drew an inset
+#warning inset->update FIXME
+       inset->update(perv(bv_), false);
 
-       return (!text_.need_break_row && !text_.isInInset()
-           && bv_.text->status() == LyXText::CHANGED_IN_DRAW);
+       inset->draw(perv(bv_), font, yo_ + row_.baseline(), x_);
 }
 
 
@@ -258,7 +255,7 @@ void RowPainter::paintForeignMark(float const orig_x, LyXFont const & orig_font)
 }
 
 
-bool RowPainter::paintFromPos(pos_type & vpos)
+void RowPainter::paintFromPos(pos_type & vpos)
 {
        pos_type const pos = text_.vis2log(vpos);
 
@@ -269,11 +266,10 @@ bool RowPainter::paintFromPos(pos_type & vpos)
        char const c = par_.getChar(pos);
 
        if (IsInsetChar(c)) {
-               if (paintInset(pos))
-                       return true;
+               paintInset(pos);
                ++vpos;
                paintForeignMark(orig_x, orig_font);
-               return false;
+               return;
        }
 
        // usual characters, no insets
@@ -298,7 +294,7 @@ bool RowPainter::paintFromPos(pos_type & vpos)
 
        paintForeignMark(orig_x, orig_font);
 
-       return false;
+       return;
 }
 
 
@@ -852,7 +848,7 @@ void RowPainter::paintLast()
 }
 
 
-bool RowPainter::paintText()
+void RowPainter::paintText()
 {
        pos_type const last = row_.lastPrintablePos();
        pos_type body_pos = par_.beginningOfBody();
@@ -950,8 +946,7 @@ bool RowPainter::paintText()
                                x_ += separator_;
                        ++vpos;
                } else {
-                       if (paintFromPos(vpos))
-                               return true;
+                       paintFromPos(vpos);
                }
        }
 
@@ -963,11 +958,11 @@ bool RowPainter::paintText()
                        LColor::strikeout, Painter::line_solid, Painter::line_thin);
                running_strikeout = false;
        }
-       return false;
+       return;
 }
 
 
-bool RowPainter::paint(int y_offset, int x_offset, int y)
+void RowPainter::paint(int y_offset, int x_offset, int y)
 {
        xo_ = x_offset;
        yo_ = y_offset;
@@ -1013,5 +1008,5 @@ bool RowPainter::paint(int y_offset, int x_offset, int y)
        }
 
        // paint text
-       return paintText();
+       paintText();
 }