summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-06-26 16:19:46 +0100
committerNoel Power <noel.power@novell.com>2012-06-26 16:19:46 +0100
commitbe92126c633f13589628068d523939c60f905894 (patch)
tree5d2e5b14fbc380ca70285dc957d47b7e382256bc
parentb02c285edf34e25e0f164d9fb65e3504ef043c39 (diff)
Revert "set the zoom only once, prevents infinite loop, fdo#51040"
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index c4816bbf560f..a69cb795e2ef 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -359,6 +359,10 @@ void ScPreviewShell::UpdateNeededScrollBars()
pCorner->SetPosSizePixel( Point( aPos.X() + aNewSize.Width(), aPos.Y() + aNewSize.Height() ),
Size( nBarW, nBarH ) );
+ if ( SVX_ZOOM_WHOLEPAGE == eZoom )
+ pPreview->SetZoom( pPreview->GetOptimalZoom( sal_False ) );
+ else if ( SVX_ZOOM_PAGEWIDTH == eZoom )
+ pPreview->SetZoom( pPreview->GetOptimalZoom( sal_True ) );
UpdateScrollBars();
}