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-15 16:49:34 +0200
commitedc452ba61cd1716ff8898247853f1e0f2fd753d (patch)
tree7f9412079ed5a27b5da49f4e96e9a1450d543655
parent89317f9eb66304ab092b718ad687a34c4d0acb47 (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 );
+
+ }
}
}
}