summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-10-03 09:35:26 +0300
committerAndras Timar <andras.timar@collabora.com>2015-10-17 23:35:06 +0200
commit0f51bb6d975480bdca093264c26d906fc856b8a5 (patch)
tree0a0ce3afd79eaefe5af687e208594ac6cbd28613
parent36f8686f56fe90b202ff0c30773d2b17200e10df (diff)
tdf#94679 Writer: fix lost selection with Shift-PageDown
Push/Pop-ing the cursor led to selection loss. SelectHiddenRange() immediately returns false if the current cursor hasMark(), so avoid all of the bugs and expensive push/pop routines when there is a mark already. Change-Id: I4624a3e0b2267942812d0429d527ad97962ec7fc Reviewed-on: https://gerrit.libreoffice.org/19108 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit fb62052d5ac069d700a5410db35d6949a4c4008b) Reviewed-on: https://gerrit.libreoffice.org/19278 (cherry picked from commit 22560075218c6166d44367957f4a733ea50ff9c3)
-rw-r--r--sw/source/uibase/shells/textsh.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index ae19de5a72e3..6637429e69b3 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -698,9 +698,13 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode();
- rSh.Push();
- const bool bCrsrInHidden = rSh.SelectHiddenRange();
- rSh.Pop();
+ bool bCrsrInHidden = false;
+ if( !rSh.HasMark() )
+ {
+ rSh.Push();
+ bCrsrInHidden = rSh.SelectHiddenRange();
+ rSh.Pop();
+ }
while ( nWhich )
{