summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-01-17 16:16:10 -0900
committerJim Raykowski <raykowj@gmail.com>2021-01-18 04:49:10 +0100
commitcf98f078b0a4e8c36cf0579042442e5583013608 (patch)
treeeb5bb1f32b89c4158cd3d1374fc6b1379727b2f9 /sw/source/uibase
parent0da5e6f38aedb1fb873d1a90c506f6ab03ab1656 (diff)
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 <raykowj@gmail.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/shells/navsh.cxx7
-rw-r--r--sw/source/uibase/wrtsh/navmgr.cxx4
2 files changed, 8 insertions, 3 deletions
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();