summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-05-05 20:56:07 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-05-06 09:06:25 +0200
commit5f51b6f08c6ed6fb135b8d4999d6fb6a51fafa89 (patch)
treed1e28da0c7489435da6b33ab89cafcab00a490a5 /sw/source
parent6af7691518f24835d600c692bff1dcd66f5e0ced (diff)
Replace magic numbers in SwPageFrame::UpdateAttr_()
By using the same SwPageFrameInvFlags constants that SwPageFrame::SwClientNotify() already does. Change-Id: Ic07ce518901890367ce95080bf2a588697b8990b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115156 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/layout/pagechg.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 6f1992cd5a2a..d699d59ecb80 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -602,19 +602,19 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
SwLayoutFrame *pB = FindBodyCont();
assert(pB && "Page without Body.");
pB->ChgColumns( rOldCol, rNewCol );
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x20);
+ rInvFlags |= SwPageFrameInvFlags::CheckGrid;
}
// 2. header and footer:
const SwFormatHeader &rOldH = pOldFormat->GetHeader();
const SwFormatHeader &rNewH = pNewFormat->GetHeader();
if( rOldH != rNewH )
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x08);
+ rInvFlags |= SwPageFrameInvFlags::PrepareHeader;
const SwFormatFooter &rOldF = pOldFormat->GetFooter();
const SwFormatFooter &rNewF = pNewFormat->GetFooter();
if( rOldF != rNewF )
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x10);
+ rInvFlags |= SwPageFrameInvFlags::PrepareFooter;
CheckDirChange();
[[fallthrough]];
@@ -665,9 +665,9 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
pSh->InvalidateWindows( aOldRectWithBorderAndShadow );
}
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x03);
+ rInvFlags |= SwPageFrameInvFlags::InvalidatePrt | SwPageFrameInvFlags::SetCompletePaint;
if ( aOldPageFrameRect.Height() != getFrameArea().Height() )
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x04);
+ rInvFlags |= SwPageFrameInvFlags::InvalidateNextPos;
}
break;
@@ -678,19 +678,19 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
SwLayoutFrame *pB = FindBodyCont();
assert(pB); //page without body
pB->ChgColumns( *static_cast<const SwFormatCol*>(pOld), *static_cast<const SwFormatCol*>(pNew) );
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x22);
+ rInvFlags |= SwPageFrameInvFlags::SetCompletePaint | SwPageFrameInvFlags::CheckGrid;
}
break;
case RES_HEADER:
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x08);
+ rInvFlags |= SwPageFrameInvFlags::PrepareHeader;
break;
case RES_FOOTER:
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x10);
+ rInvFlags |= SwPageFrameInvFlags::PrepareFooter;
break;
case RES_TEXTGRID:
- rInvFlags |= static_cast<SwPageFrameInvFlags>(0x60);
+ rInvFlags |= SwPageFrameInvFlags::CheckGrid | SwPageFrameInvFlags::InvalidateGrid;
break;
case RES_FRAMEDIR :
CheckDirChange();