sd/source/ui/docshell/docshel4.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
New commits: commit d87f69cc7e5a6f5c8a79075fed343a14675f3a5d Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Tue Jul 12 12:34:25 2022 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Sat Jul 30 05:24:38 2022 +0200 tdf#118696 better fix for sd Navigator object selection resulting in unexpected view movement This fix reverts commit 3c86ffd8ded628e6f2b4187948a1b1056f6a0f56 and reintroduces DrawViewShell::MakeVisible with change made to the passed object rectangle always being the snap rectangle instead of the rectangle returned from a call to object GetLogicRect. Change-Id: I05e777545fb1093838c05618e87ad4d4f5ec003c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137008 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 6fe599e44197..efc3d1bd97cd 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -74,7 +74,8 @@ #include <framework/FrameworkHelper.hxx> #include <o3tl/string_view.hxx> -#include <sfx2/zoomitem.hxx> +#include <Window.hxx> +#include <svl/intitem.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -835,17 +836,11 @@ void DrawDocShell::GotoBookmark(std::u16string_view rBookmark) pDrawViewShell->SwitchPage(nSdPgNum); } - if (pDrawViewShell->GetDispatcher()) - { - // show page - SvxZoomItem aZoom; - aZoom.SetType( SvxZoomType::WHOLEPAGE ); - pDrawViewShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, { &aZoom }); - } - if (pObj != nullptr) { - // select object + // show and select object + if (vcl::Window* pWindow = pDrawViewShell->GetActiveWindow()) + pDrawViewShell->MakeVisible(pObj->GetSnapRect(), *pWindow); pDrawViewShell->GetView()->UnmarkAll(); pDrawViewShell->GetView()->MarkObj( pObj,