diff options
Diffstat (limited to 'sd/source/ui/view/drviews9.cxx')
-rw-r--r-- | sd/source/ui/view/drviews9.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index d224c328122f..7b2137113e9c 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -87,11 +87,11 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) Graphic aGraphic( pGalleryItem->GetGraphic() ); // reduce size if necessary - Window aWindow (GetActiveWindow()); - aWindow.SetMapMode(aGraphic.GetPrefMapMode()); - Size aSizePix = aWindow.LogicToPixel(aGraphic.GetPrefSize()); - aWindow.SetMapMode( MapMode(MAP_100TH_MM) ); - Size aSize = aWindow.PixelToLogic(aSizePix); + ScopedVclPtrInstance< Window > aWindow(GetActiveWindow()); + aWindow->SetMapMode(aGraphic.GetPrefMapMode()); + Size aSizePix = aWindow->LogicToPixel(aGraphic.GetPrefSize()); + aWindow->SetMapMode( MapMode(MAP_100TH_MM) ); + Size aSize = aWindow->PixelToLogic(aSizePix); // constrain size to page size if necessary SdrPage* pPage = mpDrawView->GetSdrPageView()->GetPage(); |