summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-06-05 13:04:56 +0100
committerNoel Power <noel.power@novell.com>2012-06-05 13:22:53 +0100
commitdaf35c9aa78aad9638e49d81af020677273250d4 (patch)
tree6e6a84d9f3d71b8b563129546e6fec989fa88605
parent01ef7d0c5c6e3ea746a3661c7e3498027ca62291 (diff)
fix incredible shrinking scrollbars when zooming in calc preview fdo#50722
Change-Id: If6fe9ccb1aa3320d96921f76a86def7d588f5f4e
-rw-r--r--sc/source/ui/view/preview.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index bc2d355f3daa..da05322957b5 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -705,7 +705,7 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom)
SetMapMode( aMMMode );
bInSetZoom = true; // don't scroll during SetYOffset in UpdateScrollBars
- if ( Window* pWin = pViewShell->GetWindow() )
+ if ( Window* pWin = ( pViewShell->GetViewFrame() ? &pViewShell->GetViewFrame()->GetWindow() : NULL ) )
pViewShell->AdjustPosSizePixel( pWin->GetPosPixel(), pWin->GetSizePixel() );
else
pViewShell->UpdateScrollBars();