[Libreoffice-commits] core.git: Branch 'libreoffice-4-4-6' - sw/source

Justin Luth justin_luth at sil.org
Wed Oct 14 14:37:10 PDT 2015


 sw/source/uibase/shells/textsh.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 3051c054579b201db9a36af20f09d455fbdf7422
Author: Justin Luth <justin_luth at sil.org>
Date:   Sat Oct 3 09:35:26 2015 +0300

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit fb62052d5ac069d700a5410db35d6949a4c4008b)
    Reviewed-on: https://gerrit.libreoffice.org/19279
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index ae19de5..6637429 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 )
     {


More information about the Libreoffice-commits mailing list