diff options
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index cfe41f9d940c..d2b9693deeec 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -87,6 +87,8 @@ #include <SdUnoDrawView.hxx> +#include <sfx2/zoomitem.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using ::sd::framework::FrameworkHelper; @@ -858,11 +860,14 @@ void DrawDocShell::GotoBookmark(const OUString& rBookmark) pDrawViewShell->SwitchPage(nSdPgNum); } + // show page + SvxZoomItem aZoom; + aZoom.SetType( SvxZoomType::WHOLEPAGE ); + pDrawViewShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, { &aZoom }); + if (pObj != nullptr) { - // show and select object - pDrawViewShell->MakeVisible(pObj->GetLogicRect(), - *pDrawViewShell->GetActiveWindow()); + // select object pDrawViewShell->GetView()->UnmarkAll(); pDrawViewShell->GetView()->MarkObj( pObj, |