[Libreoffice-commits] .: svtools/source

Jan Holesovsky kendy at kemper.freedesktop.org
Wed May 16 08:24:10 PDT 2012


 svtools/source/control/ruler.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit cd28abc0496b72828c48815b4336a6b1321cb817
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed May 16 17:22:43 2012 +0200

    ruler: More off-by-one drawing problems fixed (hopefully all of them now).
    
    Change-Id: Icd566610229fe080bb45b746459abed15112c225

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 9877407..31cd5ce 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1166,8 +1166,8 @@ void Ruler::ImplFormat()
 
     // Obere/untere Kante ausgeben
     maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
-    ImplVDrawLine( nVirLeft, nVirTop+1, nM1 - 1, nVirTop+1 ); //top left line
-    ImplVDrawLine( nM2 +1, nVirTop+1, nP2 -1, nVirTop+1 );      //top right line
+    ImplVDrawLine( nVirLeft, nVirTop+1, nM1, nVirTop+1 ); //top left line
+    ImplVDrawLine( nM2, nVirTop+1, nP2 -1, nVirTop+1 );      //top right line
 
     // Jetzt wird zwischen dem Schatten ausgegeben
     nVirTop++;
@@ -1177,19 +1177,19 @@ void Ruler::ImplFormat()
     maVirDev.SetLineColor();
     maVirDev.SetFillColor( rStyleSettings.GetWorkspaceColor() );
     if ( nM1 > nVirLeft )
-        ImplVDrawRect( nP1, nVirTop+1, nM1-1, nVirBottom ); //left gray rectangle
+        ImplVDrawRect( nP1, nVirTop+1, nM1, nVirBottom ); //left gray rectangle
     if ( nM2 < nP2 )
-        ImplVDrawRect( nM2+1, nVirTop+1, nP2, nVirBottom ); //right gray rectangle
+        ImplVDrawRect( nM2, nVirTop+1, nP2, nVirBottom ); //right gray rectangle
     if ( nM2-nM1 > 0 )
     {
         maVirDev.SetFillColor( rStyleSettings.GetWindowColor() );
-        ImplVDrawRect( nM1, nVirTop, nM2-1, nVirBottom ); //center rectangle
+        ImplVDrawRect( nM1+1, nVirTop, nM2-1, nVirBottom ); //center rectangle
     }
     maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
     if ( nM1 > nVirLeft )
     {
-        ImplVDrawLine( nM1-1, nVirTop+1, nM1-1, nVirBottom );//right line of the left rectangle
-        ImplVDrawLine( nP1, nVirBottom, nM1-1, nVirBottom );//bottom line of the left rectangle
+        ImplVDrawLine( nM1, nVirTop+1, nM1, nVirBottom );//right line of the left rectangle
+        ImplVDrawLine( nP1, nVirBottom, nM1, nVirBottom );//bottom line of the left rectangle
         if ( nP1 >= nVirLeft )
         {
             ImplVDrawLine( nP1, nVirTop+1, nP1, nVirBottom );//left line of the left rectangle
@@ -1198,8 +1198,8 @@ void Ruler::ImplFormat()
     }
     if ( nM2 < nP2 )
     {
-        ImplVDrawLine( nM2+1, nVirBottom, nP2-1, nVirBottom );//bottom line of the right rectangle
-        ImplVDrawLine( nM2+1, nVirTop+1, nM2+1, nVirBottom );//left line of the right rectangle
+        ImplVDrawLine( nM2, nVirBottom, nP2-1, nVirBottom );//bottom line of the right rectangle
+        ImplVDrawLine( nM2, nVirTop+1, nM2, nVirBottom );//left line of the right rectangle
         if ( nP2 <= nVirRight+1 )
             ImplVDrawLine( nP2-1, nVirTop+1, nP2-1, nVirBottom );//right line of the right rectangle
     }


More information about the Libreoffice-commits mailing list