summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/atrfrm.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-22 08:11:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-22 08:13:42 +0100
commite6c124ae3b4de78848344a172003de934e1cb163 (patch)
tree99bbb9c600af26b18842ef33fca9790685d55ccc /sw/source/core/layout/atrfrm.cxx
parent08bdb40656898fc484f5200b63610a31369ddd87 (diff)
Some more loplugin:cstylecast: sw
note the two TODOs about suspicious casts Change-Id: I324fa05b30a5c8aa1d9e9a6d488a1e295226e788
Diffstat (limited to 'sw/source/core/layout/atrfrm.cxx')
-rw-r--r--sw/source/core/layout/atrfrm.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 5f1bf977ed20..1e224c7cde18 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2547,17 +2547,17 @@ bool SwFrmFmt::supportsFullDrawingLayerFillAttributeSet() const
void SwFrmFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
- SwFmtHeader *pH = 0;
- SwFmtFooter *pF = 0;
+ SwFmtHeader const *pH = 0;
+ SwFmtFooter const *pF = 0;
const sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
if( RES_ATTRSET_CHG == nWhich )
{
static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState(
- RES_HEADER, false, (const SfxPoolItem**)&pH );
+ RES_HEADER, false, reinterpret_cast<const SfxPoolItem**>(&pH) );
static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState(
- RES_FOOTER, false, (const SfxPoolItem**)&pF );
+ RES_FOOTER, false, reinterpret_cast<const SfxPoolItem**>(&pF) );
//UUUU reset fill information
if (maFillAttributes.get() && supportsFullDrawingLayerFillAttributeSet())
@@ -2592,13 +2592,13 @@ void SwFrmFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( pH && pH->IsActive() && !pH->GetHeaderFmt() )
{ //If he doesn't have one, I'll add one
SwFrmFmt *pFmt = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFmt( RND_STD_HEADER, 0 );
- pH->RegisterToFormat( *pFmt );
+ const_cast<SwFmtHeader *>(pH)->RegisterToFormat( *pFmt );
}
if( pF && pF->IsActive() && !pF->GetFooterFmt() )
{ //If he doesn't have one, I'll add one
SwFrmFmt *pFmt = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFmt( RND_STD_FOOTER, 0 );
- pF->RegisterToFormat( *pFmt );
+ const_cast<SwFmtFooter *>(pF)->RegisterToFormat( *pFmt );
}
SwFmt::Modify( pOld, pNew );