Kaydet (Commit) fb62052d authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Caolán McNamara

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/19108Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 4850edd3
...@@ -660,9 +660,13 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) ...@@ -660,9 +660,13 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SfxObjectCreateMode eCreateMode = SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode(); GetView().GetDocShell()->GetCreateMode();
rSh.Push(); bool bCrsrInHidden = false;
const bool bCrsrInHidden = rSh.SelectHiddenRange(); if( !rSh.HasMark() )
rSh.Pop(); {
rSh.Push();
bCrsrInHidden = rSh.SelectHiddenRange();
rSh.Pop();
}
while ( nWhich ) while ( nWhich )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment