From 3c86ffd8ded628e6f2b4187948a1b1056f6a0f56 Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Thu, 12 Jul 2018 15:22:39 -0800 Subject: tdf#118696 impress navigator: zoom slide/slide object on select Change-Id: I5656c99f72fb94c791282bbf2fcf5044bcdd8a7a Reviewed-on: https://gerrit.libreoffice.org/57379 Tested-by: Jenkins Reviewed-by: Katarina Behrens --- sd/source/ui/docshell/docshel4.cxx | 11 ++++++++--- 1 file 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 +#include + 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, -- cgit