diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:31:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:38 +0100 |
commit | 6f3c52bb37f52f57fea6479f1da6c1828fbd85fe (patch) | |
tree | d8e6db66db4c28335a62fbec4a282541ae083a85 /sw/source/uibase/uiview/viewtab.cxx | |
parent | 5429049e3b8fd12e84aca83be7ca19e52920f672 (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
Diffstat (limited to 'sw/source/uibase/uiview/viewtab.cxx')
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index e24c7755cde3..1a5c2d0a80b2 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -236,10 +236,10 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const bool bVerticalWriting = rSh.IsInVerticalText(); const SwFmtHeader& rHeaderFmt = rDesc.GetMaster().GetHeader(); - SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt(); + SwFrmFmt *pHeaderFmt = const_cast<SwFrmFmt*>(rHeaderFmt.GetHeaderFmt()); const SwFmtFooter& rFooterFmt = rDesc.GetMaster().GetFooter(); - SwFrmFmt *pFooterFmt = (SwFrmFmt*)rFooterFmt.GetFooterFmt(); + SwFrmFmt *pFooterFmt = const_cast<SwFrmFmt*>(rFooterFmt.GetFooterFmt()); const SwFmtFrmSize &rFrmSize = rDesc.GetMaster().GetFrmSize(); @@ -1095,7 +1095,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( ( nFrmType & FrmTypeFlags::HEADER || nFrmType & FrmTypeFlags::FOOTER ) && !(nFrmType & FrmTypeFlags::COLSECT) ) { - SwFrmFmt *pFmt = (SwFrmFmt*) (nFrmType & FrmTypeFlags::HEADER ? + SwFrmFmt *pFmt = const_cast<SwFrmFmt*>(nFrmType & FrmTypeFlags::HEADER ? rDesc.GetMaster().GetHeader().GetHeaderFmt() : rDesc.GetMaster().GetFooter().GetFooterFmt()); if( pFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash @@ -1396,14 +1396,14 @@ void SwView::StateTabWin(SfxItemSet& rSet) { rMaster.GetHeader(); const SwFmtHeader& rHeaderFmt = rMaster.GetHeader(); - SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt(); + SwFrmFmt *pHeaderFmt = const_cast<SwFrmFmt*>(rHeaderFmt.GetHeaderFmt()); if( pHeaderFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash pBox = & (const SvxBoxItem&)pHeaderFmt->GetBox(); } else if(nFrmType & FrmTypeFlags::FOOTER ) { const SwFmtFooter& rFooterFmt = rMaster.GetFooter(); - SwFrmFmt *pFooterFmt = (SwFrmFmt*)rFooterFmt.GetFooterFmt(); + SwFrmFmt *pFooterFmt = const_cast<SwFrmFmt*>(rFooterFmt.GetFooterFmt()); if( pFooterFmt )// #i80890# if rDesc is not the one belonging to the current page is might crash pBox = & (const SvxBoxItem&)pFooterFmt->GetBox(); } |