summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-15 16:49:34 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-30 21:37:09 +0200
commitc3f803982b23355765913a948ec2dcefa4d159a2 (patch)
treefc54be38907ea9df6f83e0f1c4d8f6ba49963837
parent2ccfad1a23172e3a29185973e9c6ce2f33d5f2d8 (diff)
Use viewdata scaling for vertical grid lines.
Horizontal lines / the rest of ScOutputData still need converting, but at least this shows we're on the right track. Change-Id: I4a7702d9983dd07674808319b3c613d4350ac25e
-rw-r--r--sc/source/ui/view/output.cxx29
1 files changed, 26 insertions, 3 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 97bb09cdf3dc..16c5a0bce8cd 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -444,14 +444,37 @@ void ScOutputData::DrawGrid( bool bGrid, bool bPage )
if (pThisRowInfo->bChanged && !bHOver)
{
- aGrid.AddVerLine( nPosX-nSignedOneX, nPosY, nNextY-nOneY );
- }
+ if ( mpViewData )
+ {
+ aGrid.AddVerLine( mpViewData->LogicToPixelHorizontal( nPosX - nSignedOneX ),
+ mpViewData->LogicToPixelVertical( nPosY ),
+ mpViewData->LogicToPixelVertical( nNextY - nOneY ) );
+ }
+ else
+ {
+ aGrid.AddVerLine( nPosX - nSignedOneX,
+ nPosY,
+ nNextY - nOneY );
+ }
+ }
nPosY = nNextY;
}
}
else
{
- aGrid.AddVerLine( nPosX-nSignedOneX, nScrY, nScrY+nScrH-nOneY );
+ if ( mpViewData )
+ {
+ aGrid.AddVerLine( mpViewData->LogicToPixelHorizontal( nPosX - nSignedOneX ),
+ mpViewData->LogicToPixelVertical( nScrY ),
+ mpViewData->LogicToPixelVertical( nScrY + nScrH - nOneY ) );
+ }
+ else
+ {
+ aGrid.AddVerLine( nPosX - nSignedOneX,
+ nScrY,
+ nScrY + nScrH - nOneY );
+
+ }
}
}
}