summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-07-21 12:37:00 +0100
committerCaolán McNamara <cmc@openoffice.org>2010-07-21 12:37:00 +0100
commite86db1aa105e35c4c6f0a1315caa260fd226646b (patch)
tree79eee9f0bed8d1c025e1610877fb7e2307531c5f /sw
parent3cee04ca620a686f4b954a1067ac6c87c88de1d6 (diff)
cmcfixes77: #i113331# silence gcc warning, refactor slightly to allow better optization
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/layact.cxx26
1 files changed, 18 insertions, 8 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index b51b2efc0a51..aec3fde909f1 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1073,23 +1073,33 @@ BOOL SwLayAction::TurboAction()
|* Letzte Aenderung MA 18. Jul. 96
|*
|*************************************************************************/
-const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
+static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
+{
+ if (
+ !pFrm->IsValid() ||
+ (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom)
+ )
+ {
+ return true;
+ }
+ return false;
+}
+
+static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
{
ASSERT( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" );
- if ( !pFrm->IsValid() || pFrm->IsCompletePaint() &&
- pFrm->Frm().Top() < nBottom )
+ if (lcl_IsInvaLay(pFrm, nBottom))
return pFrm;
pFrm = ((SwLayoutFrm*)pFrm)->Lower();
while ( pFrm )
{
if ( pFrm->IsLayoutFrm() )
{
- if ( !pFrm->IsValid() || pFrm->IsCompletePaint() &&
- pFrm->Frm().Top() < nBottom )
+ if (lcl_IsInvaLay(pFrm, nBottom))
return pFrm;
const SwFrm *pTmp;
- if ( 0 != (pTmp = ::lcl_FindFirstInvaLay( pFrm, nBottom )) )
+ if ( 0 != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) )
return pTmp;
}
pFrm = pFrm->GetNext();
@@ -1097,7 +1107,7 @@ const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
return 0;
}
-const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom,
+static const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom,
const SwCntntFrm *pFirst )
{
const SwCntntFrm *pCnt = pFirst ? pFirst->GetNextCntntFrm() :
@@ -1144,7 +1154,7 @@ const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom,
}
// --> OD 2005-02-21 #i37877# - consider drawing objects
-const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
+static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
long _nBottom )
{
ASSERT( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" )