diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-26 14:55:41 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-30 12:13:17 +0100 |
commit | 3444a3086c8fe8966953434a7fbe76802df8a149 (patch) | |
tree | d57600acfdd778f1487f3079094b25d2998ecb37 /sw/source/core/layout/hffrm.cxx | |
parent | 75d4e779e408bd532ddeda2b18923806c920b4a7 (diff) |
Adapted to get methods and WriteAccess helpers
Change-Id: Ife3c1b2391ad7beae8c7f31f796b1454709ddd26
Diffstat (limited to 'sw/source/core/layout/hffrm.cxx')
-rw-r--r-- | sw/source/core/layout/hffrm.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index 1f99057c639a..6a066db2db36 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -111,8 +111,6 @@ SwHeadFootFrame::SwHeadFootFrame( SwFrameFormat * pFormat, SwFrame* pSib, SwFram void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) { - SwRect aPrt(getSwPrint()); - if (GetEatSpacing()) { /* The minimal height of the print area is the minimal height of the @@ -173,6 +171,7 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) /* set print area */ // OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)> SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this ); + SwFrameRect::PrintWriteAccess aPrt(*this); aPrt.Left(pAttrs->CalcLeft(this)); @@ -203,6 +202,7 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) else { // Set position + SwFrameRect::PrintWriteAccess aPrt(*this); aPrt.Left( pAttrs->CalcLeft( this ) ); aPrt.Top ( pAttrs->CalcTop() ); @@ -212,10 +212,8 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this ); aPrt.Width ( getSwFrame().Width() - nLR ); aPrt.Height( getSwFrame().Height()- nUL ); - } - setSwPrint(aPrt); mbValidPrtArea = true; } @@ -380,13 +378,11 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) if ( nBot > nDeadLine ) { - SwRect aFrm(getSwFrame()); + SwFrameRect::FrameWriteAccess aFrm(*this); aFrm.Bottom( nDeadLine ); - setSwFrame(aFrm); - SwRect aPrt(getSwPrint()); + SwFrameRect::PrintWriteAccess aPrt(*this); aPrt.SSize().Height() = getSwFrame().Height() - nBorder; - setSwPrint(aPrt); } } mbValidSize = mbValidPrtArea = true; @@ -491,10 +487,9 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { if (! IsHeaderFrame()) { - SwRect aPrt(getSwPrint()); + SwFrameRect::PrintWriteAccess aPrt(*this); aPrt.Top(aPrt.Top() - nEat); aPrt.Height(aPrt.Height() - nEat); - setSwPrint(aPrt); } InvalidateAll(); @@ -609,10 +604,9 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) { if (! IsHeaderFrame() ) { - SwRect aPrt(getSwPrint()); + SwFrameRect::PrintWriteAccess aPrt(*this); aPrt.Top(aPrt.Top() + nShrink); aPrt.Height(aPrt.Height() - nShrink); - setSwPrint(aPrt); } InvalidateAll(); |