]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.cpp
Update tex2lyx test files
[lyx.git] / src / rowpainter.cpp
index c5cc772fe8ecbdf5a4ef29a7298ce3b12844b34c..7c7fd3ef416328d25ebb9dbedaada3b01075b2e2 100644 (file)
@@ -128,6 +128,7 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
        pi_.base.font = inset->inheritFont() ? font.fontInfo() :
                pi_.base.bv->buffer().params().getFont().fontInfo();
        pi_.ltr_pos = (bidi_.level(pos) % 2 == 0);
+       Change prev_change = change_;
        pi_.change_ = change_.changed() ? change_ : par_.lookupChange(pos);
 
        int const x1 = int(x_);
@@ -147,6 +148,7 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
 
        // Restore full_repaint status.
        pi_.full_repaint = pi_full_repaint;
+       pi_.change_ = prev_change;
 
 #ifdef DEBUG_METRICS
        int const x2 = x1 + dim.wid;
@@ -235,6 +237,8 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
        str.reserve(100);
        str.push_back(prev_char);
 
+       // FIXME: Why only round brackets and why the difference to
+       // Hebrew? See also Paragraph::getUChar
        if (arabic) {
                char_type c = str[0];
                if (c == '(')
@@ -324,6 +328,8 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
                        break;
                */
 
+               // FIXME: Why only round brackets and why the difference to
+               // Hebrew? See also Paragraph::getUChar
                if (arabic) {
                        if (c == '(')
                                c = ')';
@@ -358,6 +364,14 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
 }
 
 
+void RowPainter::paintSeparator(double orig_x, double width,
+       FontInfo const & font)
+{
+       pi_.pain.textDecoration(font, int(orig_x), yo_, int(width));
+       x_ += width;
+}
+
+
 void RowPainter::paintForeignMark(double orig_x, Language const * lang,
                int desc)
 {
@@ -935,9 +949,10 @@ void RowPainter::paintText()
                if (par_.isSeparator(pos)) {
                        Font const orig_font = text_metrics_.displayFont(pit_, pos);
                        double const orig_x = x_;
-                       x_ += width_pos;
+                       double separator_width = width_pos;
                        if (pos >= body_pos)
-                               x_ += row_.separator;
+                               separator_width += row_.separator;
+                       paintSeparator(orig_x, separator_width, orig_font.fontInfo());
                        paintForeignMark(orig_x, orig_font.language());
                        ++vpos;