summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-29 10:23:40 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-30 21:37:21 +0200
commit8f4c131c215da020591f5ed2d083dcd8e0932cb3 (patch)
tree51026269278fdc1854694b0f86914cf1121f540e
parente29f354a89f78b3ee9c997136276beafeb500d63 (diff)
TEMPORARY: Use PaintMapMode scaling for DrawMapMode too.
Otherwise we end up with invalid scalings once PPTX/Y doesn't exist. We can't use the DrawView yet as that gives us invalid scales for now (due to the PPTX/Y removal/disablement). Change-Id: I59279cb007bace1237384f58b345079d23aee92e
-rw-r--r--sc/source/ui/view/gridwin3.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index e9ac6ca2054a..568ed9639a63 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -249,20 +249,16 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
{
Fraction aScaleX;
Fraction aScaleY;
- if (pDrView)
- pDrView->GetScale( aScaleX, aScaleY );
- else
- {
- SCCOL nEndCol = 0;
- SCROW nEndRow = 0;
- pDoc->GetTableArea( nTab, nEndCol, nEndRow );
- if (nEndCol<20) nEndCol = 20;
- if (nEndRow<20) nEndRow = 1000;
- ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, this,
- pViewData->GetZoomX(),pViewData->GetZoomY(),
- pViewData->GetPPTX(),pViewData->GetPPTY(),
- aScaleX,aScaleY );
- }
+ // if (pDrView)
+ // {
+ // pDrView->GetScale( aScaleX, aScaleY );
+ // }
+ // else
+ // {
+ const MapMode& aPaintMapMode = pViewData->GetPaintMapMode();
+ aScaleX = aPaintMapMode.GetScaleX();
+ aScaleY = aPaintMapMode.GetScaleY();
+ // }
aDrawMode.SetScaleX(aScaleX);
aDrawMode.SetScaleY(aScaleY);
}