diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-05 12:24:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-06 07:46:11 +0100 |
commit | 97ebc98f0e956712d242e13f15531742f844a738 (patch) | |
tree | f8f59969604c4cac28a3efba17c4c281752fa62f /sw/source/core/text/frmform.cxx | |
parent | 4b363760b9f196e139ee367d54252c4d6cbe25f3 (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/text/frmform.cxx')
-rw-r--r-- | sw/source/core/text/frmform.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index fd09c2632cfb..84d8785dc4d1 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -993,13 +993,13 @@ bool SwTextFrame::CalcPreps() } // We rewire the footnotes and the character bound objects -#define CHG_OFFSET( pFrame, nNew )\ - {\ - if( pFrame->GetOfst() < nNew )\ - pFrame->MoveFlyInCnt( this, TextFrameIndex(0), nNew );\ - else if( pFrame->GetOfst() > nNew )\ - MoveFlyInCnt( pFrame, nNew, TextFrameIndex(COMPLETE_STRING) );\ - } +void SwTextFrame::ChangeOffset( SwTextFrame* pFrame, TextFrameIndex nNew ) +{ + if( pFrame->GetOfst() < nNew ) + pFrame->MoveFlyInCnt( this, TextFrameIndex(0), nNew ); + else if( pFrame->GetOfst() > nNew ) + MoveFlyInCnt( pFrame, nNew, TextFrameIndex(COMPLETE_STRING) ); +} void SwTextFrame::FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak, @@ -1077,7 +1077,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine, { if( nNew && nOld < nEnd ) RemoveFootnote( nOld, nEnd - nOld ); - CHG_OFFSET( GetFollow(), nEnd ) + ChangeOffset( GetFollow(), nEnd ); if( !bDelta ) GetFollow()->ManipOfst( nEnd ); } @@ -1112,7 +1112,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine, // for the paragraph mark. nNew |= 1; } - CHG_OFFSET( GetFollow(), nEnd ) + ChangeOffset( GetFollow(), nEnd ); GetFollow()->ManipOfst( nEnd ); } else |