[Libreoffice-commits] .: sw/source

Michael Meeks michael at kemper.freedesktop.org
Mon Jul 9 03:36:46 PDT 2012


 sw/source/core/crsr/bookmrk.cxx  |    3 +--
 sw/source/core/crsr/crsrsh.cxx   |    4 ++--
 sw/source/core/crsr/crstrvl.cxx  |    2 +-
 sw/source/core/crsr/findattr.cxx |    8 --------
 sw/source/core/crsr/findtxt.cxx  |    9 ++++-----
 sw/source/core/crsr/pam.cxx      |   14 +-------------
 sw/source/core/crsr/swcrsr.cxx   |    7 +------
 sw/source/core/crsr/trvlfnfl.cxx |    1 -
 8 files changed, 10 insertions(+), 38 deletions(-)

New commits:
commit ec998b5d36240e66e077197af0ae77e0f257c1aa
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Mon Jul 9 10:33:18 2012 +0200

    removed dead code (in sw/source/core/crsr/)
    
    Conflicts:
    
    	sw/source/core/crsr/findtxt.cxx
    	sw/source/core/crsr/pam.cxx
    	sw/source/core/crsr/swcrsr.cxx
    
    Change-Id: I7a0f5b7e52776ef9e722898493e881e8f85678f0

diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 6801d34..93b6523 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -67,7 +67,7 @@ namespace
                 " - illegal position: %d is beyond %d", rPos.nContent.GetIndex(), pTxtNode->Len());
             rPos.nContent.Assign(pTxtNode, pTxtNode->Len());
         }
