summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-03 21:08:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-05 21:18:01 +0200
commit6b95231a2c6f9ae6ec544f9281c4ddc6d665c9dc (patch)
tree0d04661abb20dde1eab177d587e704b15e3051cd /sw/source/core/layout
parentb1fba1afa1c1a5cf9074d2e9dd3e613ef0b318de (diff)
Improved loplugin:cstylecast to reference types: sw
Change-Id: I7206d3325b4bfedb852d559b68dc1678da524b41
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
-rw-r--r--sw/source/core/layout/laycache.cxx2
-rw-r--r--sw/source/core/layout/pagechg.cxx2
-rw-r--r--sw/source/core/layout/sectfrm.cxx2
-rw-r--r--sw/source/core/layout/ssfrm.cxx2
6 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 2f6516d4f22a..1a459f5d14cb 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -127,7 +127,7 @@ static void lcl_DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat )
{
// If there is a Cursor registered in one of the nodes, we need to call the
// ParkCursor in an (arbitrary) shell.
- SwFormatContent& rCnt = (SwFormatContent&)pFormat->GetContent();
+ SwFormatContent& rCnt = const_cast<SwFormatContent&>(pFormat->GetContent());
if ( rCnt.GetContentIdx() )
{
SwNode *pNode = nullptr;
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 14790e03eed2..78566f1a1535 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2812,7 +2812,7 @@ const SwContentFrame* SwFootnoteFrame::GetRefFromAttr() const
SwContentFrame* SwFootnoteFrame::GetRefFromAttr()
{
assert(pAttr && "invalid Attribute");
- SwTextNode& rTNd = (SwTextNode&)pAttr->GetTextNode();
+ SwTextNode& rTNd = const_cast<SwTextNode&>(pAttr->GetTextNode());
SwPosition aPos( rTNd, SwIndex( &rTNd, pAttr->GetStart() ));
SwContentFrame* pCFrame = rTNd.getLayoutFrame( getRootFrame(), nullptr, &aPos, false );
return pCFrame;
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index ab8f0e361841..74653f8db268 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -667,7 +667,7 @@ bool SwLayHelper::CheckInsertPage()
}
// If the page style is changing, we'll have a first page.
bool bNextPageFirst = pDesc != mrpPage->GetPageDesc();
- ::InsertNewPage( (SwPageDesc&)*pDesc, mrpPage->GetUpper(),
+ ::InsertNewPage( const_cast<SwPageDesc&>(*pDesc), mrpPage->GetUpper(),
bNextPageOdd, bNextPageFirst, bInsertEmpty, false, mrpPage->GetNext() );
if ( bEnd )
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 906566892ecc..343c157dceae 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1234,7 +1234,7 @@ SwPageFrame *SwFrame::InsertPage( SwPageFrame *pPrevPage, bool bFootnote )
// For ContentFrame take the one from format if provided,
// otherwise from the Follow of the PrevPage
if ( IsFlowFrame() && !SwFlowFrame::CastFlowFrame( this )->IsFollow() )
- { SwFormatPageDesc &rDesc = (SwFormatPageDesc&)GetAttrSet()->GetPageDesc();
+ { SwFormatPageDesc &rDesc = const_cast<SwFormatPageDesc&>(GetAttrSet()->GetPageDesc());
pDesc = rDesc.GetPageDesc();
if ( rDesc.GetNumOffset() )
{
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 7dd2e43a976c..b94ba4582d85 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -58,7 +58,7 @@ SwSectionFrame::SwSectionFrame( SwSection &rSect, SwFrame* pSib )
SwSectionFrame::SwSectionFrame( SwSectionFrame &rSect, bool bMaster ) :
SwLayoutFrame( rSect.GetFormat(), rSect.getRootFrame() ),
- SwFlowFrame( (SwFrame&)*this ),
+ SwFlowFrame( static_cast<SwFrame&>(*this) ),
m_pSection( rSect.GetSection() ),
m_bFootnoteAtEnd( rSect.IsFootnoteAtEnd() ),
m_bEndnAtEnd( rSect.IsEndnAtEnd() ),
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 2a4fd7421347..b8b3c1ecf8cf 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -415,7 +415,7 @@ void SwLayoutFrame::SetFrameFormat( SwFrameFormat *pNew )
SwContentFrame::SwContentFrame( SwContentNode * const pContent, SwFrame* pSib ) :
SwFrame( pContent, pSib ),
- SwFlowFrame( (SwFrame&)*this )
+ SwFlowFrame( static_cast<SwFrame&>(*this) )
{
}