summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-09 15:32:40 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-10 23:35:40 +0200
commit233c94d225bc8043c5a1d4d5260e0864f6510a56 (patch)
treedf89fb91ba4a635b79f28d105227e03bc0424f8f /sw/source
parent00a1f2089bb250a8a9130109baac4d0c93adc3d0 (diff)
sw: replace some magic frame type numbers
Change-Id: I7d464cf33b0bfd29f4f6f750abcab2e59257788d
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/inc/frame.hxx4
-rw-r--r--sw/source/core/layout/findfrm.cxx3
-rw-r--r--sw/source/core/layout/frmtool.cxx3
-rw-r--r--sw/source/core/layout/hffrm.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx5
-rw-r--r--sw/source/core/layout/trvlfrm.cxx4
-rw-r--r--sw/source/core/layout/wsfrm.cxx6
7 files changed, 14 insertions, 13 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 48e44e783ce7..5db5538c2d4a 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -1152,11 +1152,11 @@ inline bool SwFrm::IsNoTxtFrm() const
}
inline bool SwFrm::IsFlowFrm() const
{
- return (GetType() & 0xCA00) != 0; //TabFrm, CntntFrm, SectionFrm
+ return (GetType() & (FRM_CNTNT|FRM_TAB|FRM_SECTION)) != 0;
}
inline bool SwFrm::IsRetoucheFrm() const
{
- return (GetType() & 0xCA40) != 0; //TabFrm, CntntFrm, SectionFrm, Ftnfrm
+ return (GetType() & (FRM_CNTNT|FRM_TAB|FRM_SECTION|FRM_FTN)) != 0;
}
inline bool SwFrm::IsAccessibleFrm() const
{
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 6552055491f3..f1aa8322f3b6 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -519,7 +519,8 @@ SwFrm* SwFrm::FindFooterOrHeader()
{
SwFrm* pRet = this;
do
- { if ( pRet->GetType() & 0x0018 ) //header and footer
+ {
+ if (pRet->GetType() & FRM_HEADFOOT) //header and footer
return pRet;
else if ( pRet->GetUpper() )
pRet = pRet->GetUpper();
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 4b15cee2b8c4..8323e1802ef6 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -583,7 +583,8 @@ SwLayNotify::~SwLayNotify()
if ( !IsLowersComplete() &&
!(pLay->GetType()&(FRM_FLY|FRM_SECTION) &&
pLay->Lower() && pLay->Lower()->IsColumnFrm()) &&
- (bPos || bNotify) && !(pLay->GetType() & 0x1823) ) //Tab, Row, FtnCont, Root, Page
+ (bPos || bNotify) &&
+ !(pLay->GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT)))
{
// #i44016# - force unlock of position of lower objects.
// #i43913# - no unlock of position of objects,
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index f85a82049297..26a87e1f11e7 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -375,7 +375,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
}
mbValidSize = mbValidPrtArea = true;
}
- else //if ( GetType() & 0x0018 )
+ else //if (GetType() & FRM_HEADFOOT)
{
do
{
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 0a771c29fdff..5e8403241071 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5402,11 +5402,10 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
const SwBorderAttrs &rAttrs ) const
{
// There's nothing (Row,Body,Ftn,Root,Column,NoTxt) need to do here
- if ( (GetType() & 0x90C5) )
+ if ((GetType() & (FRM_NOTXT|FRM_ROW|FRM_BODY|FRM_FTN|FRM_COLUMN|FRM_ROOT)))
return;
- if ( (GetType() & 0x2000) && //Cell
- !gProp.pSGlobalShell->GetViewOptions()->IsTable() )
+ if (IsCellFrm() && !gProp.pSGlobalShell->GetViewOptions()->IsTable())
return;
// #i29550#
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index deab86a7acd8..d777c3d7f807 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -828,8 +828,8 @@ static bool lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
//Otherwise I'll just refuse to leave to current area.
else if ( pCnt )
{
- const SwFrm *pUp = pStart->GetUpper(); //Head/Foot
- while ( pUp && pUp->GetUpper() && !(pUp->GetType() & 0x0018 ) )
+ const SwFrm *pUp = pStart->GetUpper();
+ while (pUp && pUp->GetUpper() && !(pUp->GetType() & FRM_HEADFOOT))
pUp = pUp->GetUpper();
bool bSame = false;
const SwFrm *pCntUp = pCnt->GetUpper();
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 50290eed2a39..6be1b86f771b 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -2323,7 +2323,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
_InvalidateAll();
InvalidatePage( pPage );
}
- if ( !(GetType() & 0x1823) ) //Tab, Row, FtnCont, Root, Page
+ if (!(GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT)))
NotifyLowerObjs();
if( IsCellFrm() )
@@ -2495,7 +2495,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
SetCompletePaint();
}
- if ( !(GetType() & 0x1823) ) //Tab, Row, FtnCont, Root, Page
+ if (!(GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT)))
NotifyLowerObjs();
if( IsCellFrm() )
@@ -2990,7 +2990,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
}
} while ( !mbValidSize );
}
- else if ( GetType() & 0x0018 )
+ else if (GetType() & FRM_HEADFOOT)
{
do
{ if ( Frm().Height() != pAttrs->GetSize().Height() )