From 8f4c131c215da020591f5ed2d083dcd8e0932cb3 Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Fri, 29 Aug 2014 10:23:40 +0200 Subject: 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 --- sc/source/ui/view/gridwin3.cxx | 24 ++++++++++-------------- 1 file 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); } -- cgit v1.2.3