summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-09-28 22:24:42 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-09-29 12:28:38 +0200
commit0439ccc3c3cac6d8c1d6fe5943998bf4ba82b6df (patch)
tree522f14def58899c3ed44eaa0ec008c7da1c0f6c8
parent7a761c0ae392ed122cee689adc5a006996539dc0 (diff)
sw: inline trivial IS_INVAFLY macro
Change-Id: Ie7e9c0ed522eff7a8b1de2595468b7999d70a1b9
-rw-r--r--sw/source/core/layout/layact.cxx23
1 files changed, 9 insertions, 14 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index c6f8f1023788..e0ebc69ca6d3 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -59,10 +59,6 @@
#include <objectformatter.hxx>
#include <vector>
-// SwLayAction static stuff
-
-#define IS_INVAFLY (pPage->IsInvalidFly())
-
// Save some typing work to avoid accessing destroyed pages.
#define XCHECKPAGE \
{ if ( IsAgain() ) \
@@ -518,7 +514,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
XCHECKPAGE;
while ( !IsInterrupt() && !IsNextCycle() &&
- ((pPage->GetSortedObjs() && IS_INVAFLY) || pPage->IsInvalid()) )
+ ((pPage->GetSortedObjs() && pPage->IsInvalidFly()) || pPage->IsInvalid()) )
{
unlockPositionOfObjects( pPage );
@@ -532,7 +528,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// change condition
while ( !IsInterrupt() && !IsNextCycle() &&
( pPage->IsInvalid() ||
- (pPage->GetSortedObjs() && IS_INVAFLY) ) )
+ (pPage->GetSortedObjs() && pPage->IsInvalidFly()) ) )
{
PROTOCOL( pPage, PROT::FileInit, DbgAction::NONE, nullptr)
XCHECKPAGE;
@@ -557,7 +553,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// change condition
if ( !IsNextCycle() &&
( pPage->IsInvalidContent() ||
- (pPage->GetSortedObjs() && IS_INVAFLY) ) )
+ (pPage->GetSortedObjs() && pPage->IsInvalidFly()) ) )
{
pPage->ValidateFlyInCnt();
pPage->ValidateContent();
@@ -623,7 +619,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// Continue to the next invalid page
while ( pPage && !pPage->IsInvalid() &&
- (!pPage->GetSortedObjs() || !IS_INVAFLY) )
+ (!pPage->GetSortedObjs() || !pPage->IsInvalidFly()) )
{
pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
@@ -702,8 +698,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
const int nLoopControlMax = 20;
// special case: interrupt content formatting
- // conditions are incorrect (macro IS_INVAFLY only
- // works for <pPage>) and are too strict.
+ // conditions are incorrect and are too strict.
// adjust interrupt formatting to normal page formatting - see above.
while ( ( mbFormatContentOnInterrupt &&
( pPg->IsInvalid() ||
@@ -815,7 +810,7 @@ bool SwLayAction::TurboAction_( const SwContentFrame *pCnt )
return false;
}
- if ( pPage->IsInvalidLayout() || (pPage->GetSortedObjs() && IS_INVAFLY) )
+ if ( pPage->IsInvalidLayout() || (pPage->GetSortedObjs() && pPage->IsInvalidFly()) )
return false;
}
if ( !pPage )
@@ -1654,7 +1649,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
if ( ( IsInterrupt() && !mbFormatContentOnInterrupt ) ||
( !bBrowse && pPage->IsInvalidLayout() ) ||
// consider interrupt formatting
- ( pPage->GetSortedObjs() && IS_INVAFLY && !mbFormatContentOnInterrupt )
+ ( pPage->GetSortedObjs() && pPage->IsInvalidFly() && !mbFormatContentOnInterrupt )
)
return false;
}
@@ -1702,7 +1697,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
nBottom, pContent );
if ( !pTmp )
{
- if ( (!(pPage->GetSortedObjs() && IS_INVAFLY) ||
+ if ( (!(pPage->GetSortedObjs() && pPage->IsInvalidFly()) ||
!lcl_FindFirstInvaObj( pPage, nBottom )) &&
(!pPage->IsInvalidLayout() ||
!lcl_FindFirstInvaLay( pPage, nBottom )))
@@ -1752,7 +1747,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
nBottom, pContent );
if ( !pTmp )
{
- if ( (!(pPage->GetSortedObjs() && IS_INVAFLY) ||
+ if ( (!(pPage->GetSortedObjs() && pPage->IsInvalidFly()) ||
!lcl_FindFirstInvaObj( pPage, nBottom )) &&
(!pPage->IsInvalidLayout() ||
!lcl_FindFirstInvaLay( pPage, nBottom )))