From: Vincent van Ravesteijn Date: Fri, 3 Dec 2010 15:40:23 +0000 (+0000) Subject: *rowpainter.cpp: Squeeze some warnings and reduce linelength. X-Git-Tag: 2.0.0~1543 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bbbd0d6597bffcb96bcee48b744aeb7d57890620;p=features.git *rowpainter.cpp: Squeeze some warnings and reduce linelength. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36683 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index 6126f36025..2d512ce48f 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -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)