summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/notxtfrm.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-05 12:24:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-06 07:46:11 +0100
commit97ebc98f0e956712d242e13f15531742f844a738 (patch)
treef8f59969604c4cac28a3efba17c4c281752fa62f /sw/source/core/doc/notxtfrm.cxx
parent4b363760b9f196e139ee367d54252c4d6cbe25f3 (diff)
convert some macros to local functions
Change-Id: If2c89f0f53615f6200b6cd1fb6267cc9b47df927 Reviewed-on: https://gerrit.libreoffice.org/62884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/notxtfrm.cxx')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 308f8714ca3b..cea0bdb9a591 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -711,13 +711,14 @@ bool SwNoTextFrame::GetCursorOfst(SwPosition* pPos, Point& ,
return true;
}
-#define CLEARCACHE {\
- SwFlyFrame* pFly = FindFlyFrame();\
- if( pFly && pFly->GetFormat()->GetSurround().IsContour() )\
- {\
- ClrContourCache( pFly->GetVirtDrawObj() );\
- pFly->NotifyBackground( FindPageFrame(), getFramePrintArea(), PREP_FLY_ATTR_CHG );\
- }\
+void SwNoTextFrame::ClearCache()
+{
+ SwFlyFrame* pFly = FindFlyFrame();
+ if( pFly && pFly->GetFormat()->GetSurround().IsContour() )
+ {
+ ClrContourCache( pFly->GetVirtDrawObj() );
+ pFly->NotifyBackground( FindPageFrame(), getFramePrintArea(), PREP_FLY_ATTR_CHG );
+ }
}
void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
@@ -755,7 +756,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
}
SAL_FALLTHROUGH;
case RES_FMT_CHG:
- CLEARCACHE
+ ClearCache();
break;
case RES_ATTRSET_CHG:
@@ -765,7 +766,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( SfxItemState::SET == static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->
GetItemState( n, false ))
{
- CLEARCACHE
+ ClearCache();
if(RES_GRFATR_ROTATION == n)
{
@@ -814,7 +815,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
bComplete = false;
SwGrfNode* pNd = static_cast<SwGrfNode*>( GetNode());
- CLEARCACHE
+ ClearCache();
SwRect aRect( getFrameArea() );