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 )
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 )
{
......
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