summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorPhilipp Riemer <ruderphilipp@gmail.com>2012-07-09 10:33:18 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-07-09 11:33:07 +0100
commitec998b5d36240e66e077197af0ae77e0f257c1aa (patch)
treebe6a74c1ebee88be40dee042ae0b5caff78012aa /sw
parent02b435f235d2863ee344054262200152edbba3a3 (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/bookmrk.cxx3
-rw-r--r--sw/source/core/crsr/crsrsh.cxx4
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/crsr/findattr.cxx8
-rw-r--r--sw/source/core/crsr/findtxt.cxx9
-rw-r--r--sw/source/core/crsr/pam.cxx14
-rw-r--r--sw/source/core/crsr/swcrsr.cxx7
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx1
8 files changed, 10 insertions, 38 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 6801d3422921..93b65233e1c3 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 779670befb57..246ad75a1bd1 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 39ec3658e696..d229c3d13998 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 d1fd9526e211..3d172a4e36ed 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 121257ca7d19..8aa0a1b686a4 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 c3b3a320e454..ebbe3dea0cdc 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 451fbd09710c..3be9d91205fd 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 8ff80593a4a9..b1d9d1eb5011 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;
}
}
}