summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/navsh.cxx
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/shells/navsh.cxx
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/shells/navsh.cxx')
-rw-r--r--sw/source/uibase/shells/navsh.cxx7
1 files changed, 7 insertions, 0 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: