[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Oct 28 04:19:07 PDT 2013


 sw/source/ui/wrtsh/select.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 3ce5507dfd91983555eaf9f96703e6b318e16201
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Oct 28 11:15:43 2013 +0100

    bnc#825891 fdo#69893 fix SwWrtShell::SelAll() to work with empty table at doc start
    
    In theory, it was a problem to have the table cursor around when having
    the selection outside the table; but it didn't cause a problem so far.
    However, when the table has one or more empty cells, we really need to
    leave table mode, otherwise only the table gets selected.
    
    (cherry picked from commit d1eb536c7e410d40fd94c76b157bbd4ed7944d4c)
    
    Conflicts:
    	sw/qa/extras/uiwriter/uiwriter.cxx
    
    Change-Id: I766903ed624b9338f0612697b4c03f44de1d2e41

diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 1e9262f..bc74165 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -162,7 +162,13 @@ long SwWrtShell::SelAll()
 
         bool bStartsWithTable = StartsWithTable();
         if (bStartsWithTable)
+        {
+            // Disable table cursor to make sure getShellCrsr() returns m_pCurCrsr, not m_pTblCrsr.
+            if (IsTableMode())
+                TblCrsrToCursor();
+            // Do the extended select all on m_pCurCrsr.
             ExtendedSelectAll(/*bFootnotes =*/ false);
+        }
 
         if( pStartPos )
         {


More information about the Libreoffice-commits mailing list