fix incredible shrinking scrollbars when zooming in calc preview fdo#50722

Change-Id: If6fe9ccb1aa3320d96921f76a86def7d588f5f4e
This commit is contained in:
Noel Power
2012-06-05 13:04:56 +01:00
parent 1dfb956306
commit 05409d2f95

View File

@@ -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();