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:03 +0100
commit05409d2f950cb8c747afa621c0f43e3bafbc56b7 (patch)
tree9f6518495abdf8035f2099ce5825c53d00838b0a
parent1dfb956306a1ec63e1d2f683c3414fffeb07b2e8 (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();