summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-05-16 17:22:43 +0200
committerJan Holesovsky <kendy@suse.cz>2012-05-16 17:23:18 +0200
commitcd28abc0496b72828c48815b4336a6b1321cb817 (patch)
tree6a16b905038d4b5bf8f5559accf4dd39a829a2c3 /svtools
parent46083c95c9f4058cc7e9aad3c316de78446897b3 (diff)
ruler: More off-by-one drawing problems fixed (hopefully all of them now).
Change-Id: Icd566610229fe080bb45b746459abed15112c225
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ruler.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 98774076233a..31cd5ce4d218 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
}