From 05409d2f950cb8c747afa621c0f43e3bafbc56b7 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Tue, 5 Jun 2012 13:04:56 +0100 Subject: [PATCH] fix incredible shrinking scrollbars when zooming in calc preview fdo#50722 Change-Id: If6fe9ccb1aa3320d96921f76a86def7d588f5f4e --- sc/source/ui/view/preview.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();