]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.C
fix reading the author field.
[lyx.git] / src / rowpainter.C
index 7f2694101bb74fb9d85b8e213f548fd448b223f0..378ffece6734424b3bd8d5d35933f64bf3cb9c1e 100644 (file)
@@ -767,15 +767,16 @@ void RowPainter::paintText()
                if (x_ > bv_.workWidth())
                        break;
 
-               pos_type pos = text_.bidi.vis2log(vpos);
+               pos_type const pos = text_.bidi.vis2log(vpos);
 
                if (pos >= par_.size()) {
                        ++vpos;
                        continue;
                }
 
-               if (x_ + singleWidth(pos) < 0) {
-                       x_ += singleWidth(pos);
+               const int width_pos = singleWidth(pos);
+               if (x_ + width_pos < 0) {
+                       x_ += width_pos;
                        ++vpos;
                        continue;
                }
@@ -803,7 +804,7 @@ void RowPainter::paintText()
                        int const lwidth = font_metrics::width(layout->labelsep,
                                getLabelFont());
 
-                       x_ += label_hfill_ + lwidth - singleWidth(body_pos - 1);
+                       x_ += label_hfill_ + lwidth - width_pos;
                }
 
                if (par_.isHfill(pos)) {
@@ -833,7 +834,7 @@ void RowPainter::paintText()
                        x_ += 2;
                        ++vpos;
                } else if (par_.isSeparator(pos)) {
-                       x_ += singleWidth(pos);
+                       x_ += width_pos;
                        if (pos >= body_pos)
                                x_ += separator_;
                        ++vpos;