summaryrefslogtreecommitdiffstats
path: root/sw/source/core/layout/wsfrm.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-25 13:46:44 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-30 12:13:13 +0100
commit94cf44656492e408ef6c7f6e18deffe519f22018 (patch)
treead2b58c382245cc3d45b6a85a209f0d339143f38 /sw/source/core/layout/wsfrm.cxx
parentloplugin:constantparam in svx (diff)
downloadcore-94cf44656492e408ef6c7f6e18deffe519f22018.tar.gz
core-94cf44656492e408ef6c7f6e18deffe519f22018.zip
Isolated SwFrame members maFrane and maPrt
To gain more control over changes of the Writer layout, isolated mentioned members and replaced all calls with inline methods for read and/or write access. Moved to own class to also identify 'private' accesses reliably. Change-Id: Ib0b7f852f5176744e860e2aad12dd13c9a906d68
Diffstat (limited to 'sw/source/core/layout/wsfrm.cxx')
-rw-r--r--sw/source/core/layout/wsfrm.cxx369
1 files changed, 194 insertions, 175 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 4ed44df2f38b..7bbbf608a879 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -53,9 +53,16 @@
using namespace ::com::sun::star;
-SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib ) :
+SwFrameRect::SwFrameRect()
+: maFrameRect(),
+ maPrintRect()
+{
+}
+
+SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib )
+: SwFrameRect(),
SwClient( pMod ),
- mbInDtor(false),
+ SfxBroadcaster(),
mnFrameId( SwFrame::mnLastFrameId++ ),
mpRoot( pSib ? pSib->getRootFrame() : nullptr ),
mpUpper(nullptr),
@@ -63,21 +70,33 @@ SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib ) :
mpPrev(nullptr),
mpDrawObjs(nullptr),
mnFrameType(SwFrameType::None),
+ mbInDtor(false),
+ mbReverse(false),
+ mbInvalidR2L(true),
+ mbDerivedR2L(false),
+ mbRightToLeft(false),
+ mbInvalidVert(true),
+ mbDerivedVert(false),
+ mbVertical(false),
+ mbVertLR(false),
+ mbValidPos(false),
+ mbValidPrtArea(false),
+ mbValidSize(false),
+ mbValidLineNum(false),
+ mbFixSize(false),
+ mbCompletePaint(true),
+ mbRetouche(false),
+ mbInfInvalid(true),
mbInfBody( false ),
mbInfTab ( false ),
mbInfFly ( false ),
mbInfFootnote ( false ),
- mbInfSct ( false )
- , m_isInDestroy(false)
+ mbInfSct ( false ),
+ mbColLocked(false),
+ m_isInDestroy(false),
+ mbForbidDelete(false)
{
OSL_ENSURE( pMod, "No frame format given." );
- mbInvalidR2L = mbInvalidVert = true;
- mbDerivedR2L = mbDerivedVert = mbRightToLeft = mbVertical = mbReverse = mbVertLR = false;
-
- mbValidPos = mbValidPrtArea = mbValidSize = mbValidLineNum = mbRetouche =
- mbFixSize = mbColLocked = false;
- mbCompletePaint = mbInfInvalid = true;
- mbForbidDelete = false;
}
const IDocumentDrawModelAccess& SwFrame::getIDocumentDrawModelAccess()
@@ -444,7 +463,7 @@ void SwFrame::InvalidatePage( const SwPageFrame *pPage ) const
Size SwFrame::ChgSize( const Size& aNewSize )
{
mbFixSize = true;
- const Size aOldSize( Frame().SSize() );
+ const Size aOldSize( FrameRA().SSize() );
if ( aNewSize == aOldSize )
return aOldSize;
@@ -455,19 +474,19 @@ Size SwFrame::ChgSize( const Size& aNewSize )
fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert );
SwRect aNew( Point(0,0), aNewSize );
- (maFrame.*fnRect->fnSetWidth)( (aNew.*fnRect->fnGetWidth)() );
+ (FrameWA().*fnRect->fnSetWidth)( (aNew.*fnRect->fnGetWidth)() );
long nNew = (aNew.*fnRect->fnGetHeight)();
- long nDiff = nNew - (maFrame.*fnRect->fnGetHeight)();
+ long nDiff = nNew - (FrameRA().*fnRect->fnGetHeight)();
if( nDiff )
{
if ( GetUpper()->IsFootnoteBossFrame() && HasFixSize() &&
SwNeighbourAdjust::GrowShrink !=
static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment() )
{
- (maFrame.*fnRect->fnSetHeight)( nNew );
+ (FrameWA().*fnRect->fnSetHeight)( nNew );
SwTwips nReal = static_cast<SwLayoutFrame*>(this)->AdjustNeighbourhood(nDiff);
if ( nReal != nDiff )
- (maFrame.*fnRect->fnSetHeight)( nNew - nDiff + nReal );
+ (FrameWA().*fnRect->fnSetHeight)( nNew - nDiff + nReal );
}
else
{
@@ -480,21 +499,21 @@ Size SwFrame::ChgSize( const Size& aNewSize )
else
Shrink( -nDiff );
- if ( GetUpper() && (maFrame.*fnRect->fnGetHeight)() != nNew )
+ if ( GetUpper() && (FrameRA().*fnRect->fnGetHeight)() != nNew )
GetUpper()->InvalidateSize_();
}
// Even if grow/shrink did not yet set the desired width, for
// example when called by ChgColumns to set the column width, we
// set the right width now.
- (maFrame.*fnRect->fnSetHeight)( nNew );
+ (FrameWA().*fnRect->fnSetHeight)( nNew );
}
}
}
else
- maFrame.SSize( aNewSize );
+ FrameWA().SSize( aNewSize );
- if ( Frame().SSize() != aOldSize )
+ if ( FrameRA().SSize() != aOldSize )
{
SwPageFrame *pPage = FindPageFrame();
if ( GetNext() )
@@ -514,7 +533,7 @@ Size SwFrame::ChgSize( const Size& aNewSize )
InvalidatePage( pPage );
}
- return maFrame.SSize();
+ return FrameRA().SSize();
}
/** Insert SwFrame into existing structure.
@@ -754,10 +773,10 @@ void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
pNxt->Prepare( PREP_FTN, nullptr, false );
}
- if ( Frame().Height() )
- pParent->Grow( Frame().Height() );
+ if ( FrameRA().Height() )
+ pParent->Grow( FrameRA().Height() );
- if ( Frame().Width() != pParent->Prt().Width() )
+ if ( FrameRA().Width() != pParent->PrintRA().Width() )
Prepare( PREP_FIXSIZE_CHG );
if ( GetPrev() )
@@ -767,8 +786,8 @@ void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
static_cast<SwContentFrame*>(GetPrev())->Prepare( PREP_FOLLOW_FOLLOWS );
else
{
- if ( GetPrev()->Frame().Height() !=
- GetPrev()->Prt().Height() + GetPrev()->Prt().Top() )
+ if ( GetPrev()->FrameRA().Height() !=
+ GetPrev()->PrintRA().Height() + GetPrev()->PrintRA().Top() )
{
// Take the border into account?
GetPrev()->InvalidatePrt_();
@@ -991,7 +1010,7 @@ void SwContentFrame::Cut()
else
{
SwRectFnSet aRectFnSet(this);
- long nFrameHeight = aRectFnSet.GetHeight(Frame());
+ long nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if( nFrameHeight )
pUp->Shrink( nFrameHeight );
}
@@ -1044,7 +1063,7 @@ void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
else
fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- if( (Frame().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)())
+ if( (FrameRA().*fnRect->fnGetWidth)() != (pParent->PrintRA().*fnRect->fnGetWidth)())
InvalidateSize_();
InvalidatePos_();
const SwPageFrame *pPage = FindPageFrame();
@@ -1072,14 +1091,14 @@ void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
}
}
- if( (Frame().*fnRect->fnGetHeight)() )
+ if( (FrameRA().*fnRect->fnGetHeight)() )
{
// AdjustNeighbourhood is now also called in columns which are not
// placed inside a frame
SwNeighbourAdjust nAdjust = GetUpper()->IsFootnoteBossFrame() ?
static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment()
: SwNeighbourAdjust::GrowShrink;
- SwTwips nGrow = (Frame().*fnRect->fnGetHeight)();
+ SwTwips nGrow = (FrameRA().*fnRect->fnGetHeight)();
if( SwNeighbourAdjust::OnlyAdjust == nAdjust )
AdjustNeighbourhood( nGrow );
else
@@ -1101,7 +1120,7 @@ void SwLayoutFrame::Cut()
GetNext()->InvalidatePos_();
SwRectFnSet aRectFnSet(this);
- SwTwips nShrink = aRectFnSet.GetHeight(Frame());
+ SwTwips nShrink = aRectFnSet.GetHeight(FrameRA());
// Remove first, then shrink upper.
SwLayoutFrame *pUp = GetUpper();
@@ -1126,10 +1145,10 @@ void SwLayoutFrame::Cut()
nReal = -AdjustNeighbourhood( -nShrink );
if( nReal < nShrink )
{
- SwTwips nOldHeight = aRectFnSet.GetHeight(Frame());
- aRectFnSet.SetHeight( Frame(), 0 );
+ SwTwips nOldHeight = aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.SetHeight( FrameWA(), 0 );
nReal += pUp->Shrink( nShrink - nReal );
- aRectFnSet.SetHeight( Frame(), nOldHeight );
+ aRectFnSet.SetHeight( FrameWA(), nOldHeight );
}
if( SwNeighbourAdjust::GrowAdjust == nAdjust && nReal < nShrink )
AdjustNeighbourhood( nReal - nShrink );
@@ -1162,7 +1181,7 @@ SwTwips SwFrame::Grow( SwTwips nDist, bool bTst, bool bInfo )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nPrtHeight = aRectFnSet.GetHeight(Prt());
+ SwTwips nPrtHeight = aRectFnSet.GetHeight(PrintRA());
if( nPrtHeight > 0 && nDist > (LONG_MAX - nPrtHeight) )
nDist = LONG_MAX - nPrtHeight;
@@ -1186,8 +1205,8 @@ SwTwips SwFrame::Grow( SwTwips nDist, bool bTst, bool bInfo )
const SwTwips nReal = GrowFrame( nDist, bTst, bInfo );
if( !bTst )
{
- nPrtHeight = aRectFnSet.GetHeight(Prt());
- aRectFnSet.SetHeight( Prt(), nPrtHeight +
+ nPrtHeight = aRectFnSet.GetHeight(PrintRA());
+ aRectFnSet.SetHeight( PrintWA(), nPrtHeight +
( IsContentFrame() ? nDist : nReal ) );
}
return nReal;
@@ -1222,13 +1241,13 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo )
}
SwRectFnSet aRectFnSet(this);
- SwTwips nReal = aRectFnSet.GetHeight(Frame());
+ SwTwips nReal = aRectFnSet.GetHeight(FrameRA());
ShrinkFrame( nDist, bTst, bInfo );
- nReal -= aRectFnSet.GetHeight(Frame());
+ nReal -= aRectFnSet.GetHeight(FrameRA());
if( !bTst )
{
- const SwTwips nPrtHeight = aRectFnSet.GetHeight(Prt());
- aRectFnSet.SetHeight( Prt(), nPrtHeight -
+ const SwTwips nPrtHeight = aRectFnSet.GetHeight(PrintRA());
+ aRectFnSet.SetHeight( PrintWA(), nPrtHeight -
( IsContentFrame() ? nDist : nReal ) );
}
return nReal;
@@ -1281,9 +1300,9 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
SwViewShell *pViewShell = getRootFrame()->GetCurrShell();
SwLayoutFrame *pUp = GetUpper();
long nChg;
- const long nUpPrtBottom = pUp->Frame().Height() -
- pUp->Prt().Height() - pUp->Prt().Top();
- SwRect aInva( pUp->Frame() );
+ const long nUpPrtBottom = pUp->FrameRA().Height() -
+ pUp->PrintRA().Height() - pUp->PrintRA().Top();
+ SwRect aInva( pUp->FrameRA() );
if ( pViewShell )
{
aInva.Pos().X() = pViewShell->VisArea().Left();
@@ -1291,20 +1310,20 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
}
if ( nDiff > 0 )
{
- nChg = BROWSE_HEIGHT - pUp->Frame().Height();
+ nChg = BROWSE_HEIGHT - pUp->FrameRA().Height();
nChg = std::min( nDiff, nChg );
if ( !IsBodyFrame() )
{
SetCompletePaint();
- if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->Frame().Height() )
+ if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->FrameRA().Height() )
{
//First minimize Body, it will grow again later.
SwFrame *pBody = static_cast<SwFootnoteBossFrame*>(pUp)->FindBodyCont();
- const long nTmp = nChg - pBody->Prt().Height();
+ const long nTmp = nChg - pBody->PrintRA().Height();
if ( !bTst )
{
- pBody->Frame().Height(std::max( 0L, pBody->Frame().Height() - nChg ));
+ pBody->FrameWA().Height(std::max( 0L, pBody->FrameRA().Height() - nChg ));
pBody->InvalidatePrt_();
pBody->InvalidateSize_();
if ( pBody->GetNext() )
@@ -1327,10 +1346,10 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
nChg = nDiff;
long nInvaAdd = 0;
if ( pViewShell && !pUp->GetPrev() &&
- pUp->Frame().Height() + nDiff < pViewShell->VisArea().Height() )
+ pUp->FrameRA().Height() + nDiff < pViewShell->VisArea().Height() )
{
// This means that we have to invalidate adequately.
- nChg = pViewShell->VisArea().Height() - pUp->Frame().Height();
+ nChg = pViewShell->VisArea().Height() - pUp->FrameRA().Height();
nInvaAdd = -(nDiff - nChg);
}
@@ -1357,8 +1376,8 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
}
if ( !bTst && nChg )
{
- pUp->Frame().SSize().Height() += nChg;
- pUp->Prt().SSize().Height() += nChg;
+ pUp->FrameWA().SSize().Height() += nChg;
+ pUp->PrintWA().SSize().Height() += nChg;
if ( pViewShell )
pViewShell->Imp()->SetFirstVisPageInvalid();
@@ -1369,7 +1388,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
SvxBrushItem aBack(pUp->GetFormat()->makeBackgroundBrushItem());
const SvxGraphicPosition ePos = aBack.GetGraphicPos();
if ( ePos != GPOS_NONE && ePos != GPOS_TILED )
- pViewShell->InvalidateWindows( pUp->Frame() );
+ pViewShell->InvalidateWindows( pUp->FrameRA() );
if ( pUp->GetUpper() )
{
@@ -1380,18 +1399,18 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
//its Lower may be called. The values should not be changed
//because the caller takes care of the adjustment of Frame and
//Prt.
- const long nOldFrameHeight = Frame().Height();
- const long nOldPrtHeight = Prt().Height();
+ const long nOldFrameHeight = FrameRA().Height();
+ const long nOldPrtHeight = PrintRA().Height();
const bool bOldComplete = IsCompletePaint();
if ( IsBodyFrame() )
- Prt().SSize().Height() = nOldFrameHeight;
+ PrintWA().SSize().Height() = nOldFrameHeight;
if ( pUp->GetUpper() )
static_cast<SwRootFrame*>(pUp->GetUpper())->CheckViewLayout( nullptr, nullptr );
//static_cast<SwPageFrame*>(pUp)->AdjustRootSize( CHG_CHGPAGE, &aOldRect );
- Frame().SSize().Height() = nOldFrameHeight;
- Prt().SSize().Height() = nOldPrtHeight;
+ FrameWA().SSize().Height() = nOldFrameHeight;
+ PrintWA().SSize().Height() = nOldPrtHeight;
mbCompletePaint = bOldComplete;
}
if ( !IsBodyFrame() )
@@ -1428,14 +1447,14 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
{
if( !pFootnote->GetAttr()->GetFootnote().IsEndNote() )
{
- nMinH += aRectFnSet.GetHeight(pFootnote->Frame());
+ nMinH += aRectFnSet.GetHeight(pFootnote->FrameRA());
bFootnote = true;
}
pFootnote = static_cast<SwFootnoteFrame*>(pFootnote->GetNext());
}
if( bFootnote )
- nMinH += aRectFnSet.GetTop(pCont->Prt());
- nReal = aRectFnSet.GetHeight(pCont->Frame()) - nMinH;
+ nMinH += aRectFnSet.GetTop(pCont->PrintRA());
+ nReal = aRectFnSet.GetHeight(pCont->FrameRA()) - nMinH;
if( nReal > nDiff )
nReal = nDiff;
if( nReal > 0 )
@@ -1461,7 +1480,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
return 0;
//If not one is found, everything else is solved.
- nReal = aRectFnSet.GetHeight(pFrame->Frame());
+ nReal = aRectFnSet.GetHeight(pFrame->FrameRA());
if( nReal > nDiff )
nReal = nDiff;
if( !bFootnotePage )
@@ -1480,15 +1499,15 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
{
//If the Body doesn't return enough, we look for a footnote, if
//there is one, we steal there accordingly.
- const SwTwips nAddMax = aRectFnSet.GetHeight(pFrame->GetNext()->Frame());
+ const SwTwips nAddMax = aRectFnSet.GetHeight(pFrame->GetNext()->FrameRA());
nAdd = nDiff - nReal;
if ( nAdd > nAddMax )
nAdd = nAddMax;
if ( !bTst )
{
- aRectFnSet.SetHeight(pFrame->GetNext()->Frame(), nAddMax-nAdd);
+ aRectFnSet.SetHeight(pFrame->GetNext()->FrameWA(), nAddMax-nAdd);
if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && !aRectFnSet.IsRev() )
- pFrame->GetNext()->Frame().Pos().X() += nAdd;
+ pFrame->GetNext()->FrameWA().Pos().X() += nAdd;
pFrame->GetNext()->InvalidatePrt();
if ( pFrame->GetNext()->GetNext() )
pFrame->GetNext()->GetNext()->InvalidatePos_();
@@ -1499,10 +1518,10 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if ( !bTst && nReal )
{
- SwTwips nTmp = aRectFnSet.GetHeight(pFrame->Frame());
- aRectFnSet.SetHeight( pFrame->Frame(), nTmp - nReal );
+ SwTwips nTmp = aRectFnSet.GetHeight(pFrame->FrameRA());
+ aRectFnSet.SetHeight( pFrame->FrameWA(), nTmp - nReal );
if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && !aRectFnSet.IsRev() )
- pFrame->Frame().Pos().X() += nReal;
+ pFrame->FrameWA().Pos().X() += nReal;
pFrame->InvalidatePrt();
if ( pFrame->GetNext() )
pFrame->GetNext()->InvalidatePos_();
@@ -1655,9 +1674,9 @@ void SwFrame::ReinitializeFrameSizeAttrFlags()
else if ( rFormatSize.GetHeightSizeType() == ATT_FIX_SIZE )
{
if( IsVertical() )
- ChgSize( Size( rFormatSize.GetWidth(), Frame().Height()));
+ ChgSize( Size( rFormatSize.GetWidth(), FrameRA().Height()));
else
- ChgSize( Size( Frame().Width(), rFormatSize.GetHeight()));
+ ChgSize( Size( FrameRA().Width(), rFormatSize.GetHeight()));
}
}
@@ -1709,7 +1728,7 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nFrameHeight = aRectFnSet.GetHeight(Frame());
+ SwTwips nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if( nFrameHeight > 0 &&
nDist > (LONG_MAX - nFrameHeight ) )
nDist = LONG_MAX - nFrameHeight;
@@ -1723,9 +1742,9 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if ( !bTst )
{
- aRectFnSet.SetHeight( Frame(), nFrameHeight + nDist );
+ aRectFnSet.SetHeight( FrameWA(), nFrameHeight + nDist );
if( IsVertical() && !IsVertLR() && !IsReverse() )
- Frame().Pos().X() -= nDist;
+ FrameWA().Pos().X() -= nDist;
if ( GetNext() )
{
GetNext()->InvalidatePos();
@@ -1743,20 +1762,20 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
return 0;
}
- SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->Prt());
+ SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->PrintRA());
SwFrame *pFrame = GetUpper()->Lower();
while( pFrame && nReal > 0 )
- { nReal -= aRectFnSet.GetHeight(pFrame->Frame());
+ { nReal -= aRectFnSet.GetHeight(pFrame->FrameRA());
pFrame = pFrame->GetNext();
}
if ( !bTst )
{
//Contents are always resized to the wished value.
- long nOld = aRectFnSet.GetHeight(Frame());
- aRectFnSet.SetHeight( Frame(), nOld + nDist );
+ long nOld = aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.SetHeight( FrameWA(), nOld + nDist );
if( IsVertical()&& !IsVertLR() && !IsReverse() )
- Frame().Pos().X() -= nDist;
+ FrameWA().Pos().X() -= nDist;
SwTabFrame *pTab = (nOld && IsInTab()) ? FindTabFrame() : nullptr;
if (pTab)
{
@@ -1814,14 +1833,14 @@ SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SwRectFnSet aRectFnSet(this);
OSL_ENSURE( nDist >= 0, "nDist < 0" );
- OSL_ENSURE( nDist <= aRectFnSet.GetHeight(Frame()),
+ OSL_ENSURE( nDist <= aRectFnSet.GetHeight(FrameRA()),
"nDist > than current size." );
if ( !bTst )
{
SwTwips nRstHeight;
if( GetUpper() )
- nRstHeight = aRectFnSet.BottomDist( Frame(), aRectFnSet.GetPrtBottom(*GetUpper()) );
+ nRstHeight = aRectFnSet.BottomDist( FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()) );
else
nRstHeight = 0;
if( nRstHeight < 0 )
@@ -1832,7 +1851,7 @@ SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
SwFrame *pNxt = GetNext();
while( pNxt )
{
- nNextHeight += aRectFnSet.GetHeight(pNxt->Frame());
+ nNextHeight += aRectFnSet.GetHeight(pNxt->FrameRA());
pNxt = pNxt->GetNext();
}
}
@@ -1840,9 +1859,9 @@ SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
}
else
nRstHeight = nDist;
- aRectFnSet.SetHeight( Frame(), aRectFnSet.GetHeight(Frame()) - nDist );
+ aRectFnSet.SetHeight( FrameWA(), aRectFnSet.GetHeight(FrameRA()) - nDist );
if( IsVertical() && !IsVertLR() )
- Frame().Pos().X() += nDist;
+ FrameWA().Pos().X() += nDist;
nDist = nRstHeight;
SwTabFrame *pTab = IsInTab() ? FindTabFrame() : nullptr;
if (pTab)
@@ -1874,7 +1893,7 @@ SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
// #109722# : The fix for #108745# was too strict.
bool bInvalidate = true;
- const SwRect aRect( Frame() );
+ const SwRect aRect( FrameRA() );
const SwPageFrame* pPage = FindPageFrame();
const SwSortedObjs* pSorted = pPage ? pPage->GetSortedObjs() : nullptr;
if( pSorted )
@@ -2015,7 +2034,7 @@ void SwContentFrame::UpdateAttr_( const SfxPoolItem* pOld, const SfxPoolItem* pN
CheckPageDescs( pPage );
if ( GetAttrSet()->GetPageDesc().GetNumOffset() )
static_cast<SwRootFrame*>(pPage->GetUpper())->SetVirtPageNum( true );
- SwDocPosUpdate aMsgHint( pPage->Frame().Top() );
+ SwDocPosUpdate aMsgHint( pPage->FrameRA().Top() );
pPage->GetFormat()->GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
break;
@@ -2169,8 +2188,8 @@ SwTwips SwLayoutFrame::InnerHeight() const
{
SwTwips nTmp = static_cast<const SwLayoutFrame*>(pCnt)->InnerHeight();
if( pCnt->GetValidPrtAreaFlag() )
- nTmp += aRectFnSet.GetHeight(pCnt->Frame()) -
- aRectFnSet.GetHeight(pCnt->Prt());
+ nTmp += aRectFnSet.GetHeight(pCnt->FrameRA()) -
+ aRectFnSet.GetHeight(pCnt->PrintRA());
if( nRet < nTmp )
nRet = nTmp;
pCnt = pCnt->GetNext();
@@ -2180,13 +2199,13 @@ SwTwips SwLayoutFrame::InnerHeight() const
{
do
{
- nRet += aRectFnSet.GetHeight(pCnt->Frame());
+ nRet += aRectFnSet.GetHeight(pCnt->FrameRA());
if( pCnt->IsContentFrame() && static_cast<const SwTextFrame*>(pCnt)->IsUndersized() )
nRet += static_cast<const SwTextFrame*>(pCnt)->GetParHeight() -
- aRectFnSet.GetHeight(pCnt->Prt());
+ aRectFnSet.GetHeight(pCnt->PrintRA());
if( pCnt->IsLayoutFrame() && !pCnt->IsTabFrame() )
nRet += static_cast<const SwLayoutFrame*>(pCnt)->InnerHeight() -
- aRectFnSet.GetHeight(pCnt->Prt());
+ aRectFnSet.GetHeight(pCnt->PrintRA());
pCnt = pCnt->GetNext();
} while( pCnt );
@@ -2205,8 +2224,8 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
return 0;
SwRectFnSet aRectFnSet(this);
- const SwTwips nFrameHeight = aRectFnSet.GetHeight(Frame());
- const SwTwips nFramePos = Frame().Pos().X();
+ const SwTwips nFrameHeight = aRectFnSet.GetHeight(FrameRA());
+ const SwTwips nFramePos = FrameRA().Pos().X();
if ( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) )
nDist = LONG_MAX - nFrameHeight;
@@ -2216,23 +2235,23 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SwFrame *pFrame = GetUpper()->Lower();
while( pFrame )
- { nMin += aRectFnSet.GetHeight(pFrame->Frame());
+ { nMin += aRectFnSet.GetHeight(pFrame->FrameRA());
pFrame = pFrame->GetNext();
}
- nMin = aRectFnSet.GetHeight(GetUpper()->Prt()) - nMin;
+ nMin = aRectFnSet.GetHeight(GetUpper()->PrintRA()) - nMin;
if ( nMin < 0 )
nMin = 0;
}
- SwRect aOldFrame( Frame() );
+ SwRect aOldFrame( FrameRA() );
bool bMoveAccFrame = false;
bool bChgPos = IsVertical() && !IsReverse();
if ( !bTst )
{
- aRectFnSet.SetHeight( Frame(), nFrameHeight + nDist );
+ aRectFnSet.SetHeight( FrameWA(), nFrameHeight + nDist );
if( bChgPos && !IsVertLR() )
- Frame().Pos().X() -= nDist;
+ FrameWA().Pos().X() -= nDist;
bMoveAccFrame = true;
}
@@ -2281,10 +2300,10 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
SwTwips nSpace = bTst ? 0 : -nDist;
const SwFrame *pFrame = GetUpper()->Lower();
do
- { nSpace += aRectFnSet.GetHeight(pFrame->Frame());
+ { nSpace += aRectFnSet.GetHeight(pFrame->FrameRA());
pFrame = pFrame->GetNext();
} while ( pFrame != GetNext() );
- nSpace = aRectFnSet.GetHeight(GetUpper()->Prt()) -nSpace;
+ nSpace = aRectFnSet.GetHeight(GetUpper()->PrintRA()) -nSpace;
if ( nSpace < 0 )
nSpace = 0;
nSpace += nGrow;
@@ -2311,9 +2330,9 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
// NEW TABLES
( !IsCellFrame() || static_cast<SwCellFrame*>(this)->GetLayoutRowSpan() > 1 ) )
{
- aRectFnSet.SetHeight( Frame(), nFrameHeight + nReal );
+ aRectFnSet.SetHeight( FrameWA(), nFrameHeight + nReal );
if( bChgPos && !IsVertLR() )
- Frame().Pos().X() = nFramePos - nReal;
+ FrameWA().Pos().X() = nFramePos - nReal;
bMoveAccFrame = true;
}
@@ -2383,7 +2402,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
OSL_ENSURE( nDist >= 0, "nDist < 0" );
SwRectFnSet aRectFnSet(this);
- SwTwips nFrameHeight = aRectFnSet.GetHeight(Frame());
+ SwTwips nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if ( nDist > nFrameHeight )
nDist = nFrameHeight;
@@ -2393,29 +2412,29 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if( !Lower()->IsNeighbourFrame() )
{ const SwFrame *pFrame = Lower();
- const long nTmp = aRectFnSet.GetHeight(Prt());
+ const long nTmp = aRectFnSet.GetHeight(PrintRA());
while( pFrame && nMin < nTmp )
- { nMin += aRectFnSet.GetHeight(pFrame->Frame());
+ { nMin += aRectFnSet.GetHeight(pFrame->FrameRA());
pFrame = pFrame->GetNext();
}
}
}
SwTwips nReal = nDist;
- SwTwips nMinDiff = aRectFnSet.GetHeight(Prt()) - nMin;
+ SwTwips nMinDiff = aRectFnSet.GetHeight(PrintRA()) - nMin;
if( nReal > nMinDiff )
nReal = nMinDiff;
if( nReal <= 0 )
return nDist;
- SwRect aOldFrame( Frame() );
+ SwRect aOldFrame( FrameRA() );
bool bMoveAccFrame = false;
SwTwips nRealDist = nReal;
if ( !bTst )
{
- aRectFnSet.SetHeight( Frame(), nFrameHeight - nReal );
+ aRectFnSet.SetHeight( FrameWA(), nFrameHeight - nReal );
if( bChgPos && !IsVertLR() )
- Frame().Pos().X() += nReal;
+ FrameWA().Pos().X() += nReal;
bMoveAccFrame = true;
}
@@ -2433,10 +2452,10 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
nReal *= -1;
if ( !bTst && IsBodyFrame() && nReal < nRealDist )
{
- aRectFnSet.SetHeight( Frame(), aRectFnSet.GetHeight(Frame())
+ aRectFnSet.SetHeight( FrameWA(), aRectFnSet.GetHeight(FrameRA())
+ nRealDist - nReal );
if( bChgPos && !IsVertLR() )
- Frame().Pos().X() += nRealDist - nReal;
+ FrameWA().Pos().X() += nRealDist - nReal;
OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" );
}
}
@@ -2446,10 +2465,10 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
SwTwips nTmp = GetUpper()->Shrink( nReal, bTst, bInfo );
if ( nTmp != nReal )
{
- aRectFnSet.SetHeight( Frame(), aRectFnSet.GetHeight(Frame())
+ aRectFnSet.SetHeight( FrameWA(), aRectFnSet.GetHeight(FrameRA())
+ nReal - nTmp );
if( bChgPos && !IsVertLR() )
- Frame().Pos().X() += nTmp - nReal;
+ FrameWA().Pos().X() += nTmp - nReal;
OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" );
nReal = nTmp;
}
@@ -2563,8 +2582,8 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
SwFrame *pLowerFrame = Lower();
// declare and init const booleans <bHeightChgd> and <bWidthChg>
- const bool bHeightChgd = rOldSize.Height() != Prt().Height();
- const bool bWidthChgd = rOldSize.Width() != Prt().Width();
+ const bool bHeightChgd = rOldSize.Height() != PrintRA().Height();
+ const bool bWidthChgd = rOldSize.Width() != PrintRA().Width();
SwRectFnSet aRectFnSet(this);
@@ -2631,7 +2650,7 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
// Check, if variable size of body frame resp. section frame has grown
// OD 28.10.2002 #97265# - correct check, if variable size has grown.
SwTwips nOldHeight = aRectFnSet.IsVert() ? rOldSize.Width() : rOldSize.Height();
- if( nOldHeight < aRectFnSet.GetHeight(Prt()) )
+ if( nOldHeight < aRectFnSet.GetHeight(PrintRA()) )
{
// If variable size of body|section frame has grown, only found
// last lower and the position of the its next have to be invalidated.
@@ -2650,8 +2669,8 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
// and the dedicated new last lower.
if( aRectFnSet.IsVert() )
{
- SwTwips nBot = Frame().Left() + Prt().Left();
- while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->Frame().Left() < nBot )
+ SwTwips nBot = FrameRA().Left() + PrintRA().Left();
+ while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->FrameRA().Left() < nBot )
{
pLowerFrame->InvalidateAll_();
pLowerFrame->InvalidatePage( pPage );
@@ -2660,8 +2679,8 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
}
else
{
- SwTwips nBot = Frame().Top() + Prt().Bottom();
- while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->Frame().Top() > nBot )
+ SwTwips nBot = FrameRA().Top() + PrintRA().Bottom();
+ while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->FrameRA().Top() > nBot )
{
pLowerFrame->InvalidateAll_();
pLowerFrame->InvalidatePage( pPage );
@@ -2756,7 +2775,7 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
// In horizontal layout set width of header, footer,
// foot note container, foot note, body and no-text
// frames to its upper width.
- pLowerFrame->Frame().Width( Prt().Width() );
+ pLowerFrame->FrameWA().Width( PrintRA().Width() );
}
else if( rOldSize.Width() && !pLowerFrame->IsFootnoteFrame() )
{
@@ -2771,21 +2790,21 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
// Perform <double> calculation of new width, if
// one of the coefficients is greater than 50000
SwTwips nNewWidth;
- if ( (pLowerFrame->Frame().Width() > 50000) ||
- (Prt().Width() > 50000) )
+ if ( (pLowerFrame->FrameRA().Width() > 50000) ||
+ (PrintRA().Width() > 50000) )
{
double nNewWidthTmp =
- ( double(pLowerFrame->Frame().Width())
- * double(Prt().Width()) )
+ ( double(pLowerFrame->FrameRA().Width())
+ * double(PrintRA().Width()) )
/ double(rOldSize.Width());
nNewWidth = SwTwips(nNewWidthTmp);
}
else
{
nNewWidth =
- (pLowerFrame->Frame().Width() * Prt().Width()) / rOldSize.Width();
+ (pLowerFrame->FrameRA().Width() * PrintRA().Width()) / rOldSize.Width();
}
- pLowerFrame->Frame().Width( nNewWidth );
+ pLowerFrame->FrameWA().Width( nNewWidth );
}
}
if ( bHeightChgd )
@@ -2797,7 +2816,7 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
// no-text frames to its upper height.
// In horizontal layout set height of column frames
// to its upper height.
- pLowerFrame->Frame().Height( Prt().Height() );
+ pLowerFrame->FrameWA().Height( PrintRA().Height() );
}
// OD 01.10.2002 #102211#
// add conditions <!pLowerFrame->IsHeaderFrame()> and
@@ -2842,18 +2861,18 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
if ( IsVertical() || pLowerFrame->IsBodyFrame() )
{
SwTwips nNewHeight =
- pLowerFrame->Frame().Height() +
- ( Prt().Height() - rOldSize.Height() );
+ pLowerFrame->FrameRA().Height() +
+ ( PrintRA().Height() - rOldSize.Height() );
if ( nNewHeight < 0)
{
// OD 01.04.2003 #108446# - adjust assertion condition and text
OSL_ENSURE( !( IsPageFrame() &&
- (pLowerFrame->Frame().Height()>0) &&
+ (pLowerFrame->FrameRA().Height()>0) &&
(pLowerFrame->IsValid()) ),
"ChgLowersProg - negative height for lower.");
nNewHeight = 0;
}
- pLowerFrame->Frame().Height( nNewHeight );
+ pLowerFrame->FrameWA().Height( nNewHeight );
}
}
}
@@ -2863,35 +2882,35 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
// OD 24.10.2002 #97265# - <double> calculation
// Perform <double> calculation of new height, if
// one of the coefficients is greater than 50000
- if ( (pLowerFrame->Frame().Height() > 50000) ||
- (Prt().Height() > 50000) )
+ if ( (pLowerFrame->FrameRA().Height() > 50000) ||
+ (PrintRA().Height() > 50000) )
{
double nNewHeightTmp =
- ( double(pLowerFrame->Frame().Height())
- * double(Prt().Height()) )
+ ( double(pLowerFrame->FrameRA().Height())
+ * double(PrintRA().Height()) )
/ double(rOldSize.Height());
nNewHeight = SwTwips(nNewHeightTmp);
}
else
{
- nNewHeight = ( pLowerFrame->Frame().Height()
- * Prt().Height() ) / rOldSize.Height();
+ nNewHeight = ( pLowerFrame->FrameRA().Height()
+ * PrintRA().Height() ) / rOldSize.Height();
}
if( !pLowerFrame->GetNext() )
{
- SwTwips nSum = Prt().Height();
+ SwTwips nSum = PrintRA().Height();
SwFrame* pTmp = Lower();
while( pTmp->GetNext() )
{
if( !pTmp->IsFootnoteContFrame() || !pTmp->IsVertical() )
- nSum -= pTmp->Frame().Height();
+ nSum -= pTmp->FrameRA().Height();
pTmp = pTmp->GetNext();
}
if( nSum - nNewHeight == 1 &&
- nSum == pLowerFrame->Frame().Height() )
+ nSum == pLowerFrame->FrameRA().Height() )
nNewHeight = nSum;
}
- pLowerFrame->Frame().Height( nNewHeight );
+ pLowerFrame->FrameWA().Height( nNewHeight );
}
}
}
@@ -2909,8 +2928,8 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
{
//If a growth took place and the subordinate elements can retouch
//itself (currently Tabs, Sections and Content) we trigger it.
- if ( rOldSize.Height() < Prt().SSize().Height() ||
- rOldSize.Width() < Prt().SSize().Width() )
+ if ( rOldSize.Height() < PrintRA().SSize().Height() ||
+ rOldSize.Width() < PrintRA().SSize().Width() )
pLowerFrame->SetRetouche();
}
pLowerFrame = pLowerFrame->GetNext();
@@ -2995,20 +3014,20 @@ void SwLayoutFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBord
SwTwips nRemaining = 0;
SwFrame *pFrame = Lower();
while ( pFrame )
- { nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)();
+ { nRemaining += (pFrame->FrameRA().*fnRect->fnGetHeight)();
if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
// This TextFrame would like to be a bit bigger
nRemaining += static_cast<SwTextFrame*>(pFrame)->GetParHeight()
- - (pFrame->Prt().*fnRect->fnGetHeight)();
+ - (pFrame->PrintRA().*fnRect->fnGetHeight)();
else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize();
pFrame = pFrame->GetNext();
}
nRemaining += nBorder;
nRemaining = std::max( nRemaining, nMinHeight );
- const SwTwips nDiff = nRemaining-(Frame().*fnRect->fnGetHeight)();
- const long nOldLeft = (Frame().*fnRect->fnGetLeft)();
- const long nOldTop = (Frame().*fnRect->fnGetTop)();
+ const SwTwips nDiff = nRemaining-(FrameRA().*fnRect->fnGetHeight)();
+ const long nOldLeft = (FrameRA().*fnRect->fnGetLeft)();
+ const long nOldTop = (FrameRA().*fnRect->fnGetTop)();
if ( nDiff )
{
if ( nDiff > 0 )
@@ -3019,12 +3038,12 @@ void SwLayoutFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBord
MakePos();
}
//Don't exceed the bottom edge of the Upper.
- if ( GetUpper() && (Frame().*fnRect->fnGetHeight)() )
+ if ( GetUpper() && (FrameRA().*fnRect->fnGetHeight)() )
{
const SwTwips nLimit = (GetUpper()->*fnRect->fnGetPrtBottom)();
if( (this->*fnRect->fnSetLimit)( nLimit ) &&
- nOldLeft == (Frame().*fnRect->fnGetLeft)() &&
- nOldTop == (Frame().*fnRect->fnGetTop)() )
+ nOldLeft == (FrameRA().*fnRect->fnGetLeft)() &&
+ nOldTop == (FrameRA().*fnRect->fnGetTop)() )
mbValidSize = mbValidPrtArea = true;
}
} while ( !mbValidSize );
@@ -3032,8 +3051,8 @@ void SwLayoutFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBord
else if (GetType() & FRM_HEADFOOT)
{
do
- { if ( Frame().Height() != pAttrs->GetSize().Height() )
- ChgSize( Size( Frame().Width(), pAttrs->GetSize().Height()));
+ { if ( FrameRA().Height() != pAttrs->GetSize().Height() )
+ ChgSize( Size( FrameRA().Width(), pAttrs->GetSize().Height()));
mbValidSize = true;
MakePos();
} while ( !mbValidSize );
@@ -3073,8 +3092,8 @@ static void InvaPercentFlys( SwFrame *pFrame, SwTwips nDiff )
// not allow the text to go through...
// then a notifycation could cause an endless loop, e.g.
// 100% height and no text wrap inside a cell of a table.
- if( pFly->Frame().Height()*10 >
- ( nDiff + pRel->Prt().Height() )*9 &&
+ if( pFly->FrameRA().Height()*10 >
+ ( nDiff + pRel->PrintRA().Height() )*9 &&
pFly->GetFormat()->GetSurround().GetSurround() !=
css::text::WrapTextMode_THROUGH )
bNotify = false;
@@ -3129,11 +3148,11 @@ long SwLayoutFrame::CalcRel( const SwFormatFrameSize &rSz ) const
if( pRel->IsPageBodyFrame() && pSh && bBrowseMode && pSh->VisArea().Width() )
{
nRel = pSh->GetBrowseWidth();
- long nDiff = nRel - pRel->Prt().Width();
+ long nDiff = nRel - pRel->PrintRA().Width();
if ( nDiff > 0 )
nRel -= nDiff;
}
- nRel = std::min( nRel, pRel->Prt().Width() );
+ nRel = std::min( nRel, pRel->PrintRA().Width() );
nRet = nRel * nPercent / 100;
}
return nRet;
@@ -3257,8 +3276,8 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
SwRectFnSet aRectFnSet(this);
if( IsSctFrame() )
{
- nMaximum = aRectFnSet.GetHeight(Frame()) - nBorder +
- aRectFnSet.BottomDist(Frame(), aRectFnSet.GetPrtBottom(*GetUpper()));
+ nMaximum = aRectFnSet.GetHeight(FrameRA()) - nBorder +
+ aRectFnSet.BottomDist(FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()));
nMaximum += GetUpper()->Grow( LONG_MAX, true );
if( nMaximum < nMinimum )
{
@@ -3274,13 +3293,13 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
GetBalancedColumns().GetValue();
SwFrame* pAny = ContainsAny();
if( bNoBalance ||
- ( !aRectFnSet.GetHeight(Frame()) && pAny ) )
+ ( !aRectFnSet.GetHeight(FrameRA()) && pAny ) )
{
long nTop = aRectFnSet.GetTopMargin(*this);
// #i23129# - correction
// to the calculated maximum height.
- aRectFnSet.AddBottom( Frame(), nMaximum -
- aRectFnSet.GetHeight(Frame()) );
+ aRectFnSet.AddBottom( FrameWA(), nMaximum -
+ aRectFnSet.GetHeight(FrameRA()) );
if( nTop > nMaximum )
nTop = nMaximum;
aRectFnSet.SetYMargins( *this, nTop, 0 );
@@ -3365,8 +3384,8 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
while( pCol )
{
SwLayoutFrame* pLay = static_cast<SwLayoutFrame*>(pCol->Lower());
- SwTwips nInnerHeight = aRectFnSet.GetHeight(pLay->Frame()) -
- aRectFnSet.GetHeight(pLay->Prt());
+ SwTwips nInnerHeight = aRectFnSet.GetHeight(pLay->FrameRA()) -
+ aRectFnSet.GetHeight(pLay->PrintRA());
if( pLay->Lower() )
{
bFoundLower = true;
@@ -3381,10 +3400,10 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
pLay = static_cast<SwLayoutFrame*>(pLay->GetNext());
OSL_ENSURE( pLay->IsFootnoteContFrame(),"FootnoteContainer expected" );
nInnerHeight += pLay->InnerHeight();
- nInnerHeight += aRectFnSet.GetHeight(pLay->Frame()) -
- aRectFnSet.GetHeight(pLay->Prt());
+ nInnerHeight += aRectFnSet.GetHeight(pLay->FrameRA()) -
+ aRectFnSet.GetHeight(pLay->PrintRA());
}
- nInnerHeight -= aRectFnSet.GetHeight(pCol->Prt());
+ nInnerHeight -= aRectFnSet.GetHeight(pCol->PrintRA());
if( nInnerHeight > nDiff )
{
nDiff = nInnerHeight;
@@ -3410,7 +3429,7 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
if ( nDiff || ::lcl_IsFlyHeightClipped( this ) ||
( IsSctFrame() && static_cast<SwSectionFrame*>(this)->CalcMinDiff( nMinDiff ) ) )
{
- long nPrtHeight = aRectFnSet.GetHeight(Prt());
+ long nPrtHeight = aRectFnSet.GetHeight(PrintRA());
// The minimum must not be smaller than our PrtHeight as
// long as something juts over.
if( nMinimum < nPrtHeight )
@@ -3432,7 +3451,7 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
// minimal FrameHeight and PrtHeight is smaller than
// nMindiff we grow in a way that PrtHeight is exactly
// nMinDiff afterwards.
- long nFrameHeight = aRectFnSet.GetHeight(Frame());
+ long nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if ( nFrameHeight > nMinHeight || nPrtHeight >= nMinDiff )
nDiff = std::max( nDiff, nMinDiff );
else if( nDiff < nMinDiff )
@@ -3446,7 +3465,7 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
}
else if( nMaximum > nMinimum ) // We fit, do we still have some margin?
{
- long nPrtHeight = aRectFnSet.GetHeight(Prt());
+ long nPrtHeight = aRectFnSet.GetHeight(PrintRA());
if ( nMaximum < nPrtHeight )
nDiff = nMaximum - nPrtHeight; // We grew over a working
// height and shrink back to it, but will this ever
@@ -3481,11 +3500,11 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
}
if( nDiff ) // now we shrink or grow...
{
- Size aOldSz( Prt().SSize() );
+ Size aOldSz( PrintRA().SSize() );
long nTop = aRectFnSet.GetTopMargin(*this);
- nDiff = aRectFnSet.GetHeight(Prt()) + nDiff + nBorder -
- aRectFnSet.GetHeight(Frame());
- aRectFnSet.AddBottom( Frame(), nDiff );
+ nDiff = aRectFnSet.GetHeight(PrintRA()) + nDiff + nBorder -
+ aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.AddBottom( FrameWA(), nDiff );
// #i68520#
SwFlyFrame *pFlyFrame = dynamic_cast<SwFlyFrame*>(this);
if (pFlyFrame)
@@ -3709,7 +3728,7 @@ void SwRootFrame::InvalidateAllContent( SwInvalidateFlags nInv )
{
SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh )
- pSh->InvalidateWindows( Frame() );
+ pSh->InvalidateWindows( FrameRA() );
}
}