summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/hffrm.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:31:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:38 +0100
commit6f3c52bb37f52f57fea6479f1da6c1828fbd85fe (patch)
treed8e6db66db4c28335a62fbec4a282541ae083a85 /sw/source/core/layout/hffrm.cxx
parent5429049e3b8fd12e84aca83be7ca19e52920f672 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
Diffstat (limited to 'sw/source/core/layout/hffrm.cxx')
-rw-r--r--sw/source/core/layout/hffrm.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 9e4f1ee9de19..f85a82049297 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -679,7 +679,7 @@ void SwPageFrm::PrepareHeader()
{ //Implant header, but remove first, if already present
OSL_ENSURE( rH.GetHeaderFmt(), "FrmFmt for Header not found." );
- if ( pLay->GetFmt() == (SwFrmFmt*)rH.GetHeaderFmt() )
+ if ( pLay->GetFmt() == rH.GetHeaderFmt() )
return; // Header is already the correct one.
if ( pLay->IsHeaderFrm() )
@@ -690,7 +690,7 @@ void SwPageFrm::PrepareHeader()
delete pDel;
}
OSL_ENSURE( pLay, "Where to with the Header?" );
- SwHeaderFrm *pH = new SwHeaderFrm( (SwFrmFmt*)rH.GetHeaderFmt(), this );
+ SwHeaderFrm *pH = new SwHeaderFrm( const_cast<SwFrmFmt*>(rH.GetHeaderFmt()), this );
pH->Paste( this, pLay );
if ( GetUpper() )
::RegistFlys( this, pH );
@@ -721,7 +721,7 @@ void SwPageFrm::PrepareFooter()
{ //Implant footer, but remove first, if already present
OSL_ENSURE( rF.GetFooterFmt(), "FrmFmt for Footer not found." );
- if ( pLay->GetFmt() == (SwFrmFmt*)rF.GetFooterFmt() )
+ if ( pLay->GetFmt() == rF.GetFooterFmt() )
return; // Footer is already the correct one.
if ( pLay->IsFooterFrm() )
@@ -729,7 +729,7 @@ void SwPageFrm::PrepareFooter()
pLay->Cut();
delete pLay;
}
- SwFooterFrm *pF = new SwFooterFrm( (SwFrmFmt*)rF.GetFooterFmt(), this );
+ SwFooterFrm *pF = new SwFooterFrm( const_cast<SwFrmFmt*>(rF.GetFooterFmt()), this );
pF->Paste( this );
if ( GetUpper() )
::RegistFlys( this, pF );