diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-26 10:54:03 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-30 12:13:16 +0100 |
commit | 75d4e779e408bd532ddeda2b18923806c920b4a7 (patch) | |
tree | 7c24e614b8c54d38f650b7ceb96f07beeeb446f8 /sw/source/core/layout/hffrm.cxx | |
parent | f6edddfa230d6478571ef67ebdc506c54f589648 (diff) |
Adapted to get/setSwFrame and get/setSwPrint
Change-Id: I6cce40ec49dd5bd32d94fe06b9d2dabd368448be
Diffstat (limited to 'sw/source/core/layout/hffrm.cxx')
-rw-r--r-- | sw/source/core/layout/hffrm.cxx | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index 1b43d3b4009f..1f99057c639a 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -61,12 +61,12 @@ static SwTwips lcl_CalcContentHeight(SwLayoutFrame & frm) { SwTwips nTmp; - nTmp = pFrame->FrameRA().Height(); + nTmp = pFrame->getSwFrame().Height(); nRemaining += nTmp; if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) { nTmp = static_cast<SwTextFrame*>(pFrame)->GetParHeight() - - pFrame->PrintRA().Height(); + - pFrame->getSwPrint().Height(); // This TextFrame would like to be a bit bigger nRemaining += nTmp; } @@ -85,9 +85,9 @@ static void lcl_LayoutFrameEnsureMinHeight(SwLayoutFrame & rFrame) { SwTwips nMinHeight = lcl_GetFrameMinHeight(rFrame); - if (rFrame.FrameRA().Height() < nMinHeight) + if (rFrame.getSwFrame().Height() < nMinHeight) { - rFrame.Grow(nMinHeight - rFrame.FrameRA().Height()); + rFrame.Grow(nMinHeight - rFrame.getSwFrame().Height()); } } @@ -111,7 +111,7 @@ SwHeadFootFrame::SwHeadFootFrame( SwFrameFormat * pFormat, SwFrame* pSib, SwFram void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) { - SwRect aPrt(PrintRA()); + SwRect aPrt(getSwPrint()); if (GetEatSpacing()) { @@ -185,13 +185,13 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) aPrt.Top(nSpace); } - aPrt.Width(FrameRA().Width() - nLR); + aPrt.Width(getSwFrame().Width() - nLR); SwTwips nNewHeight; - if (nUL < FrameRA().Height()) + if (nUL < getSwFrame().Height()) { - nNewHeight = FrameRA().Height() - nUL; + nNewHeight = getSwFrame().Height() - nUL; } else { @@ -210,12 +210,12 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) // subtract the borders. // OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)> SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this ); - aPrt.Width ( FrameRA().Width() - nLR ); - aPrt.Height( FrameRA().Height()- nUL ); + aPrt.Width ( getSwFrame().Width() - nLR ); + aPrt.Height( getSwFrame().Height()- nUL ); } - setPrint(aPrt); + setSwPrint(aPrt); mbValidPrtArea = true; } @@ -246,14 +246,14 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) do { - nOldHeight = PrintRA().Height(); + nOldHeight = getSwPrint().Height(); SwFrame* pFrame = Lower(); // #i64301# if ( pFrame && - aOldFooterPrtPos != ( FrameRA().Pos() + PrintRA().Pos() ) ) + aOldFooterPrtPos != ( getSwFrame().Pos() + getSwPrint().Pos() ) ) { pFrame->InvalidatePos_(); - aOldFooterPrtPos = FrameRA().Pos() + PrintRA().Pos(); + aOldFooterPrtPos = getSwFrame().Pos() + getSwPrint().Pos(); } int nLoopControl = 0; while( pFrame ) @@ -290,13 +290,13 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) while ( pFrame ) { - nRemaining += pFrame->FrameRA().Height(); + nRemaining += pFrame->getSwFrame().Height(); if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) // This TextFrame would like to be a bit bigger nRemaining += static_cast<SwTextFrame*>(pFrame)->GetParHeight() - - pFrame->PrintRA().Height(); + - pFrame->getSwPrint().Height(); else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() ) nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize(); @@ -373,24 +373,24 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) else break; // Don't overwrite the lower edge of the upper - if ( GetUpper() && FrameRA().Height() ) + if ( GetUpper() && getSwFrame().Height() ) { - const SwTwips nDeadLine = GetUpper()->FrameRA().Top() + GetUpper()->PrintRA().Bottom(); - const SwTwips nBot = FrameRA().Bottom(); + const SwTwips nDeadLine = GetUpper()->getSwFrame().Top() + GetUpper()->getSwPrint().Bottom(); + const SwTwips nBot = getSwFrame().Bottom(); if ( nBot > nDeadLine ) { - SwRect aFrm(FrameRA()); + SwRect aFrm(getSwFrame()); aFrm.Bottom( nDeadLine ); - setFrame(aFrm); + setSwFrame(aFrm); - SwRect aPrt(PrintRA()); - aPrt.SSize().Height() = FrameRA().Height() - nBorder; - setPrint(aPrt); + SwRect aPrt(getSwPrint()); + aPrt.SSize().Height() = getSwFrame().Height() - nBorder; + setSwPrint(aPrt); } } mbValidSize = mbValidPrtArea = true; - } while( nRemaining<=nMaxHeight && nOldHeight!=PrintRA().Height() ); + } while( nRemaining<=nMaxHeight && nOldHeight!=getSwPrint().Height() ); ColUnlock(); } mbValidSize = mbValidPrtArea = true; @@ -399,8 +399,8 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs) { do { - if ( FrameRA().Height() != pAttrs->GetSize().Height() ) - ChgSize( Size( FrameRA().Width(), pAttrs->GetSize().Height())); + if ( getSwFrame().Height() != pAttrs->GetSize().Height() ) + ChgSize( Size( getSwFrame().Width(), pAttrs->GetSize().Height())); mbValidSize = true; MakePos(); } while ( !mbValidSize ); @@ -460,9 +460,9 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) /* calculate maximum eatable spacing */ if (IsHeaderFrame()) - nMaxEat = FrameRA().Height() - PrintRA().Top() - PrintRA().Height() - pAttrs->CalcBottomLine(); + nMaxEat = getSwFrame().Height() - getSwPrint().Top() - getSwPrint().Height() - pAttrs->CalcBottomLine(); else - nMaxEat = PrintRA().Top() - pAttrs->CalcTopLine(); + nMaxEat = getSwPrint().Top() - pAttrs->CalcTopLine(); if (nMaxEat < 0) nMaxEat = 0; @@ -470,7 +470,7 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) /* If the frame is too small, eat less spacing thus letting the frame grow more. */ SwTwips nMinHeight = lcl_GetFrameMinHeight(*this); - SwTwips nFrameTooSmall = nMinHeight - FrameRA().Height(); + SwTwips nFrameTooSmall = nMinHeight - getSwFrame().Height(); if (nFrameTooSmall > 0) nEat -= nFrameTooSmall; @@ -491,10 +491,10 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) { if (! IsHeaderFrame()) { - SwRect aPrt(PrintRA()); + SwRect aPrt(getSwPrint()); aPrt.Top(aPrt.Top() - nEat); aPrt.Height(aPrt.Height() - nEat); - setPrint(aPrt); + setSwPrint(aPrt); } InvalidateAll(); @@ -550,7 +550,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) nResult = 0; SwTwips nMinHeight = lcl_GetFrameMinHeight(*this); - SwTwips nOldHeight = FrameRA().Height(); + SwTwips nOldHeight = getSwFrame().Height(); SwTwips nRest = 0; // Amount to shrink by spitting out spacing if ( nOldHeight >= nMinHeight ) @@ -596,7 +596,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) SwTwips nShrink = nRest; /* calculate maximum shrinking */ - SwTwips nMaxShrink = PrintRA().Height() - nMinPrtHeight; + SwTwips nMaxShrink = getSwPrint().Height() - nMinPrtHeight; /* shrink no more than maximum shrinking */ if (nShrink > nMaxShrink) @@ -609,10 +609,10 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) { if (! IsHeaderFrame() ) { - SwRect aPrt(PrintRA()); + SwRect aPrt(getSwPrint()); aPrt.Top(aPrt.Top() + nShrink); aPrt.Height(aPrt.Height() - nShrink); - setPrint(aPrt); + setSwPrint(aPrt); } InvalidateAll(); |