[Libreoffice-commits] core.git: 2 commits - sw/source

Michael Stahl mstahl at redhat.com
Thu Jun 27 06:41:14 PDT 2013


 sw/source/core/edit/eddel.cxx |   11 ++++-------
 sw/source/ui/wrtsh/delete.cxx |   12 +-----------
 sw/source/ui/wrtsh/wrtsh4.cxx |    5 ++---
 3 files changed, 7 insertions(+), 21 deletions(-)

New commits:
commit fd2bd50bb4fbe139cd1ed9332c0d2eeaebc7dabe
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jun 27 15:27:03 2013 +0200

    Revert "Related: #i121925# fixed by reverting change for issue #i119652#"
    
    This reverts commit e47b7f967bcdd8b1e830d07b2ad941b1302686f7.
    
    The original commit this reverts was never merged anyway and this adds
    some line that were context in the AOO commit.

diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 05ea03a..2d7adb6 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -35,17 +35,17 @@
 
 void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo )
 {
-    // only on a selection
-    if ( !rPam.HasMark() || *rPam.GetPoint() == *rPam.GetMark())
+    // only for selections
+    if( !rPam.HasMark() || *rPam.GetPoint() == *rPam.GetMark())
         return;
 
     // Is the selection in a table? Then delete only the content of the selected boxes.
     // Here, there are two cases:
     // 1. Point and Mark are in one box, delete selection as usual
     // 2. Point and Mare are in different boxes, search all selected boxes and delete content
-
     if( rPam.GetNode()->FindTableNode() &&
-        rPam.GetNode()->StartOfSectionNode() != rPam.GetNode(sal_False)->StartOfSectionNode() )
+        rPam.GetNode()->StartOfSectionNode() !=
+        rPam.GetNode(sal_False)->StartOfSectionNode() )
     {
         // group the Undo in the table
         if( pUndo && !*pUndo )
@@ -71,9 +71,6 @@ void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo )
                 aDelPam.Move( fnMoveBackward, fnGoCntnt );
             }
             // skip protected boxes
-            //For i117395, in some situation, the node would be hidden or invisible, which makes the frame of it unavailable
-            //So verify it before use it.
-            SwCntntFrm* pFrm = NULL;
             if( !pNd->IsCntntNode() ||
                 !pNd->IsInProtectSect() )
             {
commit 97e6ff086e2601c066c32fca8412e939843dae3f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jun 27 15:19:47 2013 +0200

    Revert "Resolves: #119652# avoid invalid selection on..."
    
    This reverts commit e6cd5d0b11e7d8562358b883c08a8dba9fd4f61d.
    
    The problem was already solved with
    af4b6c94c68b5f67b931cde8d0acda6ec8b288bb.
    
    Change-Id: I21d7ca9fec601377967297bc42835573422c29a7

diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index 940a411..f19455e 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -446,17 +446,7 @@ long SwWrtShell::DelToStartOfSentence()
     if(IsStartOfDoc())
         return 0;
     OpenMark();
-
-    SwCrsrSaveState aSaveState( *(_GetCrsr()) );
-    sal_Bool bSuccessfulSelection = _BwdSentence();
-    if ( _GetCrsr()->IsInProtectTable( sal_True )
-         || _GetCrsr()->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
-                                  nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
-    {
-        bSuccessfulSelection = sal_False;
-    }
-    long nRet = bSuccessfulSelection ? Delete() : 0;
-
+    long nRet = _BwdSentence() ? Delete() : 0;
     CloseMark( 0 != nRet );
     return nRet;
 }
diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index 6277276..6966e45 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -198,15 +198,14 @@ sal_Bool SwWrtShell::_BwdSentence()
     if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
     {
         Pop(sal_False);
-        return sal_False;
+        return 0;
     }
     if( !GoStartSentence()  && !IsSttPara() )
             // not found --> go to the beginning of the paragraph
         SwCrsrShell::MovePara( fnParaCurr, fnParaStart );
     ClearMark();
     Combine();
-
-    return sal_True;
+    return 1;
 }
 
 sal_Bool SwWrtShell::_FwdPara()


More information about the Libreoffice-commits mailing list