[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sw/inc sw/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Mar 4 01:54:08 PST 2015


 sw/inc/crsrsh.hxx                 |    5 +----
 sw/source/core/crsr/crsrsh.cxx    |    4 ++--
 sw/source/core/crsr/crstrvl1.cxx  |    5 -----
 sw/source/uibase/docvw/edtwin.cxx |    2 +-
 4 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 40eff9d195c2b24a0a12e8be7c33cbd4eecf103e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Mar 4 10:53:28 2015 +0100

    Use SwCrsrShell::SelTblBox()
    
    The only user of SwCrsrShell::SelectCell() can actually use SelTblBox()
    instead.
    
    Change-Id: I286a3d8c25834dd08897f0cfc37a3ec31a89ce7a

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 1fdef4b..13489ce 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -157,8 +157,7 @@ public:
         SCROLLWIN   = (1 << 1),     ///< scroll window
         CHKRANGE    = (1 << 2),     ///< check overlapping PaMs
         NOCALRECT   = (1 << 3),     ///< don't recalculate CharRect
-        READONLY    = (1 << 4),     ///< make visible in spite of Readonly
-        SELECTCELL  = (1 << 5)      ///< Create table cursor even if we don't span over multiple cells.
+        READONLY    = (1 << 4)      ///< make visible in spite of Readonly
     };
 
 private:
@@ -730,8 +729,6 @@ public:
     bool GoStartSentence();
     bool GoEndSentence();
     bool SelectWord( const Point* pPt = 0 );
-    /// Creates table cursor even if we don't span over multiple cells.
-    void SelectCell();
     bool ExpandToSentenceBorders();
 
     // get position from current cursor
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index ce7dc5c..982a2ac 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1417,11 +1417,11 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
     // If the current cursor is in a table and point/mark in different boxes,
     // then the table mode is active (also if it is already active: m_pTblCrsr)
     SwPaM* pTstCrsr = getShellCrsr( true );
-    if( ( pTstCrsr->HasMark() || eFlags & SwCrsrShell::SELECTCELL ) && !m_pBlockCrsr &&
+    if( pTstCrsr->HasMark() && !m_pBlockCrsr &&
         mpDoc->IsIdxInTbl( pTstCrsr->GetPoint()->nNode ) &&
           ( m_pTblCrsr ||
             pTstCrsr->GetNode( true ).StartOfSectionNode() !=
-            pTstCrsr->GetNode( false ).StartOfSectionNode() || eFlags & SwCrsrShell::SELECTCELL ) && !mbSelectAll)
+            pTstCrsr->GetNode( false ).StartOfSectionNode() ) && !mbSelectAll)
     {
         SwShellCrsr* pITmpCrsr = getShellCrsr( true );
         Point aTmpPt( pITmpCrsr->GetPtPos() );
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index d39e89c..699302a 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -81,11 +81,6 @@ bool SwCrsrShell::SelectWord( const Point* pPt )
     return m_pCurCrsr->SelectWord( this, pPt );
 }
 
-void SwCrsrShell::SelectCell()
-{
-    UpdateCrsr(SwCrsrShell::SELECTCELL);
-}
-
 bool SwCrsrShell::ExpandToSentenceBorders()
 {
     return m_pCurCrsr->ExpandToSentenceBorders();
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 4a45b73..106c23a 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3414,7 +3414,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
                                 // Double click did not select any word: try to
                                 // select the current cell in case we are in a
                                 // table.
-                                rSh.SelectCell();
+                                rSh.SelTblBox();
                         }
                         bHoldSelection = true;
                         return;


More information about the Libreoffice-commits mailing list