sw/source/uibase/shells/navsh.cxx | 7 +++++++ sw/source/uibase/wrtsh/navmgr.cxx | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-)
New commits: commit cf98f078b0a4e8c36cf0579042442e5583013608 Author: Jim Raykowski <[email protected]> AuthorDate: Sun Jan 17 16:16:10 2021 -0900 Commit: Jim Raykowski <[email protected]> CommitDate: Mon Jan 18 04:49:10 2021 +0100 tdf#115817 set standard mode before recency navigation Using Navigate-by to move through the recency stack sets the writer shell to standard mode before navigation. Navigation using the Back and Forward navigation controls does not. This results in incorrect behaviour when a drawing object is selected and navigation is attempted. This patch sets writer shell to standard mode before recency navigation is done using .uno:NavigateBack and .uno:NavigateForward. Change-Id: If05883e8188452736cfedac9153bcc91422bf7e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109504 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> diff --git a/sw/source/uibase/shells/navsh.cxx b/sw/source/uibase/shells/navsh.cxx index 5b5d071bee8d..6f864ec7c126 100644 --- a/sw/source/uibase/shells/navsh.cxx +++ b/sw/source/uibase/shells/navsh.cxx @@ -41,6 +41,13 @@ void SwNavigationShell::Execute(SfxRequest const& rReq) const SfxPoolItem* pItem; if (pArgs) pArgs->GetItemState(nSlotId, false, &pItem); + + if (pSdrView->IsTextEdit()) + pSh->EndTextEdit(); + if (pSh->GetView().IsDrawMode()) + pSh->GetView().LeaveDrawCreate(); + pSh->EnterStdMode(); + switch (nSlotId) { case FN_NAVIGATION_BACK: diff --git a/sw/source/uibase/wrtsh/navmgr.cxx b/sw/source/uibase/wrtsh/navmgr.cxx index 10130fbe4b4f..1960f831e4ee 100644 --- a/sw/source/uibase/wrtsh/navmgr.cxx +++ b/sw/source/uibase/wrtsh/navmgr.cxx @@ -20,12 +20,10 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <edtwin.hxx> - // This method positions the cursor to the position rPos. void SwNavigationMgr::GotoSwPosition(const SwPosition &rPos) { - m_rMyShell.GetView().GetEditWin().GrabFocus(); + // EnterStdMode() prevents the cursor to 'block' the current // shell when it should move from the image back to the normal shell m_rMyShell.EnterStdMode(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
