summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-13 12:35:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-13 12:36:36 +0200
commit373a9b9bb62c50072c06e28fd932afb6e71ba687 (patch)
treedc6b72474110a4311d7ab57d42dc4bda5c221e4b /sw
parent3c4fd27392bd153e043eeb60907eeded48c60cf2 (diff)
loplugin:redundantcast: redundant const_cast followed by implicit upcast
Change-Id: I58297ba336d96358eb0683684bbd763870ef56cb
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docedt.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx4
-rw-r--r--sw/source/core/layout/calcmove.cxx2
-rw-r--r--sw/source/core/layout/pagechg.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 4a59df7c5ae0..9095f525699e 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -578,7 +578,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( GetGCIterator() );
if (xGCIterator.is())
{
- uno::Reference< lang::XComponent > xDoc( const_cast<SwDocShell*>(GetDocShell())->GetBaseModel(), uno::UNO_QUERY );
+ uno::Reference< lang::XComponent > xDoc( GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
// Expand the string:
const ModelToViewHelper aConversionMap(*pNd->GetTxtNode());
OUString aExpandText = aConversionMap.getViewText();
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 148ea268606c..08fb7de31e44 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -321,7 +321,7 @@ void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly )
pNd->SetContour( pPoly );
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper());
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
- pFly->GetFmt()->NotifyClients( const_cast<SwFmtSurround*>(&rSur), const_cast<SwFmtSurround*>(&rSur) );
+ pFly->GetFmt()->NotifyClients( &rSur, &rSur );
GetDoc()->getIDocumentState().SetModified();
EndAllAction();
}
@@ -336,7 +336,7 @@ void SwEditShell::ClearAutomaticContour()
pNd->SetContour( NULL, false );
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper());
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
- pFly->GetFmt()->NotifyClients( const_cast<SwFmtSurround*>(&rSur), const_cast<SwFmtSurround*>(&rSur) );
+ pFly->GetFmt()->NotifyClients( &rSur, &rSur );
GetDoc()->getIDocumentState().SetModified();
EndAllAction();
}
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 9e951b698e07..d808f5cbad39 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1549,7 +1549,7 @@ void SwCntntFrm::MakeAll()
// Finally, we are able to split table rows. Therefore, bDontMoveMe
// can be set to false:
if( bDontMoveMe && IsInTab() &&
- 0 != const_cast<SwCntntFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) )
+ 0 != GetNextCellLeaf( MAKEPAGE_NONE ) )
bDontMoveMe = false;
if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() >
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index e4a55acb02d5..619404477943 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1479,7 +1479,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
nCnt != pPage->GetSortedObjs()->size(),
"Object couldn't be reattached!" );
#else
- rFmt.NotifyClients( 0, const_cast<SwFmtAnchor*>(&rAnch) );
+ rFmt.NotifyClients( 0, &rAnch );
#endif
// Do not increment index, in this case
continue;