-    };
+    }
 
     static void lcl_AssureFieldMarksSet(Fieldmark* const pField,
         SwDoc* const io_pDoc,
@@ -237,7 +237,6 @@ namespace sw { namespace mark
         io_pDoc->SetModified();
     }
 
-    // ::sfx2::Metadatable
     ::sfx2::IXmlIdRegistry& Bookmark::GetRegistry()
     {
         SwDoc *const pDoc( GetMarkPos().GetDoc() );
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 779670b..246ad75 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -304,7 +304,7 @@ void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
     sal_uInt16 nParm = SwCrsrShell::CHKRANGE;
     if ( !bIdleEnd )
         nParm |= SwCrsrShell::SCROLLWIN;
-//    if( !IsViewLocked() )
+
     UpdateCrsr( nParm, bIdleEnd );      // Show Cursor changes
 
     {
@@ -1181,7 +1181,7 @@ void SwCrsrShell::Paint( const Rectangle &rRect)
     if( bHasFocus && !bBasicHideCrsr )
     {
         SwShellCrsr* pAktCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
-//      pAktCrsr->Invalidate( aRect );
+
         if( !ActionPend() )
         {
             // damit nicht rechts/unten die Raender abgeschnitten werden
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 39ec365..d229c3d 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -892,7 +892,7 @@ sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel )
     {
         pNd = rNds.GetOutLineNds()[ nPos ];
 
-        if( ((SwTxtNode*)pNd)->GetAttrOutlineLevel()-1 <= nLevel )//<-end,zhaojianwei
+        if( ((SwTxtNode*)pNd)->GetAttrOutlineLevel()-1 <= nLevel )
             return nPos;
 
     }
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index d1fd952..3d172a4 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -261,8 +261,6 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
         return ;
 
     const SfxItemSet& rSet = rTxtNd.GetSwAttrSet();
-//  if( !rSet.Count() )
-//      return;
 
     SfxItemIter aIter( aCmpSet );
     const SfxPoolItem* pItem = aIter.GetCurItem();
@@ -291,10 +289,6 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
             if( RES_TXTATR_END <= (nWhich = pItem->Which() ))
                 break;              // Ende der TextAttribute
 
-//JP 27.02.95: wenn nach defaults gesucht wird, dann muss man bis zum Pool
-//              runter
-//          if( SFX_ITEM_SET == rSet.GetItemState( nWhich, !bNoColls, &pFndItem )
-//                && *pFndItem == *pItem )
             if( CmpAttr( rSet.Get( nWhich, !bNoColls ), *pItem ) )
             {
                 pFndArr[ nWhich - nArrStart ] =
@@ -1119,8 +1113,6 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
             {
                 // zuerst die Attributierung
                 if( !aSrchPam.Find( *pSet, bValue, fnMove, &aRegion, bInReadOnly, bMoveFirst ) )
-//JP 17.11.95: was ist mit Attributen in leeren Absaetzen !!
-//                  || *pCrsr->GetMark() == *pCrsr->GetPoint() )    // kein Bereich ??
                     return FIND_NOT_FOUND;
                 bMoveFirst = sal_True;
 
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 121257c..8aa0a1b 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -537,12 +537,11 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
             Move( fnMoveForward, fnGoCntnt ) &&
             (!bSrchForward || pSttNd != &GetPoint()->nNode.GetNode()) &&
             1 == Abs( (int)( GetPoint()->nNode.GetIndex() -
-                            GetMark()->nNode.GetIndex()) ) )
+                             GetMark()->nNode.GetIndex()) ) )
         {
-            if( !bSrchForward )         // rueckwaerts Suche?
-                Exchange();             // Point und Mark tauschen
-            //bFound = sal_True;
-            //break;
+            // if backward search, switch point and mark
+            if( !bSrchForward )
+                Exchange();
             return true;
         }
     }
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index c3b3a32..ebbe3de 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -711,15 +711,6 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
                         if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
                             rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
                         {
-/*                          // ist es keine gelinkte Section, dann kann sie auch
-                            // nicht mitselektiert werden
-                            const SwSection& rSect = *pFmt->GetSection();
-                            if( CONTENT_SECTION == rSect.GetType() )
-                            {
-                                RestoreSavePos();
-                                return sal_True;
-                            }
-*/
                             bRet = sal_True;
                             break;
                         }
@@ -813,10 +804,7 @@ SwCntntNode* GetNode( SwPaM & rPam, sal_Bool& rbFirst, SwMoveFn fnMove,
             sal_Bool bSrchForward = fnMove == fnMoveForward;
             SwNodes& rNodes = aPos.nNode.GetNodes();
 
-            // zum naechsten / vorherigen ContentNode
-// Funktioniert noch alles, wenn die Uerbpruefung vom ueberspringen der
-// Sektions herausgenommen wird ??
-//          if( (*fnMove->fnNds)( rNodes, &aPos.nNode ) )
+            // go to next/previous CntntNode
             while( sal_True )
             {
                 pNd = bSrchForward
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 451fbd0..3be9d91 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -812,7 +812,6 @@ sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
                     if(RET_CANCEL == nRet)
                     {
                         bCancel = sal_True;
-                        //unwind() ??
                     }
                     break;
                 }
@@ -1112,8 +1111,6 @@ void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const
         pCNd = rNds.GoPrevious( &rPos.nNode );
         bIsStart = sal_False;
         break;
-
-//  case DOCPOS_CURR:
     default:
         rPos = *GetPoint();
     }
@@ -1634,8 +1631,6 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
     else
         fnGo = CRSR_SKIP_CELLS == nMode ? fnGoCntntCells : fnGoCntnt;
 
-    // OSL_ENSURE( not in covered cell )
-
     while( nCnt )
     {
         SwNodeIndex aOldNodeIdx( GetPoint()->nNode );
@@ -1992,7 +1987,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
     return !IsInProtectTable( sal_True );
 }
 
-sal_Bool SwTableCursor::GotoTable( const String& /*rName*/ )
+sal_Bool SwTableCursor::GotoTable( const String& )
 {
     return sal_False; // invalid action
 }
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 8ff8059..b1d9d1e 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -215,7 +215,6 @@ sal_Bool SwCursor::GotoNextFtnAnchor()
                         pTxtFtn = rFtnArr[ ++nPos ];
                         break;      // gefunden
                     }
-//                  pTxtFtn = 0;
                 }
             }
         }


More information about the Libreoffice-commits mailing list