summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-08 16:40:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-08 16:47:31 +0200
commite26dfe3a29eed9982cd8e6e3df4912a6210d09b0 (patch)
tree74da95689961343d37f149d8368d2091c74eadab /sw/source/core/docnode
parent9af0403ddc024b843c214eb43923692fb1dfd9eb (diff)
loplugin:redundantcast: redundant static_casts in sw
Change-Id: I09c1ebaf5742e983ee05942a4c7c17c6aa5179cc
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx2
-rw-r--r--sw/source/core/docnode/node.cxx6
3 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 01752deb6de6..1fabfa941ec4 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2305,7 +2305,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
rPam.DeleteMark();
SwPaM* pTmp = &rPam;
- while( &rPam != ( pTmp = static_cast<SwPaM*>(pTmp->GetNext()) ))
+ while( &rPam != ( pTmp = pTmp->GetNext() ))
for( int i = 0; i < 2; ++i )
pTmp->GetBound( (bool)i ) = *rPam.GetPoint();
}
@@ -3695,7 +3695,7 @@ static bool lcl_SetAFormatBox(FndBox_ & rBox, SetAFormatTabPara *pSetPara, bool
if (rBox.GetBox()->GetSttNd())
{
- SwTableBox* pSetBox = static_cast<SwTableBox*>(rBox.GetBox());
+ SwTableBox* pSetBox = rBox.GetBox();
if (!pSetBox->HasDirectFormatting() || bResetDirect)
{
if (bResetDirect)
@@ -4556,7 +4556,7 @@ bool SwDoc::UnProtectTables( const SwPaM& rPam )
bFound = pStt->nNode.GetIndex() < nTableIdx &&
nTableIdx < pEnd->nNode.GetIndex();
- } while( !bFound && &rPam != ( pTmp = static_cast<SwPaM*>(pTmp->GetNext()) ) );
+ } while( !bFound && &rPam != ( pTmp = pTmp->GetNext() ) );
if( !bFound )
continue; // Continue searching
}
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 03735e8f869c..6f197f4ff227 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -200,7 +200,7 @@ bool FindBox_( FndBox_ & rBox, LinesAndTable* pPara )
}
else if (rBox.GetBox())
{
- ::InsertLine(pPara->m_rLines, static_cast<SwTableLine*>(rBox.GetBox()->GetUpper()));
+ ::InsertLine(pPara->m_rLines, rBox.GetBox()->GetUpper());
}
return true;
}
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 392143c44e96..e42598c2ab00 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1027,14 +1027,14 @@ void SwContentNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNe
if( pFormat->GetRegisteredIn() )
{
// If Parent, register anew in the new Parent
- static_cast<SwModify*>(pFormat->GetRegisteredIn())->Add( this );
+ pFormat->GetRegisteredIn()->Add( this );
if ( GetpSwAttrSet() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, GetFormatColl(), GetFormatColl() );
}
else
{
// Else register anyways when dying
- static_cast<SwModify*>(GetRegisteredIn())->Remove( this );
+ GetRegisteredIn()->Remove( this );
if ( GetpSwAttrSet() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, nullptr, nullptr );
}
@@ -1360,7 +1360,7 @@ void SwContentNode::DelFrames( bool bIsDisposeAccTable )
nullptr != ( pCFrame = pFootnote->GetRefFromAttr()) && pCFrame->IsFollow() )
{
OSL_ENSURE( pCFrame->IsTextFrame(), "NoTextFrame has Footnote?" );
- static_cast<SwTextFrame*>(pCFrame->FindMaster())->Prepare( PREP_FTN_GONE );
+ pCFrame->FindMaster()->Prepare( PREP_FTN_GONE );
}
}
//Set acc table dispose state