]> git.lyx.org Git - features.git/commitdiff
*rowpainter.cpp: Squeeze some warnings and reduce linelength.
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 3 Dec 2010 15:40:23 +0000 (15:40 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 3 Dec 2010 15:40:23 +0000 (15:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36683 a592a061-630c-0410-9148-cb99ea01b6c8

src/rowpainter.cpp

index 6126f36025e482e50f0e7758c188ae9092e1f272..2d512ce48f46a4c6c7c743ea059bb2f107082e77 100644 (file)
@@ -951,21 +951,21 @@ void RowPainter::paintSelection()
        // draw the margins
        if (row_.begin_margin_sel) {
                if (text_.isRTL(beg.paragraph())) {
-                       pi_.pain.fillRectangle(xo_ + x1, y1, text_metrics_.width() - rm - x1, y2 - y1,
-                               Color_selection);
+                       pi_.pain.fillRectangle(int(xo_ + x1), y1,
+                               text_metrics_.width() - rm - x1, y2 - y1, Color_selection);
                } else {
-                       pi_.pain.fillRectangle(xo_ + lm, y1, x1 - lm, y2 - y1,
+                       pi_.pain.fillRectangle(int(xo_ + lm), y1, x1 - lm, y2 - y1,
                                Color_selection);
                }
        }
 
        if (row_.end_margin_sel) {
                if (text_.isRTL(beg.paragraph())) {
-                       pi_.pain.fillRectangle(xo_ + lm, y1, x2 - lm, y2 - y1,
+                       pi_.pain.fillRectangle(int(xo_ + lm), y1, x2 - lm, y2 - y1,
                                Color_selection);
                } else {
-                       pi_.pain.fillRectangle(xo_ + x2, y1, text_metrics_.width() - rm - x2, y2 - y1,
-                               Color_selection);
+                       pi_.pain.fillRectangle(int(xo_ + x2), y1, text_metrics_.width() - rm - x2,
+                               y2 - y1, Color_selection);
                }
        }
 
@@ -1009,8 +1009,8 @@ void RowPainter::paintSelection()
 
                if (!(cur < end) || draw_now) {
                        x2 = text_metrics_.cursorX(cur.top(), cur.boundary());
-                       pi_.pain.fillRectangle(xo_ + min(x1,x2), y1, abs(x2 - x1), y2 - y1,
-                               Color_selection);
+                       pi_.pain.fillRectangle(int(xo_ + min(x1, x2)), y1, abs(x2 - x1),
+                               y2 - y1, Color_selection);
 
                        // reset x1, so it is set again next round (which will be on the
                        // right side of a boundary or at the selection end)