summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2023-02-07 23:17:17 -0900
committerJim Raykowski <raykowj@gmail.com>2023-02-10 17:07:50 +0000
commit5bc7cb77df839f7dd3cc7d444490aaf50ebccdc6 (patch)
treec8a580e36b60296121c348ff06f535bb4be4be63 /sw/source/uibase/shells
parent208a4ecafafa97ea7fcc5a135fa8160e91ea0a74 (diff)
tdf#153205 related: Fix selection problems caused by cursor shell
push pop during insert state update This patch renames the SelectHiddenRange function to IsInHiddenRange and modifies it to take a bool argument that when true selects the hidden range if the current cursor position is in a hidden range. When the argument is false, the hidden range is not selected if the current cursor position is in a hidden range. This makes using cursor push pop unnecessary when all that is wanted to know is if the current cursor position is in a hidden range. Change-Id: I622dfaf8e73c5b432bb74a48d36433ff755542b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146725 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r--sw/source/uibase/shells/textsh.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index af047adc2d19..06f338f290dc 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -605,14 +605,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SvtModuleOptions aMOpt;
SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode();
-
- bool bCursorInHidden = false;
- if( !rSh.HasMark() )
- {
- rSh.Push();
- bCursorInHidden = rSh.SelectHiddenRange();
- rSh.Pop();
- }
+ const bool bCursorInHidden = rSh.IsInHiddenRange(/*bSelect=*/false);
while ( nWhich )
{