summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
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
parent6f45913394a931f2053c7b1cba52bdfd79a3093b (diff)
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')
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx10
-rw-r--r--sw/source/core/layout/anchoredobject.cxx12
-rw-r--r--sw/source/core/layout/atrfrm.cxx14
-rw-r--r--sw/source/core/layout/calcmove.cxx262
-rw-r--r--sw/source/core/layout/colfrm.cxx18
-rw-r--r--sw/source/core/layout/dbg_lay.cxx24
-rw-r--r--sw/source/core/layout/findfrm.cxx20
-rw-r--r--sw/source/core/layout/flowfrm.cxx8
-rw-r--r--sw/source/core/layout/fly.cxx146
-rw-r--r--sw/source/core/layout/flycnt.cxx198
-rw-r--r--sw/source/core/layout/flyincnt.cxx10
-rw-r--r--sw/source/core/layout/flylay.cxx122
-rw-r--r--sw/source/core/layout/frmtool.cxx148
-rw-r--r--sw/source/core/layout/ftnfrm.cxx98
-rw-r--r--sw/source/core/layout/hffrm.cxx76
-rw-r--r--sw/source/core/layout/layact.cxx112
-rw-r--r--sw/source/core/layout/laycache.cxx32
-rw-r--r--sw/source/core/layout/layouter.cxx12
-rw-r--r--sw/source/core/layout/newfrm.cxx6
-rw-r--r--sw/source/core/layout/pagechg.cxx141
-rw-r--r--sw/source/core/layout/paintfrm.cxx176
-rw-r--r--sw/source/core/layout/sectfrm.cxx110
-rw-r--r--sw/source/core/layout/ssfrm.cxx128
-rw-r--r--sw/source/core/layout/tabfrm.cxx320
-rw-r--r--sw/source/core/layout/trvlfrm.cxx120
-rw-r--r--sw/source/core/layout/wsfrm.cxx369
26 files changed, 1355 insertions, 1337 deletions
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index fded8b5e3335..1487cb4a5caf 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -237,7 +237,7 @@ bool SwAnchoredDrawObject::IsOutsidePage() const
{
SwRect aTmpRect( GetObjRect() );
bOutsidePage =
- ( aTmpRect.Intersection( GetPageFrame()->Frame() ) != GetObjRect() );
+ ( aTmpRect.Intersection( GetPageFrame()->FrameRA() ) != GetObjRect() );
}
return bOutsidePage;
@@ -351,7 +351,7 @@ void SwAnchoredDrawObject::MakeObjPos()
if ( mbCaptureAfterLayoutDirChange &&
GetPageFrame() )
{
- SwRect aPageRect( GetPageFrame()->Frame() );
+ SwRect aPageRect( GetPageFrame()->FrameRA() );
SwRect aObjRect( GetObjRect() );
if ( aObjRect.Right() >= aPageRect.Right() + 10 )
{
@@ -491,7 +491,7 @@ void SwAnchoredDrawObject::MakeObjPosAnchoredAtLayout()
SetCurrRelPos( aObjPositioning.GetRelPos() );
const SwFrame* pAnchorFrame = GetAnchorFrame();
SwRectFnSet aRectFnSet(pAnchorFrame);
- const Point aAnchPos( aRectFnSet.GetPos(pAnchorFrame->Frame()) );
+ const Point aAnchPos( aRectFnSet.GetPos(pAnchorFrame->FrameRA()) );
SetObjLeft( aAnchPos.X() + GetCurrRelPos().X() );
SetObjTop( aAnchPos.Y() + GetCurrRelPos().Y() );
}
@@ -637,7 +637,7 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
tools::Rectangle aPageRect;
if (GetDrawObj()->GetRelativeWidthRelation() == text::RelOrientation::FRAME)
// Exclude margins.
- aPageRect = GetPageFrame()->Prt().SVRect();
+ aPageRect = GetPageFrame()->PrintRA().SVRect();
else
aPageRect = GetPageFrame( )->GetBoundRect( GetPageFrame()->getRootFrame()->GetCurrShell()->GetOut() ).SVRect();
nTargetWidth = aPageRect.GetWidth( ) * (*GetDrawObj( )->GetRelativeWidth());
@@ -649,7 +649,7 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
tools::Rectangle aPageRect;
if (GetDrawObj()->GetRelativeHeightRelation() == text::RelOrientation::FRAME)
// Exclude margins.
- aPageRect = GetPageFrame()->Prt().SVRect();
+ aPageRect = GetPageFrame()->PrintRA().SVRect();
else
aPageRect = GetPageFrame( )->GetBoundRect( GetPageFrame()->getRootFrame()->GetCurrShell()->GetOut() ).SVRect();
nTargetHeight = aPageRect.GetHeight( ) * (*GetDrawObj( )->GetRelativeHeight());
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 5d40c5b9600f..459eaccf9fba 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -163,12 +163,12 @@ void SwAnchoredObject::SetPageFrame( SwPageFrame* _pNewPageFrame )
SwTwips SwAnchoredObject::GetRelCharX( const SwFrame* pFrame ) const
{
- return maLastCharRect.Left() - pFrame->Frame().Left();
+ return maLastCharRect.Left() - pFrame->FrameRA().Left();
}
SwTwips SwAnchoredObject::GetRelCharY( const SwFrame* pFrame ) const
{
- return maLastCharRect.Bottom() - pFrame->Frame().Top();
+ return maLastCharRect.Bottom() - pFrame->FrameRA().Top();
}
void SwAnchoredObject::AddLastCharY( long nDiff )
@@ -783,7 +783,7 @@ bool SwAnchoredObject::OverlapsPrevColumn() const
SwRect aChkRect;
while ( pTmpColFrame )
{
- aChkRect.Union( pTmpColFrame->Frame() );
+ aChkRect.Union( pTmpColFrame->FrameRA() );
pTmpColFrame = pTmpColFrame->GetPrev();
}
bOverlapsPrevColumn = GetObjRect().IsOver( aChkRect );
@@ -805,7 +805,7 @@ Point SwAnchoredObject::GetRelPosToAnchorFrame() const
assert(GetAnchorFrame());
aRelPos = GetObjRect().Pos();
- aRelPos -= GetAnchorFrame()->Frame().Pos();
+ aRelPos -= GetAnchorFrame()->FrameRA().Pos();
return aRelPos;
}
@@ -848,12 +848,12 @@ Point SwAnchoredObject::GetRelPosToPageFrame( const bool _bFollowTextFlow,
}
if ( pFrame->IsCellFrame() )
{
- aRelPos -= ( pFrame->Frame().Pos() + pFrame->Prt().Pos() );
+ aRelPos -= ( pFrame->FrameRA().Pos() + pFrame->PrintRA().Pos() );
_obRelToTableCell = true;
}
else
{
- aRelPos -= pFrame->Frame().Pos();
+ aRelPos -= pFrame->FrameRA().Pos();
}
return aRelPos;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 7b994dbfb138..11decf4a22f2 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2686,10 +2686,10 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint )
// PROBLEM: what happens if SectionFrames overlaps multiple
// pages?
if( bPrtArea )
- aRet = pFrame->Prt();
+ aRet = pFrame->PrintRA();
else
{
- aRet = pFrame->Frame();
+ aRet = pFrame->FrameRA();
--aRet.Pos().Y();
}
pFrame = nullptr; // the rect is finished by now
@@ -2705,9 +2705,9 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint )
if( pFrame )
{
if( bPrtArea )
- aRet = pFrame->Prt();
+ aRet = pFrame->PrintRA();
else
- aRet = pFrame->Frame();
+ aRet = pFrame->FrameRA();
}
return aRet;
}
@@ -3414,13 +3414,13 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint,
if( aOrigSz.Width() != 0 && aOrigSz.Height() != 0 )
{
Point aPos( rPoint );
- Size aActSz ( pRef == pFly ? pFly->Frame().SSize() : pRef->Prt().SSize() );
+ Size aActSz ( pRef == pFly ? pFly->FrameRA().SSize() : pRef->PrintRA().SSize() );
const MapMode aSrc ( MapUnit::MapTwip );
const MapMode aDest( MapUnit::Map100thMM );
aOrigSz = OutputDevice::LogicToLogic( aOrigSz, aSrc, aDest );
aActSz = OutputDevice::LogicToLogic( aActSz, aSrc, aDest );
- aPos -= pRef->Frame().Pos();
- aPos -= pRef->Prt().Pos();
+ aPos -= pRef->FrameRA().Pos();
+ aPos -= pRef->PrintRA().Pos();
aPos = OutputDevice::LogicToLogic( aPos, aSrc, aDest );
sal_uInt32 nFlags = 0;
if ( pFly != pRef && pNd->IsGrfNode() )
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 90660e93553f..d5983173059c 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -94,24 +94,24 @@ bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool & )
}
SwRectFnSet aRectFnSet(this);
SwRectFnSet fnRectX(pNewUpper);
- if( std::abs( fnRectX.GetWidth(pNewUpper->Prt()) -
- aRectFnSet.GetWidth(GetUpper()->Prt()) ) > 1 ) {
+ if( std::abs( fnRectX.GetWidth(pNewUpper->PrintRA()) -
+ aRectFnSet.GetWidth(GetUpper()->PrintRA()) ) > 1 ) {
// In this case, only a WouldFit_ with test move is possible
nMoveAnyway = 2;
}
// OD 2004-05-26 #i25904# - do *not* move backward,
// if <nMoveAnyway> equals 3 and no space is left in new upper.
- nMoveAnyway |= BwdMoveNecessary( pOldPage, Frame() );
+ nMoveAnyway |= BwdMoveNecessary( pOldPage, FrameRA() );
{
const IDocumentSettingAccess& rIDSA = pNewPage->GetFormat()->getIDocumentSettingAccess();
SwTwips nSpace = 0;
- SwRect aRect( pNewUpper->Prt() );
- aRect.Pos() += pNewUpper->Frame().Pos();
+ SwRect aRect( pNewUpper->PrintRA() );
+ aRect.Pos() += pNewUpper->FrameRA().Pos();
const SwFrame *pPrevFrame = pNewUpper->Lower();
while ( pPrevFrame )
{
- SwTwips nNewTop = fnRectX.GetBottom(pPrevFrame->Frame());
+ SwTwips nNewTop = fnRectX.GetBottom(pPrevFrame->FrameRA());
// OD 2004-03-01 #106629#:
// consider lower spacing of last frame in a table cell
{
@@ -187,7 +187,7 @@ bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool & )
// we have a fresh multi-column section - so we really have to
// float back unless there is no space.
return pNewUpper->IsInSct() && pNewUpper->IsColBodyFrame() &&
- !fnRectX.GetWidth(pNewUpper->Prt()) &&
+ !fnRectX.GetWidth(pNewUpper->PrintRA()) &&
( pNewUpper->GetUpper()->GetPrev() ||
pNewUpper->GetUpper()->GetNext() );
}
@@ -489,7 +489,7 @@ void SwFrame::MakePos()
{
pPrv->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); // This may cause Prev to vanish!
}
- else if ( pPrv->Frame().Top() == 0 )
+ else if ( pPrv->FrameRA().Top() == 0 )
{
bUseUpper = true;
}
@@ -500,35 +500,35 @@ void SwFrame::MakePos()
SwRectFnSet aRectFnSet((IsCellFrame() && GetUpper() ? GetUpper() : this));
if ( !bUseUpper && pPrv )
{
- maFrame.Pos( pPrv->Frame().Pos() );
+ FrameWA().Pos( pPrv->FrameRA().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
bool bR2L = IsRightToLeft();
if( bR2L )
- aRectFnSet.SetPosX( maFrame, aRectFnSet.GetLeft(maFrame) -
- aRectFnSet.GetWidth(maFrame) );
+ aRectFnSet.SetPosX( FrameWA(), aRectFnSet.GetLeft(FrameRA()) -
+ aRectFnSet.GetWidth(FrameRA()) );
else
- aRectFnSet.SetPosX( maFrame, aRectFnSet.GetLeft(maFrame) +
- aRectFnSet.GetWidth(pPrv->Frame()) );
+ aRectFnSet.SetPosX( FrameWA(), aRectFnSet.GetLeft(FrameRA()) +
+ aRectFnSet.GetWidth(pPrv->FrameRA()) );
// cells may now leave their uppers
if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType && !mbReverse )
- maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + pPrv->Frame().Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() - FrameRA().Width() + pPrv->FrameRA().Width());
}
else if( aRectFnSet.IsVert() && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
- maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() + pPrv->FrameRA().Width());
else
{
if ( aRectFnSet.IsVertL2R() )
- maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() + pPrv->FrameRA().Width());
else
- maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() - FrameRA().Width());
}
}
else
- maFrame.Pos().setY(maFrame.Pos().getY() + pPrv->Frame().Height());
+ FrameWA().Pos().setY(FrameRA().Pos().getY() + pPrv->FrameRA().Height());
}
else if ( GetUpper() )
{
@@ -554,60 +554,60 @@ void SwFrame::MakePos()
pPrv = lcl_Prev( this, false );
if ( !bUseUpper && pPrv )
{
- maFrame.Pos( pPrv->Frame().Pos() );
+ FrameWA().Pos( pPrv->FrameRA().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
bool bR2L = IsRightToLeft();
if( bR2L )
- aRectFnSet.SetPosX( maFrame, aRectFnSet.GetLeft(maFrame) -
- aRectFnSet.GetWidth(maFrame) );
+ aRectFnSet.SetPosX( FrameWA(), aRectFnSet.GetLeft(FrameRA()) -
+ aRectFnSet.GetWidth(FrameRA()) );
else
- aRectFnSet.SetPosX( maFrame, aRectFnSet.GetLeft(maFrame) +
- aRectFnSet.GetWidth(pPrv->Frame()) );
+ aRectFnSet.SetPosX( FrameWA(), aRectFnSet.GetLeft(FrameRA()) +
+ aRectFnSet.GetWidth(pPrv->FrameRA()) );
// cells may now leave their uppers
if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType && !mbReverse )
- maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + pPrv->Frame().Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() - FrameRA().Width() + pPrv->FrameRA().Width());
}
else if( aRectFnSet.IsVert() && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
- maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() + pPrv->FrameRA().Width());
else
- maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() - FrameRA().Width());
}
else
- maFrame.Pos().setY(maFrame.Pos().getY() + pPrv->Frame().Height());
+ FrameWA().Pos().setY(FrameRA().Pos().getY() + pPrv->FrameRA().Height());
}
else
{
- maFrame.Pos( GetUpper()->Frame().Pos() );
+ FrameWA().Pos( GetUpper()->FrameRA().Pos() );
if( GetUpper()->IsFlyFrame() )
- maFrame.Pos() += static_cast<SwFlyFrame*>(GetUpper())->ContentPos();
+ FrameWA().Pos() += static_cast<SwFlyFrame*>(GetUpper())->ContentPos();
else
- maFrame.Pos() += GetUpper()->Prt().Pos();
+ FrameWA().Pos() += GetUpper()->PrintRA().Pos();
if( FRM_NEIGHBOUR & nMyType && IsRightToLeft() )
{
if( aRectFnSet.IsVert() )
- maFrame.Pos().setY(maFrame.Pos().getY() + GetUpper()->Prt().Height()
- - maFrame.Height());
+ FrameWA().Pos().setY(FrameRA().Pos().getY() + GetUpper()->PrintRA().Height()
+ - FrameRA().Height());
else
- maFrame.Pos().setX(maFrame.Pos().getX() + GetUpper()->Prt().Width()
- - maFrame.Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() + GetUpper()->PrintRA().Width()
+ - FrameRA().Width());
}
else if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && FRM_NOTE_VERT & nMyType && !mbReverse )
- maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + GetUpper()->Prt().Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() - FrameRA().Width() + GetUpper()->PrintRA().Width());
}
}
else
{
- maFrame.Pos().setX(0);
- maFrame.Pos().setY(0);
+ FrameWA().Pos().setX(0);
+ FrameWA().Pos().setY(0);
}
if( IsBodyFrame() && aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && !mbReverse && GetUpper() )
- maFrame.Pos().setX(maFrame.Pos().getX() + GetUpper()->Prt().Width() - maFrame.Width());
+ FrameWA().Pos().setX(FrameRA().Pos().getX() + GetUpper()->PrintRA().Width() - FrameRA().Width());
mbValidPos = true;
}
}
@@ -625,13 +625,13 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrame* pFrame,
if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj);
- if( pFly->Frame().Top() != FAR_AWAY &&
+ if( pFly->FrameRA().Top() != FAR_AWAY &&
( pFrame->IsPageFrame() ? pFly->IsFlyLayFrame() :
( pFly->IsFlyAtContentFrame() &&
( pFrame->IsBodyFrame() ? pFly->GetAnchorFrame()->IsInDocBody() :
pFly->GetAnchorFrame()->IsInFootnote() ) ) ) )
{
- nTmp = pFly->Frame().Bottom();
+ nTmp = pFly->FrameRA().Bottom();
}
}
else
@@ -648,7 +648,7 @@ size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const
"SwPageFrame::GetContentHeight(): No support for columns.");
// In pages without columns, the content defines the size.
- long nBot = Frame().Top() + nTop;
+ long nBot = FrameRA().Top() + nTop;
const SwFrame *pFrame = Lower();
while (pFrame)
{
@@ -657,13 +657,13 @@ size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const
while (pCnt && (pCnt->GetUpper() == pFrame ||
static_cast<const SwLayoutFrame*>(pFrame)->IsAnLower(pCnt)))
{
- nTmp += pCnt->Frame().Height();
+ nTmp += pCnt->FrameRA().Height();
if (pCnt->IsTextFrame() &&
static_cast<const SwTextFrame*>(pCnt)->IsUndersized())
{
// This TextFrame would like to be a bit bigger.
nTmp += static_cast<const SwTextFrame*>(pCnt)->GetParHeight()
- - pCnt->Prt().Height();
+ - pCnt->PrintRA().Height();
}
else if (pCnt->IsSctFrame())
{
@@ -679,20 +679,20 @@ size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const
if (pFrame->IsBodyFrame() &&
(!pFrame->GetValidSizeFlag() ||
!pFrame->GetValidPrtAreaFlag()) &&
- (pFrame->Frame().Height() < pFrame->Prt().Height())
+ (pFrame->FrameRA().Height() < pFrame->PrintRA().Height())
)
{
- nTmp = std::min(nTmp, pFrame->Frame().Height());
+ nTmp = std::min(nTmp, pFrame->FrameRA().Height());
}
else
{
// OD 30.10.2002 #97265# - assert invalid lower property
- OSL_ENSURE(!(pFrame->Frame().Height() < pFrame->Prt().Height()),
+ OSL_ENSURE(!(pFrame->FrameRA().Height() < pFrame->PrintRA().Height()),
"SwPageFrame::GetContentHeight(): Lower with frame height < printing height");
- nTmp += pFrame->Frame().Height() - pFrame->Prt().Height();
+ nTmp += pFrame->FrameRA().Height() - pFrame->PrintRA().Height();
}
if (!pFrame->IsBodyFrame())
- nTmp = std::min(nTmp, pFrame->Frame().Height());
+ nTmp = std::min(nTmp, pFrame->FrameRA().Height());
nBot += nTmp;
// Here we check whether paragraph anchored objects
// protrude outside the Body/FootnoteCont.
@@ -705,7 +705,7 @@ size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const
// And the page anchored ones
if (m_pSortedObjs)
lcl_CheckObjects(m_pSortedObjs, this, nBot);
- nBot -= Frame().Top();
+ nBot -= FrameRA().Top();
return nBot;
}
@@ -714,7 +714,7 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
PROTOCOL_ENTER( this, PROT::MakeAll, DbgAction::NONE, nullptr )
- const SwRect aOldRect( Frame() ); // Adjust root size
+ const SwRect aOldRect( FrameRA() ); // Adjust root size
const SwLayNotify aNotify( this ); // takes care of the notification in the dtor
std::unique_ptr<SwBorderAttrAccess> pAccess;
const SwBorderAttrs*pAttrs = nullptr;
@@ -730,9 +730,9 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( IsEmptyPage() )
{
- Frame().Width( 0 ); Prt().Width( 0 );
- Frame().Height( 0 ); Prt().Height( 0 );
- Prt().Left( 0 ); Prt().Top( 0 );
+ FrameWA().Width( 0 ); PrintWA().Width( 0 );
+ FrameWA().Height( 0 ); PrintWA().Height( 0 );
+ PrintWA().Left( 0 ); PrintWA().Top( 0 );
mbValidSize = mbValidPrtArea = true;
}
else
@@ -760,13 +760,13 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
nWidth += + 2 * aBorder.Width();
nWidth = std::max( nWidth, 2L * aBorder.Width() + 4*MM50 );
- Frame().Width( nWidth );
+ FrameWA().Width( nWidth );
SwLayoutFrame *pBody = FindBodyCont();
if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() )
{
// Columns have a fixed height
- Frame().Height( pAttrs->GetSize().Height() );
+ FrameWA().Height( pAttrs->GetSize().Height() );
}
else
{
@@ -782,13 +782,13 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
// #i35143# - Assure, that the page
// doesn't exceed the defined browse height.
- Frame().Height( std::min( nBot, BROWSE_HEIGHT ) );
+ FrameWA().Height( std::min( nBot, BROWSE_HEIGHT ) );
}
- Prt().Left ( pAttrs->CalcLeftLine() + aBorder.Width() );
- Prt().Top ( nTop );
- Prt().Width( Frame().Width() - ( Prt().Left()
+ PrintWA().Left ( pAttrs->CalcLeftLine() + aBorder.Width() );
+ PrintWA().Top ( nTop );
+ PrintWA().Width( FrameRA().Width() - ( PrintRA().Left()
+ pAttrs->CalcRightLine() + aBorder.Width() ) );
- Prt().Height( Frame().Height() - (nTop + nBottom) );
+ PrintWA().Height( FrameRA().Height() - (nTop + nBottom) );
mbValidSize = mbValidPrtArea = true;
continue;
}
@@ -809,9 +809,9 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
if (height > 0)
{
- ChgSize(Size(Frame().Width(), height));
- Prt().Top(0);
- Prt().Height(height);
+ ChgSize(Size(FrameRA().Width(), height));
+ PrintWA().Top(0);
+ PrintWA().Height(height);
mbValidSize = mbValidPrtArea = true;
continue;
@@ -825,16 +825,16 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
// Set FixSize. For pages, this is not done from Upper, but from
// the attribute.
//FIXME: This resets the size when (mbValidSize && !mbValidPrtArea).
- Frame().SSize( pAttrs->GetSize() );
+ FrameWA().SSize( pAttrs->GetSize() );
Format( pRenderContext, pAttrs );
}
}
} //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
- if ( Frame() != aOldRect && GetUpper() )
+ if ( FrameRA() != aOldRect && GetUpper() )
static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
- OSL_ENSURE( !GetUpper() || GetUpper()->Prt().Width() >= maFrame.Width(),
+ OSL_ENSURE( !GetUpper() || GetUpper()->PrintRA().Width() >= FrameRA().Width(),
"Upper (Root) must be wide enough to contain the widest page");
}
@@ -871,33 +871,33 @@ void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// Set FixSize; VarSize is set by Format() after calculating the PrtArea
mbValidPrtArea = false;
- SwTwips nPrtWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
+ SwTwips nPrtWidth = (GetUpper()->PrintRA().*fnRect->fnGetWidth)();
if( bVert && ( IsBodyFrame() || IsFootnoteContFrame() ) )
{
SwFrame* pNxt = GetPrev();
while( pNxt && !pNxt->IsHeaderFrame() )
pNxt = pNxt->GetPrev();
if( pNxt )
- nPrtWidth -= pNxt->Frame().Height();
+ nPrtWidth -= pNxt->FrameRA().Height();
pNxt = GetNext();
while( pNxt && !pNxt->IsFooterFrame() )
pNxt = pNxt->GetNext();
if( pNxt )
- nPrtWidth -= pNxt->Frame().Height();
+ nPrtWidth -= pNxt->FrameRA().Height();
}
- const long nDiff = nPrtWidth - (Frame().*fnRect->fnGetWidth)();
+ const long nDiff = nPrtWidth - (FrameRA().*fnRect->fnGetWidth)();
if( IsNeighbourFrame() && IsRightToLeft() )
- (Frame().*fnRect->fnSubLeft)( nDiff );
+ (FrameWA().*fnRect->fnSubLeft)( nDiff );
else
- (Frame().*fnRect->fnAddRight)( nDiff );
+ (FrameWA().*fnRect->fnAddRight)( nDiff );
}
else
{
// Don't leave your upper
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
- if( (Frame().*fnRect->fnOverStep)( nDeadLine ) )
+ if( (FrameRA().*fnRect->fnOverStep)( nDeadLine ) )
mbValidSize = false;
}
}
@@ -962,13 +962,13 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
if ( static_cast<SwTextFrame*>(this)->HasFollow() )
static_cast<SwTextFrame*>(this)->JoinFrame();
- if( aRectFnSet.GetHeight(Prt()) )
+ if( aRectFnSet.GetHeight(PrintRA()) )
static_cast<SwTextFrame*>(this)->HideHidden();
- Prt().Pos().setX(0);
- Prt().Pos().setY(0);
- aRectFnSet.SetWidth( Prt(), aRectFnSet.GetWidth(Frame()) );
- aRectFnSet.SetHeight( Prt(), 0 );
- nUpper = -( aRectFnSet.GetHeight(Frame()) );
+ PrintWA().Pos().setX(0);
+ PrintWA().Pos().setY(0);
+ aRectFnSet.SetWidth( PrintWA(), aRectFnSet.GetWidth(FrameRA()) );
+ aRectFnSet.SetHeight( PrintWA(), 0 );
+ nUpper = -( aRectFnSet.GetHeight(FrameRA()) );
}
else
{
@@ -1014,21 +1014,21 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
const Size aBorder = pSh->GetOut()->PixelToLogic( pSh->GetBrowseBorder() );
long nWidth = nWidthArea - 2 * ( IsVertical() ? aBorder.Height() : aBorder.Width() );
- nWidth -= aRectFnSet.GetLeft(Prt());
+ nWidth -= aRectFnSet.GetLeft(PrintRA());
nWidth -= rAttrs.CalcRightLine();
nWidth = std::max( nMinWidth, nWidth );
- aRectFnSet.SetWidth( Prt(), std::min( nWidth, aRectFnSet.GetWidth(Prt()) ) );
+ aRectFnSet.SetWidth( PrintWA(), std::min( nWidth, aRectFnSet.GetWidth(PrintRA()) ) );
}
- if ( aRectFnSet.GetWidth(Prt()) <= MINLAY )
+ if ( aRectFnSet.GetWidth(PrintRA()) <= MINLAY )
{
// The PrtArea should already be at least MINLAY wide, matching the
// minimal values of the UI
- aRectFnSet.SetWidth( Prt(), std::min( long(MINLAY), aRectFnSet.GetWidth(Frame()) ) );
- SwTwips nTmp = aRectFnSet.GetWidth(Frame()) -
- aRectFnSet.GetWidth(Prt());
- if( aRectFnSet.GetLeft(Prt()) > nTmp )
- aRectFnSet.SetLeft( Prt(), nTmp );
+ aRectFnSet.SetWidth( PrintWA(), std::min( long(MINLAY), aRectFnSet.GetWidth(FrameRA()) ) );
+ SwTwips nTmp = aRectFnSet.GetWidth(FrameRA()) -
+ aRectFnSet.GetWidth(PrintRA());
+ if( aRectFnSet.GetLeft(PrintRA()) > nTmp )
+ aRectFnSet.SetLeft( PrintWA(), nTmp );
}
// The following rules apply for VarSize:
@@ -1051,10 +1051,10 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
nLower=0;
}
- aRectFnSet.SetPosY( Prt(), (!aRectFnSet.IsVert() || mbReverse) ? nUpper : nLower);
+ aRectFnSet.SetPosY( PrintWA(), (!aRectFnSet.IsVert() || mbReverse) ? nUpper : nLower);
nUpper += nLower;
- nUpper -= aRectFnSet.GetHeight(Frame()) -
- aRectFnSet.GetHeight(Prt());
+ nUpper -= aRectFnSet.GetHeight(FrameRA()) -
+ aRectFnSet.GetHeight(PrintRA());
}
// If there's a difference between old and new size, call Grow() or
// Shrink() respectively.
@@ -1242,8 +1242,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
{
// - loop prevention
- SwRect aOldFrame_StopFormat( Frame() );
- SwRect aOldPrt_StopFormat( Prt() );
+ SwRect aOldFrame_StopFormat( FrameRA() );
+ SwRect aOldPrt_StopFormat( PrintRA() );
bool bMoveable = IsMoveable();
if (bMoveable)
{
@@ -1267,8 +1267,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
}
- aOldFramePos = aRectFnSet.GetPos(Frame());
- aOldPrtPos = aRectFnSet.GetPos(Prt());
+ aOldFramePos = aRectFnSet.GetPos(FrameRA());
+ aOldPrtPos = aRectFnSet.GetPos(PrintRA());
if ( !mbValidPos )
MakePos();
@@ -1287,15 +1287,15 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// Note: A text frame can be in such a situation, if the format is
// triggered by method call <SwCursorShell::SetCursor()> after
// loading the document.
- const SwTwips nNewFrameWidth = aRectFnSet.GetWidth(GetUpper()->Prt());
+ const SwTwips nNewFrameWidth = aRectFnSet.GetWidth(GetUpper()->PrintRA());
if ( mbValidPrtArea && nNewFrameWidth > 0 &&
- aRectFnSet.GetWidth(Frame()) == 0 &&
- aRectFnSet.GetWidth(Prt()) == 0 )
+ aRectFnSet.GetWidth(FrameRA()) == 0 &&
+ aRectFnSet.GetWidth(PrintRA()) == 0 )
{
mbValidPrtArea = false;
}
- aRectFnSet.SetWidth( Frame(), nNewFrameWidth );
+ aRectFnSet.SetWidth( FrameWA(), nNewFrameWidth );
// When a lower of a vertically aligned fly frame changes its size we need to recalculate content pos.
if( GetUpper() && GetUpper()->IsFlyFrame() &&
@@ -1307,11 +1307,11 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
if ( !mbValidPrtArea )
{
- const long nOldW = aRectFnSet.GetWidth(Prt());
+ const long nOldW = aRectFnSet.GetWidth(PrintRA());
// #i34730# - keep current frame height
- const SwTwips nOldH = aRectFnSet.GetHeight(Frame());
+ const SwTwips nOldH = aRectFnSet.GetHeight(FrameRA());
MakePrtArea( rAttrs );
- if ( nOldW != aRectFnSet.GetWidth(Prt()) )
+ if ( nOldW != aRectFnSet.GetWidth(PrintRA()) )
Prepare( PREP_FIXSIZE_CHG );
// #i34730# - check, if frame height has changed.
// If yes, send a PREP_ADJUST_FRM and invalidate the size flag to
@@ -1320,16 +1320,16 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// fit and if not, performs necessary actions.
// #i40150# - no check, if frame is undersized.
if ( mbValidSize && !IsUndersized() &&
- nOldH != aRectFnSet.GetHeight(Frame()) )
+ nOldH != aRectFnSet.GetHeight(FrameRA()) )
{
// #115759# - no PREP_ADJUST_FRM and size
// invalidation, if height decreases only by the additional
// lower space as last content of a table cell and an existing
// follow containing one line exists.
- const SwTwips nHDiff = nOldH - aRectFnSet.GetHeight(Frame());
+ const SwTwips nHDiff = nOldH - aRectFnSet.GetHeight(FrameRA());
const bool bNoPrepAdjustFrame =
nHDiff > 0 && IsInTab() && GetFollow() &&
- ( 1 == static_cast<SwTextFrame*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || aRectFnSet.GetWidth(static_cast<SwTextFrame*>(GetFollow())->Frame()) < 0 ) &&
+ ( 1 == static_cast<SwTextFrame*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || aRectFnSet.GetWidth(static_cast<SwTextFrame*>(GetFollow())->FrameRA()) < 0 ) &&
GetFollow()->CalcAddLowerSpaceAsLastInTableCell() == nHDiff;
if ( !bNoPrepAdjustFrame )
{
@@ -1348,13 +1348,13 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bool bWidow = true;
const SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*GetUpper());
if( bMoveable && !bFormatted &&
- ( GetFollow() || aRectFnSet.OverStep( Frame(), nDeadLine ) ) )
+ ( GetFollow() || aRectFnSet.OverStep( FrameRA(), nDeadLine ) ) )
{
Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
mbValidSize = bWidow = false;
}
- if( aRectFnSet.GetPos(Frame()) != aOldFramePos ||
- aRectFnSet.GetPos(Prt()) != aOldPrtPos )
+ if( aRectFnSet.GetPos(FrameRA()) != aOldFramePos ||
+ aRectFnSet.GetPos(PrintRA()) != aOldPrtPos )
{
// In this Prepare, an InvalidateSize_() might happen.
// mbValidSize becomes false and Format() gets called.
@@ -1415,19 +1415,19 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bMoveable = IsMoveable();
aRectFnSet.Refresh(this);
}
- Point aOldPos = aRectFnSet.GetPos(Frame());
+ Point aOldPos = aRectFnSet.GetPos(FrameRA());
MakePos();
- if( aOldPos != aRectFnSet.GetPos(Frame()) )
+ if( aOldPos != aRectFnSet.GetPos(FrameRA()) )
{
Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false );
if ( !mbValidSize )
{
- aRectFnSet.SetWidth( Frame(), aRectFnSet.GetWidth(GetUpper()->Prt()) );
+ aRectFnSet.SetWidth( FrameWA(), aRectFnSet.GetWidth(GetUpper()->PrintRA()) );
if ( !mbValidPrtArea )
{
- const long nOldW = aRectFnSet.GetWidth(Prt());
+ const long nOldW = aRectFnSet.GetWidth(PrintRA());
MakePrtArea( rAttrs );
- if( nOldW != aRectFnSet.GetWidth(Prt()) )
+ if( nOldW != aRectFnSet.GetWidth(PrintRA()) )
Prepare( PREP_FIXSIZE_CHG, nullptr, false );
}
if( GetFollow() )
@@ -1487,15 +1487,15 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
mbValidPos = false;
MakePos();
- aOldFramePos = aRectFnSet.GetPos(Frame());
- aOldPrtPos = aRectFnSet.GetPos(Prt());
+ aOldFramePos = aRectFnSet.GetPos(FrameRA());
+ aOldPrtPos = aRectFnSet.GetPos(PrintRA());
}
}
// - loop prevention
{
- if ( aOldFrame_StopFormat == Frame() &&
- aOldPrt_StopFormat == Prt() )
+ if ( aOldFrame_StopFormat == FrameRA() &&
+ aOldPrt_StopFormat == PrintRA() )
{
++nConsecutiveFormatsWithoutChange;
}
@@ -1514,7 +1514,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// Bottom(). This might happen with undersized TextFrames on the lower edge of a
// multi-column section
const long nPrtBottom = aRectFnSet.GetPrtBottom(*GetUpper());
- long nBottomDist = aRectFnSet.BottomDist(Frame(), nPrtBottom);
+ long nBottomDist = aRectFnSet.BottomDist(FrameRA(), nPrtBottom);
// Hide whitespace may require not to insert a new page.
SwPageFrame* pPageFrame = FindPageFrame();
@@ -1553,7 +1553,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
const bool bMoveFwdInvalid = nullptr != GetIndNext();
const bool bNxtNew =
- ( 0 == aRectFnSet.GetHeight(pNxt->Prt()) ) &&
+ ( 0 == aRectFnSet.GetHeight(pNxt->PrintRA()) ) &&
(!pNxt->IsTextFrame() ||!static_cast<SwTextFrame*>(pNxt)->IsHiddenNow());
pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut());
@@ -1581,7 +1581,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if( !bMoveable && IsInTab() )
{
- long nDiff = -aRectFnSet.BottomDist( Frame(), aRectFnSet.GetPrtBottom(*GetUpper()) );
+ long nDiff = -aRectFnSet.BottomDist( FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()) );
long nReal = GetUpper()->Grow( nDiff );
if( nReal )
continue;
@@ -1613,13 +1613,13 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
nullptr != GetNextCellLeaf() )
bDontMoveMe = false;
- if ( bDontMoveMe && aRectFnSet.GetHeight(Frame()) >
- aRectFnSet.GetHeight(GetUpper()->Prt()) )
+ if ( bDontMoveMe && aRectFnSet.GetHeight(FrameRA()) >
+ aRectFnSet.GetHeight(GetUpper()->PrintRA()) )
{
if ( !bFitPromise )
{
- SwTwips nTmp = aRectFnSet.GetHeight(GetUpper()->Prt()) -
- aRectFnSet.GetTop(Prt());
+ SwTwips nTmp = aRectFnSet.GetHeight(GetUpper()->PrintRA()) -
+ aRectFnSet.GetTop(PrintRA());
bool bSplit = !IsFwdMoveAllowed();
if ( nTmp > 0 && WouldFit( nTmp, bSplit, false ) )
{
@@ -1669,7 +1669,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
const bool bCheckForGrownBody = pOldUp->IsBodyFrame();
- const long nOldBodyHeight = aRectFnSet.GetHeight(pOldUp->Frame());
+ const long nOldBodyHeight = aRectFnSet.GetHeight(pOldUp->FrameRA());
if ( !bMovedFwd && !MoveFwd( bMakePage, false ) )
bMakePage = false;
@@ -1703,7 +1703,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// If pOldUp was a footnote frame, it has been deleted inside MoveFwd.
// Therefore we only check for growing body frames.
bMovedFwd = !bCheckForGrownBody || bMovedBwd || pOldUp == GetUpper() ||
- aRectFnSet.GetHeight(pOldUp->Frame()) <= nOldBodyHeight;
+ aRectFnSet.GetHeight(pOldUp->FrameRA()) <= nOldBodyHeight;
bFormatted = false;
if ( bMoveOrFit && GetUpper() == pOldUp )
@@ -1781,9 +1781,9 @@ void MakeNxt( SwFrame *pFrame, SwFrame *pNxt )
if ( !pNxt->GetValidSizeFlag() )
{
if( pNxt->IsVertical() )
- pNxt->Frame().Height( pNxt->GetUpper()->Prt().Height() );
+ pNxt->FrameWA().Height( pNxt->GetUpper()->PrintRA().Height() );
else
- pNxt->Frame().Width( pNxt->GetUpper()->Prt().Width() );
+ pNxt->FrameWA().Width( pNxt->GetUpper()->PrintRA().Width() );
}
static_cast<SwContentFrame*>(pNxt)->MakePrtArea( rAttrs );
pNxt->Format( pNxt->getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
@@ -1796,9 +1796,9 @@ void MakeNxt( SwFrame *pFrame, SwFrame *pNxt )
if ( !pNxt->GetValidSizeFlag() )
{
if( pNxt->IsVertical() )
- pNxt->Frame().Height( pNxt->GetUpper()->Prt().Height() );
+ pNxt->FrameWA().Height( pNxt->GetUpper()->PrintRA().Height() );
else
- pNxt->Frame().Width( pNxt->GetUpper()->Prt().Width() );
+ pNxt->FrameWA().Width( pNxt->GetUpper()->PrintRA().Width() );
}
pNxt->Format( pNxt->getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
}
@@ -1948,9 +1948,9 @@ bool SwContentFrame::WouldFit_( SwTwips nSpace,
nSecondCheck = 0;
if( pFrame->IsVertical() )
- nUpper = pFrame->Frame().Width() - pFrame->Prt().Width();
+ nUpper = pFrame->FrameRA().Width() - pFrame->PrintRA().Width();
else
- nUpper = pFrame->Frame().Height() - pFrame->Prt().Height();
+ nUpper = pFrame->FrameRA().Height() - pFrame->PrintRA().Height();
}
nSpace -= nUpper;
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index b12b03afdacf..2772caca45d4 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -294,7 +294,7 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
{
if( !Lower()->GetNext() )
{
- Lower()->ChgSize( Prt().SSize() );
+ Lower()->ChgSize( PrintRA().SSize() );
return;
}
@@ -309,11 +309,11 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
pAttr = &GetFormat()->GetCol();
if ( !bAdjustAttributes )
{
- long nAvail = (Prt().*fnRect->fnGetWidth)();
+ long nAvail = (PrintRA().*fnRect->fnGetWidth)();
for ( SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(Lower());
pCol;
pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()) )
- nAvail -= (pCol->Frame().*fnRect->fnGetWidth)();
+ nAvail -= (pCol->FrameRA().*fnRect->fnGetWidth)();
if ( !nAvail )
return;
}
@@ -321,7 +321,7 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
//The columns can now be easily adjusted.
//The widths get counted so we can give the reminder to the last one.
- SwTwips nAvail = (Prt().*fnRect->fnGetWidth)();
+ SwTwips nAvail = (PrintRA().*fnRect->fnGetWidth)();
const bool bLine = pAttr->GetLineAdj() != COLADJ_NONE;
const sal_uInt16 nMin = bLine ? sal_uInt16( 20 + ( pAttr->GetLineWidth() / 2) ) : 0;
@@ -340,11 +340,11 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
{
const SwTwips nWidth = i == (pAttr->GetNumCols() - 1) ?
nAvail :
- pAttr->CalcColWidth( i, sal_uInt16( (Prt().*fnRect->fnGetWidth)() ) );
+ pAttr->CalcColWidth( i, sal_uInt16( (PrintRA().*fnRect->fnGetWidth)() ) );
const Size aColSz = bVert ?
- Size( Prt().Width(), nWidth ) :
- Size( nWidth, Prt().Height() );
+ Size( PrintRA().Width(), nWidth ) :
+ Size( nWidth, PrintRA().Height() );
pCol->ChgSize( aColSz );
@@ -425,8 +425,8 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
nWidth = 0;
const Size aColSz = bVert ?
- Size( Prt().Width(), nWidth ) :
- Size( nWidth, Prt().Height() );
+ Size( PrintRA().Width(), nWidth ) :
+ Size( nWidth, PrintRA().Height() );
pCol->ChgSize( aColSz );
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 4e3df4b918a5..1661513ee571 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -176,7 +176,7 @@ class SwSizeEnterLeave : public SwImplEnterLeave
long nFrameHeight;
public:
SwSizeEnterLeave( const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar )
- : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameHeight( pF->Frame().Height() ) {}
+ : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameHeight( pF->FrameRA().Height() ) {}
virtual void Leave() override; // resize message
};
@@ -197,7 +197,7 @@ class SwFrameChangesLeave : public SwImplEnterLeave
SwRect aFrame;
public:
SwFrameChangesLeave( const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar )
- : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrame( pF->Frame() ) {}
+ : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrame( pF->FrameRA() ) {}
virtual void Enter() override; // no message
virtual void Leave() override; // message when resizing the Frame area
@@ -588,7 +588,7 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n
case PROT::Size: aOut.append("PROT::Size");
lcl_Start( aOut, aLayer, nAct );
aOut.append(' ');
- aOut.append(static_cast<sal_Int64>(pFrame->Frame().Height()));
+ aOut.append(static_cast<sal_Int64>(pFrame->FrameRA().Height()));
break;
case PROT::Leaf: aOut.append("SwFrame::GetPrev/NextSctLeaf");
lcl_Start( aOut, aLayer, nAct );
@@ -624,32 +624,32 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n
case PROT::FrmChanges:
{
SwRect& rFrame = *static_cast<SwRect*>(pParam);
- if( pFrame->Frame().Pos() != rFrame.Pos() )
+ if( pFrame->FrameRA().Pos() != rFrame.Pos() )
{
aOut.append("PosChg: (");
aOut.append(static_cast<sal_Int64>(rFrame.Left()));
aOut.append(", ");
aOut.append(static_cast<sal_Int64>(rFrame.Top()));
aOut.append(") -> (");
- aOut.append(static_cast<sal_Int64>(pFrame->Frame().Left()));
+ aOut.append(static_cast<sal_Int64>(pFrame->FrameRA().Left()));
aOut.append(", ");
- aOut.append(static_cast<sal_Int64>(pFrame->Frame().Top()));
+ aOut.append(static_cast<sal_Int64>(pFrame->FrameRA().Top()));
aOut.append(") ");
}
- if( pFrame->Frame().Height() != rFrame.Height() )
+ if( pFrame->FrameRA().Height() != rFrame.Height() )
{
aOut.append("Height: ");
aOut.append(static_cast<sal_Int64>(rFrame.Height()));
aOut.append(" -> ");
- aOut.append(static_cast<sal_Int64>(pFrame->Frame().Height()));
+ aOut.append(static_cast<sal_Int64>(pFrame->FrameRA().Height()));
aOut.append(" ");
}
- if( pFrame->Frame().Width() != rFrame.Width() )
+ if( pFrame->FrameRA().Width() != rFrame.Width() )
{
aOut.append("Width: ");
aOut.append(static_cast<sal_Int64>(rFrame.Width()));
aOut.append(" -> ");
- aOut.append(static_cast<sal_Int64>(pFrame->Frame().Width()));
+ aOut.append(static_cast<sal_Int64>(pFrame->FrameRA().Width()));
aOut.append(' ');
}
break;
@@ -768,7 +768,7 @@ void SwImplEnterLeave::Leave()
void SwSizeEnterLeave::Leave()
{
- nFrameHeight = pFrame->Frame().Height() - nFrameHeight;
+ nFrameHeight = pFrame->FrameRA().Height() - nFrameHeight;
SwProtocol::Record( pFrame, nFunction, DbgAction::End, &nFrameHeight );
}
@@ -790,7 +790,7 @@ void SwFrameChangesLeave::Enter()
void SwFrameChangesLeave::Leave()
{
- if( pFrame->Frame() != aFrame )
+ if( pFrame->FrameRA() != aFrame )
SwProtocol::Record( pFrame, PROT::FrmChanges, DbgAction::NONE, &aFrame );
}
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 10d9faf95928..66a01e471968 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -554,11 +554,11 @@ const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSiz
if ( !bExtend )
{
- if( !Frame().IsInside( rPt ) )
+ if( !FrameRA().IsInside( rPt ) )
return nullptr;
// skip pages above point:
- while( pPage && rPt.Y() > pPage->Frame().Bottom() )
+ while( pPage && rPt.Y() > pPage->FrameRA().Bottom() )
pPage = pPage->GetNext();
}
@@ -567,7 +567,7 @@ const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSiz
while ( pPage && !pRet )
{
- const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frame();
+ const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->FrameRA();
if ( (!pSize && rBoundRect.IsInside(rPt)) ||
(pSize && rBoundRect.IsOver(aRect)) )
@@ -583,7 +583,7 @@ const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSiz
bool SwRootFrame::IsBetweenPages(const Point& rPt) const
{
- if (!Frame().IsInside(rPt))
+ if (!FrameRA().IsInside(rPt))
return false;
// top visible page
@@ -592,15 +592,15 @@ bool SwRootFrame::IsBetweenPages(const Point& rPt) const
return false;
// skip pages above point:
- while (pPage && rPt.Y() > pPage->Frame().Bottom())
+ while (pPage && rPt.Y() > pPage->FrameRA().Bottom())
pPage = pPage->GetNext();
if (pPage &&
- rPt.X() >= pPage->Frame().Left() &&
- rPt.X() <= pPage->Frame().Right())
+ rPt.X() >= pPage->FrameRA().Left() &&
+ rPt.X() <= pPage->FrameRA().Right())
{
// Trivial case when we're right in between.
- if (!pPage->Frame().IsInside(rPt))
+ if (!pPage->FrameRA().IsInside(rPt))
return true;
// In normal mode the gap is large enough and
@@ -612,8 +612,8 @@ bool SwRootFrame::IsBetweenPages(const Point& rPt) const
if (pSh && pSh->GetViewOptions()->IsWhitespaceHidden())
{
// If we are really close to the bottom or top of a page.
- const auto toEdge = std::min(std::abs(pPage->Frame().Top() - rPt.Y()),
- std::abs(pPage->Frame().Bottom() - rPt.Y()));
+ const auto toEdge = std::min(std::abs(pPage->FrameRA().Top() - rPt.Y()),
+ std::abs(pPage->FrameRA().Bottom() - rPt.Y()));
return toEdge <= MmToTwips(2.0);
}
}
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index b7deab921ecf..0469e3992b00 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -523,7 +523,7 @@ bool SwFlowFrame::PasteTree( SwFrame *pStart, SwLayoutFrame *pParent, SwFrame *p
else
bRet = true;
- nGrowVal += aRectFnSet.GetHeight(pFloat->Frame());
+ nGrowVal += aRectFnSet.GetHeight(pFloat->FrameRA());
if ( pFloat->GetNext() )
pFloat = pFloat->GetNext();
else
@@ -1555,7 +1555,7 @@ SwTwips SwFlowFrame::GetUpperSpaceAmountConsideredForPageGrid_(
SwRectFnSet aRectFnSet(&m_rThis);
const SwTwips nBodyPrtTop = aRectFnSet.GetPrtTop(*pBodyFrame);
const SwTwips nProposedPrtTop =
- aRectFnSet.YInc( aRectFnSet.GetTop(m_rThis.Frame()),
+ aRectFnSet.YInc( aRectFnSet.GetTop(m_rThis.FrameRA()),
_nUpperSpaceWithoutGrid );
const SwTwips nSpaceAbovePrtTop =
@@ -1571,7 +1571,7 @@ SwTwips SwFlowFrame::GetUpperSpaceAmountConsideredForPageGrid_(
const SwTwips nNewUpperSpace =
aRectFnSet.YDiff( nNewPrtTop,
- aRectFnSet.GetTop(m_rThis.Frame()) );
+ aRectFnSet.GetTop(m_rThis.FrameRA()) );
nUpperSpaceAmountConsideredForPageGrid =
nNewUpperSpace - _nUpperSpaceWithoutGrid;
@@ -1915,7 +1915,7 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
// silly things...
SwRectFnSet aRectFnSet(pOldBoss);
SwSaveFootnoteHeight aHeight( pOldBoss,
- aRectFnSet.GetBottom(pOldBoss->Frame()) );
+ aRectFnSet.GetBottom(pOldBoss->FrameRA()) );
SwContentFrame* pStart = m_rThis.IsContentFrame() ?
static_cast<SwContentFrame*>(&m_rThis) : static_cast<SwLayoutFrame&>(m_rThis).ContainsContent();
OSL_ENSURE( pStart || ( m_rThis.IsTabFrame() && !static_cast<SwTabFrame&>(m_rThis).Lower() ),
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 36d74c245623..08b361376f7e 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -129,8 +129,8 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
mbRightToLeft = false;
}
- Frame().Width( rFrameSize.GetWidth() );
- Frame().Height( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrameSize.GetHeight() );
+ FrameWA().Width( rFrameSize.GetWidth() );
+ FrameWA().Height( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrameSize.GetHeight() );
// Fixed or variable Height?
if ( rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE )
@@ -151,8 +151,8 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
InsertCnt();
// Put it somewhere outside so that out document is not formatted unnecessarily often
- Frame().Pos().setX(FAR_AWAY);
- Frame().Pos().setY(FAR_AWAY);
+ FrameWA().Pos().setX(FAR_AWAY);
+ FrameWA().Pos().setY(FAR_AWAY);
}
void SwFlyFrame::Chain( SwFrame* _pAnch )
@@ -224,8 +224,8 @@ void SwFlyFrame::InsertColumns()
{
// Start off PrtArea to be as large as Frame, so that we can put in the columns
// properly. It'll adjust later on.
- Prt().Width( Frame().Width() );
- Prt().Height( Frame().Height() );
+ PrintWA().Width( FrameRA().Width() );
+ PrintWA().Height( FrameRA().Height() );
const SwFormatCol aOld; // ChgColumns() also needs an old value passed
ChgColumns( aOld, rCol );
}
@@ -386,7 +386,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
const long nBottom = aRectFnSet.GetPrtBottom(*pMaster);
while ( pInva )
{
- if( aRectFnSet.BottomDist( pInva->Frame(), nBottom ) <= 0 )
+ if( aRectFnSet.BottomDist( pInva->FrameRA(), nBottom ) <= 0 )
{
pInva->InvalidateSize();
pInva->Prepare();
@@ -525,7 +525,7 @@ SwFrame *SwFlyFrame::FindLastLower()
bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize )
{
bool bRet = false;
- SwTwips nDiffHeight = Frame().Height();
+ SwTwips nDiffHeight = FrameRA().Height();
if ( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE )
mbFixSize = m_bMinHeight = false;
else
@@ -549,14 +549,14 @@ bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize )
if ( Lower()->IsColumnFrame() )
{
const SwRect aOld( GetObjRectWithSpaces() );
- const Size aOldSz( Prt().SSize() );
- const SwTwips nDiffWidth = Frame().Width() - rFrameSize.GetWidth();
- maFrame.Height( maFrame.Height() - nDiffHeight );
- maFrame.Width ( maFrame.Width() - nDiffWidth );
+ const Size aOldSz( PrintRA().SSize() );
+ const SwTwips nDiffWidth = FrameRA().Width() - rFrameSize.GetWidth();
+ FrameWA().Height( FrameRA().Height() - nDiffHeight );
+ FrameWA().Width ( FrameRA().Width() - nDiffWidth );
// #i68520#
InvalidateObjRectWithSpaces();
- maPrt.Height( maPrt.Height() - nDiffHeight );
- maPrt.Width ( maPrt.Width() - nDiffWidth );
+ PrintWA().Height( PrintRA().Height() - nDiffHeight );
+ PrintWA().Width ( PrintRA().Width() - nDiffWidth );
ChgLowersProp( aOldSz );
::Notify( this, FindPageFrame(), aOld );
mbValidPos = false;
@@ -740,7 +740,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( RES_FMT_CHG == nWhich )
{
SwRect aNew( GetObjRectWithSpaces() );
- SwRect aOld( maFrame );
+ SwRect aOld( FrameRA() );
const SvxULSpaceItem &rUL = static_cast<const SwFormatChg*>(pOld)->pChangedFormat->GetULSpace();
aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
aOld.SSize().Height()+= rUL.GetLower();
@@ -800,7 +800,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
GetVirtDrawObj()->SetResizeProtect( rP.IsSizeProtected() );
if ( pSh )
- pSh->InvalidateWindows( Frame() );
+ pSh->InvalidateWindows( FrameRA() );
const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess();
const SdrLayerID nId = GetFormat()->GetOpaque().GetValue() ?
rIDDMA.GetHeavenId() :
@@ -838,7 +838,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
getRootFrame()->InvalidateBrowseWidth();
SwRect aNew( GetObjRectWithSpaces() );
- SwRect aOld( maFrame );
+ SwRect aOld( FrameRA() );
if (pNew)
{
if ( RES_UL_SPACE == nWhich )
@@ -880,7 +880,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
case RES_OPAQUE:
{
if ( pSh )
- pSh->InvalidateWindows( Frame() );
+ pSh->InvalidateWindows( FrameRA() );
const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess();
const SdrLayerID nId = static_cast<const SvxOpaqueItem*>(pNew)->GetValue() ?
@@ -909,12 +909,12 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
static_cast<const SwFormatURL*>(pNew)->GetMap() && static_cast<const SwFormatURL*>(pOld)->GetMap() )
{
const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
- if ( rSz.GetHeight() != Frame().Height() ||
- rSz.GetWidth() != Frame().Width() )
+ if ( rSz.GetHeight() != FrameRA().Height() ||
+ rSz.GetWidth() != FrameRA().Width() )
{
SwFormatURL aURL( GetFormat()->GetURL() );
- Fraction aScaleX( Frame().Width(), rSz.GetWidth() );
- Fraction aScaleY( Frame().Height(), rSz.GetHeight() );
+ Fraction aScaleX( FrameRA().Width(), rSz.GetWidth() );
+ Fraction aScaleY( FrameRA().Height(), rSz.GetHeight() );
aURL.GetMap()->Scale( aScaleX, aScaleY );
SwFrameFormat *pFormat = GetFormat();
pFormat->LockModify();
@@ -1068,7 +1068,7 @@ void SwFlyFrame::ChgRelPos( const Point &rNewPos )
{
if( pAutoFrame == GetAnchorFrame() )
nTmpY += pAutoFrame->GetRelPos().Y();
- nTmpY -= pAutoFrame->GetUpper()->Prt().Height();
+ nTmpY -= pAutoFrame->GetUpper()->PrintRA().Height();
pAutoFrame = pAutoFrame->GetFollow();
}
nTmpY = static_cast<SwFlyAtContentFrame*>(this)->GetRelCharY(pAutoFrame)-nTmpY;
@@ -1150,11 +1150,11 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
if ( !mbValidSize )
{
- if ( Frame().Top() == FAR_AWAY && Frame().Left() == FAR_AWAY )
+ if ( FrameRA().Top() == FAR_AWAY && FrameRA().Left() == FAR_AWAY )
{
// Remove safety switch (see SwFrame::CTor)
- Frame().Pos().setX(0);
- Frame().Pos().setY(0);
+ FrameWA().Pos().setX(0);
+ FrameWA().Pos().setY(0);
// #i68520#
InvalidateObjRectWithSpaces();
}
@@ -1193,9 +1193,9 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
if ( nRemaining < MINFLY )
nRemaining = MINFLY;
- aRectFnSet.SetHeight( Prt(), nRemaining );
- nRemaining -= aRectFnSet.GetHeight(Frame());
- aRectFnSet.AddBottom( Frame(), nRemaining + nUL );
+ aRectFnSet.SetHeight( PrintWA(), nRemaining );
+ nRemaining -= aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.AddBottom( FrameWA(), nRemaining + nUL );
// #i68520#
if ( nRemaining + nUL != 0 )
{
@@ -1210,7 +1210,7 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pShape) )
{
// The shape is a customshape: then inform it about the calculated fly size.
- Size aSize(aRectFnSet.GetWidth(Frame()), aRectFnSet.GetHeight(Frame()));
+ Size aSize(aRectFnSet.GetWidth(FrameRA()), aRectFnSet.GetHeight(FrameRA()));
pCustomShape->SuggestTextFrameSize(aSize);
// Do the calculations normally done after touching editeng text of the shape.
pCustomShape->NbcSetOutlinerParaObjectForText(nullptr, nullptr);
@@ -1225,9 +1225,9 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
nNewSize -= nUL;
if( nNewSize < MINFLY )
nNewSize = MINFLY;
- aRectFnSet.SetHeight( Prt(), nNewSize );
- nNewSize += nUL - aRectFnSet.GetHeight(Frame());
- aRectFnSet.AddBottom( Frame(), nNewSize );
+ aRectFnSet.SetHeight( PrintWA(), nNewSize );
+ nNewSize += nUL - aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.AddBottom( FrameWA(), nNewSize );
// #i68520#
if ( nNewSize != 0 )
{
@@ -1257,9 +1257,9 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
if( nNewSize < MINFLY )
nNewSize = MINFLY;
- aRectFnSet.SetWidth( Prt(), nNewSize );
- nNewSize += nLR - aRectFnSet.GetWidth(Frame());
- aRectFnSet.AddRight( Frame(), nNewSize );
+ aRectFnSet.SetWidth( PrintWA(), nNewSize );
+ nNewSize += nLR - aRectFnSet.GetWidth(FrameRA());
+ aRectFnSet.AddRight( FrameWA(), nNewSize );
// #i68520#
if ( nNewSize != 0 )
{
@@ -1342,8 +1342,8 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
{
pLast = pFrame;
if( pFrame->IsVertical() ?
- ( pFrame->GetUpper()->Prt().Height() != pFrame->Frame().Height() )
- : ( pFrame->GetUpper()->Prt().Width() != pFrame->Frame().Width() ) )
+ ( pFrame->GetUpper()->PrintRA().Height() != pFrame->FrameRA().Height() )
+ : ( pFrame->GetUpper()->PrintRA().Width() != pFrame->FrameRA().Width() ) )
{
pFrame->Prepare( PREP_FIXSIZE_CHG );
pFrame->InvalidateSize_();
@@ -1605,8 +1605,8 @@ void SwFlyFrame::MakeObjPos()
SetCurrRelPos( aObjPositioning.GetRelPos() );
SwRectFnSet aRectFnSet(GetAnchorFrame());
- maFrame.Pos( aObjPositioning.GetRelPos() );
- maFrame.Pos() += aRectFnSet.GetPos(GetAnchorFrame()->Frame());
+ FrameWA().Pos( aObjPositioning.GetRelPos() );
+ FrameWA().Pos() += aRectFnSet.GetPos(GetAnchorFrame()->FrameRA());
// #i69335#
InvalidateObjRectWithSpaces();
}
@@ -1642,7 +1642,7 @@ void SwFlyFrame::MakeContentPos( const SwBorderAttrs &rAttrs )
nMinHeight = aRectFnSet.IsVert() ? aRelSize.Width() : aRelSize.Height();
Point aNewContentPos;
- aNewContentPos = Prt().Pos();
+ aNewContentPos = PrintRA().Pos();
const SdrTextVertAdjust nAdjust = GetFormat()->GetTextVertAdjust().GetValue();
if( nAdjust != SDRTEXTVERTADJUST_TOP )
@@ -1651,7 +1651,7 @@ void SwFlyFrame::MakeContentPos( const SwBorderAttrs &rAttrs )
SwTwips nDiff = 0;
if( nContentHeight != 0)
- nDiff = aRectFnSet.GetHeight(Prt()) - nContentHeight;
+ nDiff = aRectFnSet.GetHeight(PrintRA()) - nContentHeight;
if( nDiff > 0 )
{
@@ -1697,7 +1697,7 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
SwRectFnSet aRectFnSet(this);
if ( Lower() && !IsColLocked() && !HasFixSize() )
{
- SwTwips nSize = aRectFnSet.GetHeight(Frame());
+ SwTwips nSize = aRectFnSet.GetHeight(FrameRA());
if( nSize > 0 && nDist > ( LONG_MAX - nSize ) )
nDist = LONG_MAX - nSize;
@@ -1776,7 +1776,7 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
if( Lower() && !IsColLocked() && !HasFixSize() )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nHeight = aRectFnSet.GetHeight(Frame());
+ SwTwips nHeight = aRectFnSet.GetHeight(FrameRA());
if ( nDist > nHeight )
nDist = nHeight;
@@ -1798,14 +1798,14 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
if ( !bTst )
{
SwRect aOld( GetObjRectWithSpaces() );
- aRectFnSet.SetHeight( Frame(), nHeight - nVal );
+ aRectFnSet.SetHeight( FrameWA(), nHeight - nVal );
// #i68520#
if ( nHeight - nVal != 0 )
{
InvalidateObjRectWithSpaces();
}
- nHeight = aRectFnSet.GetHeight(Prt());
- aRectFnSet.SetHeight( Prt(), nHeight - nVal );
+ nHeight = aRectFnSet.GetHeight(PrintRA());
+ aRectFnSet.SetHeight( PrintWA(), nHeight - nVal );
InvalidatePos_();
InvalidateSize();
::Notify( this, FindPageFrame(), aOld );
@@ -1895,7 +1895,7 @@ Size SwFlyFrame::ChgSize( const Size& aNewSize )
}
}
}
- if ( aAdjustedNewSize != Frame().SSize() )
+ if ( aAdjustedNewSize != FrameRA().SSize() )
{
SwFrameFormat *pFormat = GetFormat();
SwFormatFrameSize aSz( pFormat->GetFrameSize() );
@@ -1906,7 +1906,7 @@ Size SwFlyFrame::ChgSize( const Size& aNewSize )
return aSz.GetSize();
}
else
- return Frame().SSize();
+ return FrameRA().SSize();
}
bool SwFlyFrame::IsLowerOf( const SwLayoutFrame* pUpperFrame ) const
@@ -2174,7 +2174,7 @@ void SwLayoutFrame::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
{
SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj);
- if ( pFly->Frame().Left() == FAR_AWAY )
+ if ( pFly->FrameRA().Left() == FAR_AWAY )
continue;
if ( pFly->IsAnLower( this ) )
@@ -2249,11 +2249,11 @@ Size SwFlyFrame::CalcRel( const SwFormatFrameSize &rSz ) const
nRelWidth = pSh->GetBrowseWidth();
nRelHeight = pSh->VisArea().Height();
Size aBorder = pSh->GetOut()->PixelToLogic( pSh->GetBrowseBorder() );
- long nDiff = nRelWidth - pRel->Prt().Width();
+ long nDiff = nRelWidth - pRel->PrintRA().Width();
if ( nDiff > 0 )
nRelWidth -= nDiff;
nRelHeight -= 2*aBorder.Height();
- nDiff = nRelHeight - pRel->Prt().Height();
+ nDiff = nRelHeight - pRel->PrintRA().Height();
if ( nDiff > 0 )
nRelHeight -= nDiff;
}
@@ -2261,9 +2261,9 @@ Size SwFlyFrame::CalcRel( const SwFormatFrameSize &rSz ) const
// At the moment only the "== PAGE_FRAME" and "!= PAGE_FRAME" cases are handled.
// When size is a relative to page size, ignore size of SwBodyFrame.
if (rSz.GetWidthPercentRelation() != text::RelOrientation::PAGE_FRAME)
- nRelWidth = std::min( nRelWidth, pRel->Prt().Width() );
+ nRelWidth = std::min( nRelWidth, pRel->PrintRA().Width() );
if (rSz.GetHeightPercentRelation() != text::RelOrientation::PAGE_FRAME)
- nRelHeight = std::min( nRelHeight, pRel->Prt().Height() );
+ nRelHeight = std::min( nRelHeight, pRel->PrintRA().Height() );
if( !pRel->IsPageFrame() )
{
const SwPageFrame* pPage = FindPageFrame();
@@ -2271,14 +2271,14 @@ Size SwFlyFrame::CalcRel( const SwFormatFrameSize &rSz ) const
{
if (rSz.GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME)
// Ignore margins of pPage.
- nRelWidth = std::min( nRelWidth, pPage->Frame().Width() );
+ nRelWidth = std::min( nRelWidth, pPage->FrameRA().Width() );
else
- nRelWidth = std::min( nRelWidth, pPage->Prt().Width() );
+ nRelWidth = std::min( nRelWidth, pPage->PrintRA().Width() );
if (rSz.GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME)
// Ignore margins of pPage.
- nRelHeight = std::min( nRelHeight, pPage->Frame().Height() );
+ nRelHeight = std::min( nRelHeight, pPage->FrameRA().Height() );
else
- nRelHeight = std::min( nRelHeight, pPage->Prt().Height() );
+ nRelHeight = std::min( nRelHeight, pPage->PrintRA().Height() );
}
}
@@ -2334,8 +2334,8 @@ static SwTwips lcl_CalcAutoWidth( const SwLayoutFrame& rFrame )
const SwPageFrame* pPage = rFrame.FindPageFrame();
// auto width table
nMin = pFrame->GetUpper()->IsVertical() ?
- pPage->Prt().Height() :
- pPage->Prt().Width();
+ pPage->PrintRA().Height() :
+ pPage->PrintRA().Width();
}
else
{
@@ -2490,7 +2490,7 @@ const SwFrameFormat& SwFlyFrame::GetFrameFormat() const
const SwRect SwFlyFrame::GetObjRect() const
{
- return Frame();
+ return FrameRA();
}
// #i70122#
@@ -2503,17 +2503,17 @@ const SwRect SwFlyFrame::GetObjBoundRect() const
// #i68520#
bool SwFlyFrame::SetObjTop_( const SwTwips _nTop )
{
- const bool bChanged( Frame().Pos().getY() != _nTop );
+ const bool bChanged( FrameRA().Pos().getY() != _nTop );
- Frame().Pos().setY(_nTop);
+ FrameWA().Pos().setY(_nTop);
return bChanged;
}
bool SwFlyFrame::SetObjLeft_( const SwTwips _nLeft )
{
- const bool bChanged( Frame().Pos().getX() != _nLeft );
+ const bool bChanged( FrameRA().Pos().getX() != _nLeft );
- Frame().Pos().setX(_nLeft);
+ FrameWA().Pos().setX(_nLeft);
return bChanged;
}
@@ -2572,18 +2572,18 @@ SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips
if ( Lower()->IsColumnFrame() )
{
FormatWidthCols( *pAttrs, nUL, nMinHeight );
- nHeight = aRectFnSet.GetHeight(Lower()->Frame());
+ nHeight = aRectFnSet.GetHeight(Lower()->FrameRA());
}
else
{
SwFrame *pFrame = Lower();
while ( pFrame )
{
- nHeight += aRectFnSet.GetHeight(pFrame->Frame());
+ nHeight += aRectFnSet.GetHeight(pFrame->FrameRA());
if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
// This TextFrame would like to be a bit larger
nHeight += static_cast<SwTextFrame*>(pFrame)->GetParHeight()
- - aRectFnSet.GetHeight(pFrame->Prt());
+ - aRectFnSet.GetHeight(pFrame->PrintRA());
else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
nHeight += static_cast<SwSectionFrame*>(pFrame)->Undersize();
pFrame = pFrame->GetNext();
@@ -2592,9 +2592,9 @@ SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips
if ( GetDrawObjs() )
{
const size_t nCnt = GetDrawObjs()->size();
- SwTwips nTop = aRectFnSet.GetTop(Frame());
- SwTwips nBorder = aRectFnSet.GetHeight(Frame()) -
- aRectFnSet.GetHeight(Prt());
+ SwTwips nTop = aRectFnSet.GetTop(FrameRA());
+ SwTwips nBorder = aRectFnSet.GetHeight(FrameRA()) -
+ aRectFnSet.GetHeight(PrintRA());
for ( size_t i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
@@ -2604,10 +2604,10 @@ SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips
// OD 06.11.2003 #i22305# - consider
// only Writer fly frames, which follow the text flow.
if ( pFly->IsFlyLayFrame() &&
- pFly->Frame().Top() != FAR_AWAY &&
+ pFly->FrameRA().Top() != FAR_AWAY &&
pFly->GetFormat()->GetFollowTextFlow().GetValue() )
{
- SwTwips nDist = -aRectFnSet.BottomDist( pFly->Frame(), nTop );
+ SwTwips nDist = -aRectFnSet.BottomDist( pFly->FrameRA(), nTop );
if( nDist > nBorder + nHeight )
nHeight = nDist - nBorder;
}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 31a6a2b0c742..1e5781ef8f2f 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -53,15 +53,15 @@ inline SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert,
{
if ( bVert )
{
- SwTwips aResult = pCnt->Frame().Left();
+ SwTwips aResult = pCnt->FrameRA().Left();
if ( bVertL2R )
aResult += pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
else
- aResult += pCnt->Frame().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
+ aResult += pCnt->FrameRA().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
return aResult;
}
else
- return pCnt->Frame().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
+ return pCnt->FrameRA().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
}
@@ -160,7 +160,7 @@ void SwFlyAtContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pN
if ( !pContent )
{
SwContentNode *pNode = aNewIdx.GetNode().GetContentNode();
- pContent = pNode->getLayoutFrame( getRootFrame(), &pOldAnchor->Frame().Pos(), nullptr, false );
+ pContent = pNode->getLayoutFrame( getRootFrame(), &pOldAnchor->FrameRA().Pos(), nullptr, false );
OSL_ENSURE( pContent, "New anchor not found" );
}
//Flys are never attached to a follow, but always on the master which
@@ -385,10 +385,10 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
bool bConsiderWrapInfluenceDueToMovedFwdAnchor( false );
do {
SwRectFnSet aRectFnSet(this);
- Point aOldPos( aRectFnSet.GetPos(Frame()) );
+ Point aOldPos( aRectFnSet.GetPos(FrameRA()) );
SwFlyFreeFrame::MakeAll(pRenderContext);
const bool bPosChgDueToOwnFormat =
- aOldPos != aRectFnSet.GetPos(Frame());
+ aOldPos != aRectFnSet.GetPos(FrameRA());
// #i3317#
if ( !ConsiderObjWrapInfluenceOnObjPos() &&
OverlapsPrevColumn() )
@@ -446,7 +446,7 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
}
- if ( aOldPos != aRectFnSet.GetPos(Frame()) ||
+ if ( aOldPos != aRectFnSet.GetPos(FrameRA()) ||
( !GetValidPosFlag() &&
( pFooter || bPosChgDueToOwnFormat ) ) )
{
@@ -507,8 +507,8 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
if ( pCellFrame )
{
SwRectFnSet aRectFnSet(pCellFrame);
- if ( aRectFnSet.GetTop(pCellFrame->Frame()) == 0 &&
- aRectFnSet.GetHeight(pCellFrame->Frame()) == 0 )
+ if ( aRectFnSet.GetTop(pCellFrame->FrameRA()) == 0 &&
+ aRectFnSet.GetHeight(pCellFrame->FrameRA()) == 0 )
{
bConsiderWrapInfluenceDueToMovedFwdAnchor = false;
}
@@ -559,7 +559,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
rRet.nSub = 0;
//If the point stays inside the Cnt everything is clear already; the Content
//automatically has a distance of 0.
- if ( pCnt->Frame().IsInside( rPt ) )
+ if ( pCnt->FrameRA().IsInside( rPt ) )
{
rRet.nMain = 0;
return pCnt;
@@ -578,7 +578,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
// #i70582#
// --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script
const SwTwips nTopForObjPos = lcl_GetTopForObjPos(pCnt, bVert, bVertL2R);
- if ( pUp->Frame().IsInside( rPt ) )
+ if ( pUp->FrameRA().IsInside( rPt ) )
{
// <rPt> point is inside environment of given content frame
// #i70582#
@@ -593,21 +593,21 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
rRet.nMain = rPt.Y() - nTopForObjPos;
return pCnt;
}
- else if ( rPt.Y() <= pUp->Frame().Top() )
+ else if ( rPt.Y() <= pUp->FrameRA().Top() )
{
// <rPt> point is above environment of given content frame
// correct for vertical layout?
rRet.nMain = LONG_MAX;
}
- else if( rPt.X() < pUp->Frame().Left() &&
- rPt.Y() <= ( bVert ? pUp->Frame().Top() : pUp->Frame().Bottom() ) )
+ else if( rPt.X() < pUp->FrameRA().Left() &&
+ rPt.Y() <= ( bVert ? pUp->FrameRA().Top() : pUp->FrameRA().Bottom() ) )
{
// <rPt> point is left of environment of given content frame
// seems not to be correct for vertical layout!?
const SwFrame *pLay = pUp->GetLeaf( MAKEPAGE_NONE, false, pCnt );
if( !pLay ||
- (bVert && (pLay->Frame().Top() + pLay->Prt().Bottom()) <rPt.Y())||
- (!bVert && (pLay->Frame().Left() + pLay->Prt().Right())<rPt.X()) )
+ (bVert && (pLay->FrameRA().Top() + pLay->PrintRA().Bottom()) <rPt.Y())||
+ (!bVert && (pLay->FrameRA().Left() + pLay->PrintRA().Right())<rPt.X()) )
{
// <rPt> point is in left border of environment
// #i70582#
@@ -629,9 +629,9 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
rRet.nMain = bVert
? ( bVertL2R
- ? ( (pUp->Frame().Left() + pUp->Prt().Right()) - nTopForObjPos )
- : ( nTopForObjPos - (pUp->Frame().Left() + pUp->Prt().Left() ) ) )
- : ( (pUp->Frame().Top() + pUp->Prt().Bottom()) - nTopForObjPos );
+ ? ( (pUp->FrameRA().Left() + pUp->PrintRA().Right()) - nTopForObjPos )
+ : ( nTopForObjPos - (pUp->FrameRA().Left() + pUp->PrintRA().Left() ) ) )
+ : ( (pUp->FrameRA().Top() + pUp->PrintRA().Bottom()) - nTopForObjPos );
const SwFrame *pPre = pCnt;
const SwFrame *pLay = pUp->GetLeaf( MAKEPAGE_NONE, true, pCnt );
@@ -653,15 +653,15 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
if( pLay->IsVertical() )
{
if ( pLay->IsVertLR() )
- nFrameTop = pLay->Frame().Left();
+ nFrameTop = pLay->FrameRA().Left();
else
- nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
- nPrtHeight = pLay->Prt().Width();
+ nFrameTop = pLay->FrameRA().Left() + pLay->FrameRA().Width();
+ nPrtHeight = pLay->PrintRA().Width();
}
else
{
- nFrameTop = pLay->Frame().Top();
- nPrtHeight = pLay->Prt().Height();
+ nFrameTop = pLay->FrameRA().Top();
+ nPrtHeight = pLay->PrintRA().Height();
}
pSect = pNxtSect;
}
@@ -672,24 +672,24 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pSect->Frame().Right();
- nPrtHeight = pLay->Frame().Left() + pLay->Prt().Left()
- + pLay->Prt().Width() - pSect->Frame().Left()
- - pSect->Frame().Width();
+ nFrameTop = pSect->FrameRA().Right();
+ nPrtHeight = pLay->FrameRA().Left() + pLay->PrintRA().Left()
+ + pLay->PrintRA().Width() - pSect->FrameRA().Left()
+ - pSect->FrameRA().Width();
}
else
{
- nFrameTop = pSect->Frame().Left();
- nPrtHeight = pSect->Frame().Left() - pLay->Frame().Left()
- - pLay->Prt().Left();
+ nFrameTop = pSect->FrameRA().Left();
+ nPrtHeight = pSect->FrameRA().Left() - pLay->FrameRA().Left()
+ - pLay->PrintRA().Left();
}
}
else
{
- nFrameTop = pSect->Frame().Bottom();
- nPrtHeight = pLay->Frame().Top() + pLay->Prt().Top()
- + pLay->Prt().Height() - pSect->Frame().Top()
- - pSect->Frame().Height();
+ nFrameTop = pSect->FrameRA().Bottom();
+ nPrtHeight = pLay->FrameRA().Top() + pLay->PrintRA().Top()
+ + pLay->PrintRA().Height() - pSect->FrameRA().Top()
+ - pSect->FrameRA().Height();
}
pSect = nullptr;
}
@@ -700,26 +700,26 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pLay->Frame().Left();
- nPrtHeight = pLay->Prt().Width();
+ nFrameTop = pLay->FrameRA().Left();
+ nPrtHeight = pLay->PrintRA().Width();
}
else
{
- nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
- nPrtHeight = pLay->Prt().Width();
+ nFrameTop = pLay->FrameRA().Left() + pLay->FrameRA().Width();
+ nPrtHeight = pLay->PrintRA().Width();
}
}
else
{
- nFrameTop = pLay->Frame().Top();
- nPrtHeight = pLay->Prt().Height();
+ nFrameTop = pLay->FrameRA().Top();
+ nPrtHeight = pLay->PrintRA().Height();
}
bSct = nullptr != pSect;
}
- while ( pLay && !pLay->Frame().IsInside( rPt ) &&
- ( pLay->Frame().Top() <= rPt.Y() || pLay->IsInFly() ||
+ while ( pLay && !pLay->FrameRA().IsInside( rPt ) &&
+ ( pLay->FrameRA().Top() <= rPt.Y() || pLay->IsInFly() ||
( pLay->IsInSct() &&
- pLay->FindSctFrame()->GetUpper()->Frame().Top() <= rPt.Y())) )
+ pLay->FindSctFrame()->GetUpper()->FrameRA().Top() <= rPt.Y())) )
{
if ( pLay->IsFootnoteContFrame() )
{
@@ -753,19 +753,19 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pLay->Frame().Left();
- nPrtHeight = pLay->Prt().Width();
+ nFrameTop = pLay->FrameRA().Left();
+ nPrtHeight = pLay->PrintRA().Width();
}
else
{
- nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
- nPrtHeight = pLay->Prt().Width();
+ nFrameTop = pLay->FrameRA().Left() + pLay->FrameRA().Width();
+ nPrtHeight = pLay->PrintRA().Width();
}
}
else
{
- nFrameTop = pLay->Frame().Top();
- nPrtHeight = pLay->Prt().Height();
+ nFrameTop = pLay->FrameRA().Top();
+ nPrtHeight = pLay->PrintRA().Height();
}
}
else
@@ -775,24 +775,24 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pSect->Frame().Right();
- nPrtHeight = pLay->Frame().Left()+pLay->Prt().Left()
- + pLay->Prt().Width() - pSect->Frame().Left()
- - pSect->Frame().Width();
+ nFrameTop = pSect->FrameRA().Right();
+ nPrtHeight = pLay->FrameRA().Left()+pLay->PrintRA().Left()
+ + pLay->PrintRA().Width() - pSect->FrameRA().Left()
+ - pSect->FrameRA().Width();
}
else
{
- nFrameTop = pSect->Frame().Left();
- nPrtHeight = pSect->Frame().Left() -
- pLay->Frame().Left() - pLay->Prt().Left();
+ nFrameTop = pSect->FrameRA().Left();
+ nPrtHeight = pSect->FrameRA().Left() -
+ pLay->FrameRA().Left() - pLay->PrintRA().Left();
}
}
else
{
- nFrameTop = pSect->Frame().Bottom();
- nPrtHeight = pLay->Frame().Top()+pLay->Prt().Top()
- + pLay->Prt().Height() - pSect->Frame().Top()
- - pSect->Frame().Height();
+ nFrameTop = pSect->FrameRA().Bottom();
+ nPrtHeight = pLay->FrameRA().Top()+pLay->PrintRA().Top()
+ + pLay->PrintRA().Height() - pSect->FrameRA().Top()
+ - pSect->FrameRA().Height();
}
pSect = nullptr;
}
@@ -803,19 +803,19 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pLay->Frame().Left();
- nPrtHeight = pLay->Prt().Width();
+ nFrameTop = pLay->FrameRA().Left();
+ nPrtHeight = pLay->PrintRA().Width();
}
else
{
- nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
- nPrtHeight = pLay->Prt().Width();
+ nFrameTop = pLay->FrameRA().Left() + pLay->FrameRA().Width();
+ nPrtHeight = pLay->PrintRA().Width();
}
}
else
{
- nFrameTop = pLay->Frame().Top();
- nPrtHeight = pLay->Prt().Height();
+ nFrameTop = pLay->FrameRA().Top();
+ nPrtHeight = pLay->PrintRA().Height();
}
bSct = nullptr != pSect;
}
@@ -823,7 +823,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
}
if ( pLay )
{
- if ( pLay->Frame().IsInside( rPt ) )
+ if ( pLay->FrameRA().IsInside( rPt ) )
{
SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrameTop ) : ( nFrameTop - rPt.X() ) )
: ( rPt.Y() - nFrameTop );
@@ -874,13 +874,13 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrame *pLay,
{
//Calculate the distance between those two points.
//'delta' X^2 + 'delta' Y^2 = 'distance'^2
- sal_uInt64 dX = std::max( pCnt->Frame().Left(), rPt.X() ) -
- std::min( pCnt->Frame().Left(), rPt.X() ),
- dY = std::max( pCnt->Frame().Top(), rPt.Y() ) -
- std::min( pCnt->Frame().Top(), rPt.Y() );
+ sal_uInt64 dX = std::max( pCnt->FrameRA().Left(), rPt.X() ) -
+ std::min( pCnt->FrameRA().Left(), rPt.X() ),
+ dY = std::max( pCnt->FrameRA().Top(), rPt.Y() ) -
+ std::min( pCnt->FrameRA().Top(), rPt.Y() );
// square of the difference will do fine here
const sal_uInt64 nDiff = (dX * dX) + (dY * dY);
- if ( pCnt->Frame().Top() <= rPt.Y() )
+ if ( pCnt->FrameRA().Top() <= rPt.Y() )
{
if ( nDiff < nDistance )
{
@@ -943,7 +943,7 @@ static const SwContentFrame * lcl_FindCnt( const Point &rPt, const SwContentFram
const sal_uInt64 nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFootnote );
if ( nNew < nDist )
{
- if ( pNew->Frame().Top() <= rPt.Y() )
+ if ( pNew->FrameRA().Top() <= rPt.Y() )
{
pRet = pNearest = pNew;
nDist = nNearest = nNew;
@@ -968,7 +968,7 @@ static const SwContentFrame * lcl_FindCnt( const Point &rPt, const SwContentFram
const sal_uInt64 nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFootnote );
if ( nNew < nDist )
{
- if ( pNew->Frame().Top() <= rPt.Y() )
+ if ( pNew->FrameRA().Top() <= rPt.Y() )
{
pRet = pNearest = pNew;
nDist = nNearest = nNew;
@@ -985,7 +985,7 @@ static const SwContentFrame * lcl_FindCnt( const Point &rPt, const SwContentFram
nOldNew = nNew;
}
}
- if ( pRet->Frame().Top() > rPt.Y() )
+ if ( pRet->FrameRA().Top() > rPt.Y() )
return pNearest;
else
return pRet;
@@ -993,8 +993,8 @@ static const SwContentFrame * lcl_FindCnt( const Point &rPt, const SwContentFram
static void lcl_PointToPrt( Point &rPoint, const SwFrame *pFrame )
{
- SwRect aTmp( pFrame->Prt() );
- aTmp += pFrame->Frame().Pos();
+ SwRect aTmp( pFrame->PrintRA() );
+ aTmp += pFrame->FrameRA().Pos();
if ( rPoint.getX() < aTmp.Left() )
rPoint.setX(aTmp.Left());
else if ( rPoint.getX() > aTmp.Right() )
@@ -1049,7 +1049,7 @@ const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew,
::lcl_PointToPrt( aNew, pPage );
}
- if ( pCnt->IsInDocBody() == bBody && pCnt->Frame().IsInside( aNew ) )
+ if ( pCnt->IsInDocBody() == bBody && pCnt->FrameRA().IsInside( aNew ) )
return pCnt;
else if ( pOldAnch->IsInDocBody() || pOldAnch->IsPageFrame() )
{
@@ -1058,7 +1058,7 @@ const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew,
Point aTmp( aNew );
const SwContentFrame *pTmp = pCnt->FindPageFrame()->
GetContentPos( aTmp, false, true );
- if ( pTmp && pTmp->Frame().IsInside( aNew ) )
+ if ( pTmp && pTmp->FrameRA().IsInside( aNew ) )
return pTmp;
}
@@ -1169,7 +1169,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
Point aNew( rNew );
if( ( GetAnchorFrame()->IsVertical() && !GetAnchorFrame()->IsVertLR() ) || GetAnchorFrame()->IsRightToLeft() )
- aNew.setX(aNew.getX() + Frame().Width());
+ aNew.setX(aNew.getX() + FrameRA().Width());
SwContentFrame *pCnt = const_cast<SwContentFrame*>(::FindAnchor( GetAnchorFrame(), aNew ));
if( pCnt->IsProtected() )
pCnt = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(GetAnchorFrame()));
@@ -1184,9 +1184,9 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
( !bRTL != !GetAnchorFrame()->IsRightToLeft() ) )
{
if( bVert || bRTL )
- aNew.setX(aNew.getX() + Frame().Width());
+ aNew.setX(aNew.getX() + FrameRA().Width());
else
- aNew.setX(aNew.getX() - Frame().Width());
+ aNew.setX(aNew.getX() - FrameRA().Width());
}
if ( pCnt->IsInDocBody() )
@@ -1205,20 +1205,20 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
//!!!!!We can optimize here: FindAnchor could also return RelPos!
const SwFrame *pFrame = nullptr;
SwTwips nY;
- if ( pCnt->Frame().IsInside( aNew ) )
+ if ( pCnt->FrameRA().IsInside( aNew ) )
{
// #i70582#
if ( bVert )
{
- nY = pCnt->Frame().Left() - rNew.X();
+ nY = pCnt->FrameRA().Left() - rNew.X();
if ( bVertL2R )
nY = -nY;
else
- nY += pCnt->Frame().Width() - Frame().Width();
+ nY += pCnt->FrameRA().Width() - FrameRA().Width();
nY -= pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
else
- nY = rNew.Y() - pCnt->Frame().Top() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
+ nY = rNew.Y() - pCnt->FrameRA().Top() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
else
{
@@ -1256,20 +1256,20 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
if( pUp->IsVertical() )
{
if ( pUp->IsVertLR() )
- nDiff += pUp->Prt().Width() - pFollow->GetRelPos().getX();
+ nDiff += pUp->PrintRA().Width() - pFollow->GetRelPos().getX();
else
- nDiff += pFollow->Frame().Left() + pFollow->Frame().Width()
- - pUp->Frame().Left() - pUp->Prt().Left();
+ nDiff += pFollow->FrameRA().Left() + pFollow->FrameRA().Width()
+ - pUp->FrameRA().Left() - pUp->PrintRA().Left();
}
else
- nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y();
+ nDiff += pUp->PrintRA().Height() - pFollow->GetRelPos().Y();
pFollow = pFollow->GetFollow();
} while ( pFollow != pOriginal );
nY += nDiff;
if( bVert )
- nX = pCnt->Frame().Top() - pOriginal->Frame().Top();
+ nX = pCnt->FrameRA().Top() - pOriginal->FrameRA().Top();
else
- nX = pCnt->Frame().Left() - pOriginal->Frame().Left();
+ nX = pCnt->FrameRA().Left() - pOriginal->FrameRA().Left();
}
if ( nY == LONG_MAX )
@@ -1294,25 +1294,25 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
if( bVert )
{
if( !pFrame )
- nX += rNew.Y() - pCnt->Frame().Top();
+ nX += rNew.Y() - pCnt->FrameRA().Top();
else
- nX = rNew.Y() - pFrame->Frame().Top();
+ nX = rNew.Y() - pFrame->FrameRA().Top();
}
else
{
if( !pFrame )
{
if ( pCnt->IsRightToLeft() )
- nX += pCnt->Frame().Right() - rNew.X() - Frame().Width();
+ nX += pCnt->FrameRA().Right() - rNew.X() - FrameRA().Width();
else
- nX += rNew.X() - pCnt->Frame().Left();
+ nX += rNew.X() - pCnt->FrameRA().Left();
}
else
{
if ( pFrame->IsRightToLeft() )
- nX += pFrame->Frame().Right() - rNew.X() - Frame().Width();
+ nX += pFrame->FrameRA().Right() - rNew.X() - FrameRA().Width();
else
- nX = rNew.X() - pFrame->Frame().Left();
+ nX = rNew.X() - pFrame->FrameRA().Left();
}
}
GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 9d62960e6fd5..962bc6e9fb82 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -73,7 +73,7 @@ void SwFlyInContentFrame::SetRefPoint( const Point& rPoint,
aRef = rPoint;
SetCurrRelPos( rRelAttr );
SwRectFnSet aRectFnSet(GetAnchorFrame());
- aRectFnSet.SetPos( Frame(), rPoint + rRelPos );
+ aRectFnSet.SetPos( FrameWA(), rPoint + rRelPos );
// #i68520#
InvalidateObjRectWithSpaces();
if( pNotify )
@@ -130,7 +130,7 @@ void SwFlyInContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pN
/// Here the content gets formatted initially.
void SwFlyInContentFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs )
{
- if ( !Frame().Height() )
+ if ( !FrameRA().Height() )
{
Lock(); //don't format the anchor on the crook.
SwContentFrame *pContent = ContainsContent();
@@ -255,10 +255,10 @@ void SwFlyInContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
GetFormat()->getIDocumentSettingAccess().get( DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME ) )
{
SwFrame* pFrame = AnchorFrame();
- if ( Frame().Left() == (pFrame->Frame().Left()+pFrame->Prt().Left()) &&
- Frame().Width() > pFrame->Prt().Width() )
+ if ( FrameRA().Left() == (pFrame->FrameRA().Left()+pFrame->PrintRA().Left()) &&
+ FrameRA().Width() > pFrame->PrintRA().Width() )
{
- Frame().Width( pFrame->Prt().Width() );
+ FrameWA().Width( pFrame->PrintRA().Width() );
mbValidPrtArea = false;
m_bWidthClipped = true;
}
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 4d27654eaf3c..c1c84a8cfac3 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -176,7 +176,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( !mbValidPos )
{
- const Point aOldPos( aRectFnSet.GetPos(Frame()) );
+ const Point aOldPos( aRectFnSet.GetPos(FrameRA()) );
// #i26791# - use new method <MakeObjPos()>
// #i34753# - no positioning, if requested.
if ( IsNoMakePos() )
@@ -184,7 +184,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
else
// #i26791# - use new method <MakeObjPos()>
MakeObjPos();
- if( aOldPos == aRectFnSet.GetPos(Frame()) )
+ if( aOldPos == aRectFnSet.GetPos(FrameRA()) )
{
if( !mbValidPos && GetAnchorFrame()->IsInSct() &&
!GetAnchorFrame()->FindSctFrame()->IsValid() )
@@ -217,8 +217,8 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
#if OSL_DEBUG_LEVEL > 0
SwRectFnSet aRectFnSet(this);
- OSL_ENSURE( m_bHeightClipped || ( aRectFnSet.GetHeight(Frame()) > 0 &&
- aRectFnSet.GetHeight(Prt()) > 0),
+ OSL_ENSURE( m_bHeightClipped || ( aRectFnSet.GetHeight(FrameRA()) > 0 &&
+ aRectFnSet.GetHeight(PrintRA()) > 0),
"SwFlyFreeFrame::Format(), flipping Fly." );
#endif
@@ -275,8 +275,8 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
::CalcClipRect( pObj, aTmpStretch, false );
aClip.Intersection_( aTmpStretch );
- const long nBot = Frame().Top() + Frame().Height();
- const long nRig = Frame().Left() + Frame().Width();
+ const long nBot = FrameRA().Top() + FrameRA().Height();
+ const long nRig = FrameRA().Left() + FrameRA().Width();
const long nClipBot = aClip.Top() + aClip.Height();
const long nClipRig = aClip.Left() + aClip.Width();
@@ -296,24 +296,24 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
// now the flyframe can change its position and so on ...
if ( !pHeader || !pHeader->IsHeaderFrame() )
{
- const long nOld = Frame().Top();
- Frame().Pos().Y() = std::max( aClip.Top(), nClipBot - Frame().Height() );
- if ( Frame().Top() != nOld )
+ const long nOld = FrameRA().Top();
+ FrameWA().Pos().Y() = std::max( aClip.Top(), nClipBot - FrameRA().Height() );
+ if ( FrameRA().Top() != nOld )
bAgain = true;
m_bHeightClipped = true;
}
}
if ( bRig )
{
- const long nOld = Frame().Left();
- Frame().Pos().X() = std::max( aClip.Left(), nClipRig - Frame().Width() );
- if ( Frame().Left() != nOld )
+ const long nOld = FrameRA().Left();
+ FrameWA().Pos().X() = std::max( aClip.Left(), nClipRig - FrameRA().Width() );
+ if ( FrameRA().Left() != nOld )
{
const SwFormatHoriOrient &rH = GetFormat()->GetHoriOrient();
// Left-aligned ones may not be moved to the left when they
// are avoiding another one.
if( rH.GetHoriOrient() == text::HoriOrientation::LEFT )
- Frame().Pos().X() = nOld;
+ FrameWA().Pos().X() = nOld;
else
bAgain = true;
}
@@ -329,10 +329,10 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
// For Flys with OLE objects as lower, we make sure that
// we always resize proportionally
- Size aOldSize( Frame().SSize() );
+ Size aOldSize( FrameRA().SSize() );
// First, setup the FrameRect, then transfer it to the Frame.
- SwRect aFrameRect( Frame() );
+ SwRect aFrameRect( FrameRA() );
if ( bBot )
{
@@ -417,17 +417,17 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
// Now change the Frame; for columns, we put the new values into the attributes,
// otherwise we'll end up with unwanted side-effects/oscillations
- const long nPrtHeightDiff = Frame().Height() - Prt().Height();
- const long nPrtWidthDiff = Frame().Width() - Prt().Width();
- maUnclippedFrame = Frame();
- Frame().Height( aFrameRect.Height() );
- Frame().Width ( std::max( long(MINLAY), aFrameRect.Width() ) );
+ const long nPrtHeightDiff = FrameRA().Height() - PrintRA().Height();
+ const long nPrtWidthDiff = FrameRA().Width() - PrintRA().Width();
+ maUnclippedFrame = FrameRA();
+ FrameWA().Height( aFrameRect.Height() );
+ FrameWA().Width ( std::max( long(MINLAY), aFrameRect.Width() ) );
if ( Lower() && Lower()->IsColumnFrame() )
{
ColLock(); //lock grow/shrink
- const Size aTmpOldSize( Prt().SSize() );
- Prt().Height( Frame().Height() - nPrtHeightDiff );
- Prt().Width ( Frame().Width() - nPrtWidthDiff );
+ const Size aTmpOldSize( PrintRA().SSize() );
+ PrintWA().Height( FrameRA().Height() - nPrtHeightDiff );
+ PrintWA().Width ( FrameRA().Width() - nPrtWidthDiff );
ChgLowersProp( aTmpOldSize );
SwFrame *pLow = Lower();
do
@@ -444,14 +444,14 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
}
else
{
- Prt().Height( Frame().Height() - nPrtHeightDiff );
- Prt().Width ( Frame().Width() - nPrtWidthDiff );
+ PrintWA().Height( FrameRA().Height() - nPrtHeightDiff );
+ PrintWA().Width ( FrameRA().Width() - nPrtWidthDiff );
}
}
}
// #i26945#
- OSL_ENSURE( Frame().Height() >= 0,
+ OSL_ENSURE( FrameRA().Height() >= 0,
"<SwFlyFreeFrame::CheckClip(..)> - fly frame has negative height now." );
}
@@ -925,7 +925,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
pClip = pFly->GetAnchorFrame();
}
- rRect = pClip->Frame();
+ rRect = pClip->FrameRA();
SwRectFnSet aRectFnSet(pClip);
// vertical clipping: Top and Bottom, also to PrtArea if necessary
@@ -964,8 +964,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
"if you can reproduce this please file a bug");
return false;
}
- rRect = bMove ? pClipFrame->GetUpper()->Frame()
- : pClipFrame->Frame();
+ rRect = bMove ? pClipFrame->GetUpper()->FrameRA()
+ : pClipFrame->FrameRA();
// #i26945# - consider that a table, during
// its format, can exceed its upper printing area bottom.
// Thus, enlarge the clip rectangle, if such a case occurred
@@ -973,8 +973,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
const SwTabFrame* pTabFrame = const_cast<SwFlyFrame*>(pFly)
->GetAnchorFrameContainingAnchPos()->FindTabFrame();
- SwRect aTmp( pTabFrame->Prt() );
- aTmp += pTabFrame->Frame().Pos();
+ SwRect aTmp( pTabFrame->PrintRA() );
+ aTmp += pTabFrame->FrameRA().Pos();
rRect.Union( aTmp );
// #i43913# - consider also the cell frame
const SwFrame* pCellFrame = const_cast<SwFlyFrame*>(pFly)
@@ -985,8 +985,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
}
if ( pCellFrame )
{
- aTmp = pCellFrame->Prt();
- aTmp += pCellFrame->Frame().Pos();
+ aTmp = pCellFrame->PrintRA();
+ aTmp += pCellFrame->FrameRA().Pos();
rRect.Union( aTmp );
}
}
@@ -1001,7 +1001,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
aEnvOfObj.GetVertEnvironmentLayoutFrame( *pVertPosOrientFrame );
if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME )
{
- rRect = rVertClipFrame.Frame();
+ rRect = rVertClipFrame.FrameRA();
}
else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
{
@@ -1011,14 +1011,14 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
}
else
{
- rRect = rVertClipFrame.Frame();
+ rRect = rVertClipFrame.FrameRA();
}
}
const SwLayoutFrame* pHoriClipFrame =
pFly->GetAnchorFrame()->FindPageFrame()->GetUpper();
SwRectFnSet aRectFnSet(pFly->GetAnchorFrame());
- aRectFnSet.SetLeft( rRect, aRectFnSet.GetLeft(pHoriClipFrame->Frame()) );
- aRectFnSet.SetRight(rRect, aRectFnSet.GetRight(pHoriClipFrame->Frame()));
+ aRectFnSet.SetLeft( rRect, aRectFnSet.GetLeft(pHoriClipFrame->FrameRA()) );
+ aRectFnSet.SetRight(rRect, aRectFnSet.GetRight(pHoriClipFrame->FrameRA()));
}
else
{
@@ -1044,8 +1044,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
if ( pUp->IsRootFrame() )
{
- rRect = pUp->Prt();
- rRect += pUp->Frame().Pos();
+ rRect = pUp->PrintRA();
+ rRect += pUp->FrameRA().Pos();
pUp = nullptr;
}
}
@@ -1058,7 +1058,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
pUp = pPg->FindBodyCont();
if (pUp)
{
- rRect = pUp->GetUpper()->Frame();
+ rRect = pUp->GetUpper()->FrameRA();
aRectFnSet.SetTop( rRect, aRectFnSet.GetPrtTop(*pUp) );
aRectFnSet.SetBottom(rRect, aRectFnSet.GetPrtBottom(*pUp));
}
@@ -1066,7 +1066,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
else
{
if( ( pUp->GetType() & (SwFrameType::Fly | SwFrameType::Ftn ) ) &&
- !pUp->Frame().IsInside( pFly->Frame().Pos() ) )
+ !pUp->FrameRA().IsInside( pFly->FrameRA().Pos() ) )
{
if( pUp->IsFlyFrame() )
{
@@ -1074,7 +1074,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
while( pTmpFly->GetNextLink() )
{
pTmpFly = pTmpFly->GetNextLink();
- if( pTmpFly->Frame().IsInside( pFly->Frame().Pos() ) )
+ if( pTmpFly->FrameRA().IsInside( pFly->FrameRA().Pos() ) )
break;
}
pUp = pTmpFly;
@@ -1085,26 +1085,26 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
while( pTmp->GetFollow() )
{
pTmp = pTmp->GetFollow();
- if( pTmp->Frame().IsInside( pFly->Frame().Pos() ) )
+ if( pTmp->FrameRA().IsInside( pFly->FrameRA().Pos() ) )
break;
}
pUp = pTmp;
}
}
- rRect = pUp->Prt();
- rRect.Pos() += pUp->Frame().Pos();
+ rRect = pUp->PrintRA();
+ rRect.Pos() += pUp->FrameRA().Pos();
if ( pUp->GetType() & (SwFrameType::Header | SwFrameType::Footer) )
{
- rRect.Left ( pUp->GetUpper()->Frame().Left() );
- rRect.Width( pUp->GetUpper()->Frame().Width());
+ rRect.Left ( pUp->GetUpper()->FrameRA().Left() );
+ rRect.Width( pUp->GetUpper()->FrameRA().Width());
}
else if ( pUp->IsCellFrame() ) //MA_FLY_HEIGHT
{
const SwFrame *pTab = pUp->FindTabFrame();
aRectFnSet.SetBottom( rRect, aRectFnSet.GetPrtBottom(*pTab->GetUpper()) );
// expand to left and right cell border
- rRect.Left ( pUp->Frame().Left() );
- rRect.Width( pUp->Frame().Width() );
+ rRect.Left ( pUp->FrameRA().Left() );
+ rRect.Width( pUp->FrameRA().Width() );
}
}
}
@@ -1112,8 +1112,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
// CellFrames might also sit in unallowed areas. In this case,
// the Fly is allowed to do so as well
- SwRect aTmp( pCell->Prt() );
- aTmp += pCell->Frame().Pos();
+ SwRect aTmp( pCell->PrintRA() );
+ aTmp += pCell->FrameRA().Pos();
rRect.Union( aTmp );
}
}
@@ -1124,11 +1124,11 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
SwRectFnSet aRectFnSet(pFly->GetAnchorFrame());
while( pUp->IsColumnFrame() || pUp->IsSctFrame() || pUp->IsColBodyFrame())
pUp = pUp->GetUpper();
- rRect = pUp->Frame();
+ rRect = pUp->FrameRA();
if( !pUp->IsBodyFrame() )
{
- rRect += pUp->Prt().Pos();
- rRect.SSize( pUp->Prt().SSize() );
+ rRect += pUp->PrintRA().Pos();
+ rRect.SSize( pUp->PrintRA().SSize() );
if ( pUp->IsCellFrame() )
{
const SwFrame *pTab = pUp->FindTabFrame();
@@ -1139,7 +1139,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
// Objects anchored as character may exceed right margin
// of body frame:
- aRectFnSet.SetRight( rRect, aRectFnSet.GetRight(pUp->GetUpper()->Frame()) );
+ aRectFnSet.SetRight( rRect, aRectFnSet.GetRight(pUp->GetUpper()->FrameRA()) );
}
long nHeight = (9*aRectFnSet.GetHeight(rRect))/10;
long nTop;
@@ -1150,7 +1150,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
nTop = aRectFnSet.IsVert() ? static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().X() :
static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().Y();
nTop = aRectFnSet.YInc( nTop, -nHeight );
- long nWidth = aRectFnSet.GetWidth(pFly->Frame());
+ long nWidth = aRectFnSet.GetWidth(pFly->FrameRA());
aRectFnSet.SetLeftAndWidth( rRect, aRectFnSet.IsVert() ?
static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().Y() :
static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().X(), nWidth );
@@ -1158,9 +1158,9 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
}
else
{
- nTop = aRectFnSet.YInc( aRectFnSet.GetBottom(pFly->Frame()),
+ nTop = aRectFnSet.YInc( aRectFnSet.GetBottom(pFly->FrameRA()),
rUL.GetLower() - nHeight );
- nHeight = 2*nHeight - aRectFnSet.GetHeight(pFly->Frame())
+ nHeight = 2*nHeight - aRectFnSet.GetHeight(pFly->FrameRA())
- rUL.GetLower() - rUL.GetUpper();
}
aRectFnSet.SetTopAndHeight( rRect, nTop, nHeight );
@@ -1181,8 +1181,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
pAnchorFrame = pC->GetAnchorFrame();
}
const SwFrame* pUp = pAnchorFrame->GetUpper();
- rRect = pUp->Prt();
- rRect += pUp->Frame().Pos();
+ rRect = pUp->PrintRA();
+ rRect += pUp->FrameRA().Pos();
SwRectFnSet aRectFnSet(pAnchorFrame);
long nHeight = (9*aRectFnSet.GetHeight(rRect))/10;
long nTop;
@@ -1220,7 +1220,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
// clip frame is the page frame the header/footer is on.
const SwFrame* pClipFrame = pAnchorFrame->FindPageFrame();
- rRect = pClipFrame->Frame();
+ rRect = pClipFrame->FrameRA();
}
else
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index d95e755899b2..5e8d1d19e3cd 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -80,8 +80,8 @@ bool StackHack::bLocked = false;
SwFrameNotify::SwFrameNotify( SwFrame *pF ) :
mpFrame( pF ),
- maFrame( pF->Frame() ),
- maPrt( pF->Prt() ),
+ maFrame( pF->FrameRA() ),
+ maPrt( pF->PrintRA() ),
mbInvaKeep( false ),
mbValidSize( pF->GetValidSizeFlag() )
{
@@ -102,11 +102,11 @@ SwFrameNotify::SwFrameNotify( SwFrame *pF ) :
SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
{
SwRectFnSet aRectFnSet(mpFrame);
- const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->Frame());
+ const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->FrameRA());
const bool bChgWidth =
- aRectFnSet.GetWidth(maFrame) != aRectFnSet.GetWidth(mpFrame->Frame());
+ aRectFnSet.GetWidth(maFrame) != aRectFnSet.GetWidth(mpFrame->FrameRA());
const bool bChgHeight =
- aRectFnSet.GetHeight(maFrame)!=aRectFnSet.GetHeight(mpFrame->Frame());
+ aRectFnSet.GetHeight(maFrame)!=aRectFnSet.GetHeight(mpFrame->FrameRA());
const bool bChgFlyBasePos = mpFrame->IsTextFrame() &&
( ( mnFlyAnchorOfst != static_cast<SwTextFrame*>(mpFrame)->GetBaseOfstForFly( true ) ) ||
( mnFlyAnchorOfstNoWrap != static_cast<SwTextFrame*>(mpFrame)->GetBaseOfstForFly( false ) ) );
@@ -147,7 +147,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
else if ( !pFlow->HasFollow() )
{
long nOldHeight = aRectFnSet.GetHeight(maFrame);
- long nNewHeight = aRectFnSet.GetHeight(mpFrame->Frame());
+ long nNewHeight = aRectFnSet.GetHeight(mpFrame->FrameRA());
if( (nOldHeight > nNewHeight) || (!nOldHeight && nNewHeight) )
pFlow->CheckKeep();
}
@@ -173,7 +173,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
// #104100# - correct condition for setting retouche
// flag for vertical layout.
if( mpFrame->IsRetoucheFrame() &&
- aRectFnSet.TopDist( maFrame, aRectFnSet.GetTop(mpFrame->Frame()) ) > 0 )
+ aRectFnSet.TopDist( maFrame, aRectFnSet.GetTop(mpFrame->FrameRA()) ) > 0 )
{
mpFrame->SetRetouche();
}
@@ -190,9 +190,9 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
//For each resize of the background graphics is a repaint necessary.
const bool bPrtWidth =
- aRectFnSet.GetWidth(maPrt) != aRectFnSet.GetWidth(mpFrame->Prt());
+ aRectFnSet.GetWidth(maPrt) != aRectFnSet.GetWidth(mpFrame->PrintRA());
const bool bPrtHeight =
- aRectFnSet.GetHeight(maPrt)!=aRectFnSet.GetHeight(mpFrame->Prt());
+ aRectFnSet.GetHeight(maPrt)!=aRectFnSet.GetHeight(mpFrame->PrintRA());
if ( bPrtWidth || bPrtHeight )
{
bool bUseNewFillProperties(false);
@@ -227,7 +227,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
}
}
- const bool bPrtP = aRectFnSet.PosDiff( maPrt, mpFrame->Prt() );
+ const bool bPrtP = aRectFnSet.PosDiff( maPrt, mpFrame->PrintRA() );
if ( bAbsP || bPrtP || bChgWidth || bChgHeight ||
bPrtWidth || bPrtHeight || bChgFlyBasePos )
{
@@ -445,7 +445,7 @@ SwLayNotify::~SwLayNotify()
SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(mpFrame);
SwRectFnSet aRectFnSet(pLay);
bool bNotify = false;
- if ( pLay->Prt().SSize() != maPrt.SSize() )
+ if ( pLay->PrintRA().SSize() != maPrt.SSize() )
{
if ( !IsLowersComplete() )
{
@@ -454,10 +454,10 @@ SwLayNotify::~SwLayNotify()
if ( pLay->IsRowFrame() )
{
bInvaPercent = true;
- long nNew = aRectFnSet.GetHeight(pLay->Prt());
+ long nNew = aRectFnSet.GetHeight(pLay->PrintRA());
if( nNew != aRectFnSet.GetHeight(maPrt) )
static_cast<SwRowFrame*>(pLay)->AdjustCells( nNew, true);
- if( aRectFnSet.GetWidth(pLay->Prt())
+ if( aRectFnSet.GetWidth(pLay->PrintRA())
!= aRectFnSet.GetWidth(maPrt) )
static_cast<SwRowFrame*>(pLay)->AdjustCells( 0, false );
}
@@ -476,8 +476,8 @@ SwLayNotify::~SwLayNotify()
if ( pLay->Lower() )
{
bLow = !pLay->Lower()->IsColumnFrame() ||
- aRectFnSet.GetHeight(pLay->Lower()->Frame())
- != aRectFnSet.GetHeight(pLay->Prt());
+ aRectFnSet.GetHeight(pLay->Lower()->FrameRA())
+ != aRectFnSet.GetHeight(pLay->PrintRA());
}
else
bLow = false;
@@ -487,15 +487,15 @@ SwLayNotify::~SwLayNotify()
if ( pLay->Lower() )
{
if( pLay->Lower()->IsColumnFrame() && pLay->Lower()->GetNext() )
- bLow = pLay->Lower()->Frame().Height() != pLay->Prt().Height();
+ bLow = pLay->Lower()->FrameRA().Height() != pLay->PrintRA().Height();
else
- bLow = pLay->Prt().Width() != maPrt.Width();
+ bLow = pLay->PrintRA().Width() != maPrt.Width();
}
else
bLow = false;
}
else if( pLay->IsFooterFrame() && !pLay->HasFixSize() )
- bLow = pLay->Prt().Width() != maPrt.Width();
+ bLow = pLay->PrintRA().Width() != maPrt.Width();
else
bLow = true;
bInvaPercent = bLow;
@@ -507,8 +507,8 @@ SwLayNotify::~SwLayNotify()
// can take another frame. As a result, the "possible right one" needs to be
// invalidated. This only pays off if this or its Uppers are moveable sections.
// A PrtArea has been extended if width or height are larger than before.
- if ( (pLay->Prt().Height() > maPrt.Height() ||
- pLay->Prt().Width() > maPrt.Width()) &&
+ if ( (pLay->PrintRA().Height() > maPrt.Height() ||
+ pLay->PrintRA().Width() > maPrt.Width()) &&
(pLay->IsMoveable() || pLay->IsFlyFrame()) )
{
SwFrame *pTmpFrame = pLay->Lower();
@@ -523,7 +523,7 @@ SwLayNotify::~SwLayNotify()
bNotify = true;
//EXPENSIVE!! But how we do it more elegant?
if( bInvaPercent )
- pLay->InvaPercentLowers( pLay->Prt().Height() - maPrt.Height() );
+ pLay->InvaPercentLowers( pLay->PrintRA().Height() - maPrt.Height() );
}
if ( pLay->IsTabFrame() )
//So that _only_ the shadow is drawn while resizing.
@@ -540,9 +540,9 @@ SwLayNotify::~SwLayNotify()
}
}
//Notify Lower if the position has changed.
- const bool bPrtPos = aRectFnSet.PosDiff( maPrt, pLay->Prt() );
- const bool bPos = bPrtPos || aRectFnSet.PosDiff( maFrame, pLay->Frame() );
- const bool bSize = pLay->Frame().SSize() != maFrame.SSize();
+ const bool bPrtPos = aRectFnSet.PosDiff( maPrt, pLay->PrintRA() );
+ const bool bPos = bPrtPos || aRectFnSet.PosDiff( maFrame, pLay->FrameRA() );
+ const bool bSize = pLay->FrameRA().SSize() != maFrame.SSize();
if ( bPos && pLay->Lower() && !IsLowersComplete() )
pLay->Lower()->InvalidatePos();
@@ -645,9 +645,9 @@ SwFlyNotify::~SwFlyNotify()
//Have the size or the position changed,
//so should the view know this.
SwRectFnSet aRectFnSet(pFly);
- const bool bPosChgd = aRectFnSet.PosDiff( maFrame, pFly->Frame() );
- const bool bFrameChgd = pFly->Frame().SSize() != maFrame.SSize();
- const bool bPrtChgd = maPrt != pFly->Prt();
+ const bool bPosChgd = aRectFnSet.PosDiff( maFrame, pFly->FrameRA() );
+ const bool bFrameChgd = pFly->FrameRA().SSize() != maFrame.SSize();
+ const bool bPrtChgd = maPrt != pFly->PrintRA();
if ( bPosChgd || bFrameChgd || bPrtChgd )
{
pFly->NotifyDrawObj();
@@ -748,8 +748,8 @@ SwContentNotify::~SwContentNotify()
pCnt->SetCompletePaint();
SwRectFnSet aRectFnSet(pCnt);
- if ( pCnt->IsInTab() && ( aRectFnSet.PosDiff( pCnt->Frame(), maFrame ) ||
- pCnt->Frame().SSize() != maFrame.SSize()))
+ if ( pCnt->IsInTab() && ( aRectFnSet.PosDiff( pCnt->FrameRA(), maFrame ) ||
+ pCnt->FrameRA().SSize() != maFrame.SSize()))
{
SwLayoutFrame* pCell = pCnt->GetUpper();
while( !pCell->IsCellFrame() && pCell->GetUpper() )
@@ -823,7 +823,7 @@ SwContentNotify::~SwContentNotify()
const bool bNoTextFramePrtAreaChanged =
( maPrt.SSize().Width() != 0 &&
maPrt.SSize().Height() != 0 ) &&
- maPrt.SSize() != pCnt->Prt().SSize();
+ maPrt.SSize() != pCnt->PrintRA().SSize();
OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrame" );
SwFlyFrame *pFly = pCnt->FindFlyFrame();
svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject();
@@ -850,7 +850,7 @@ SwContentNotify::~SwContentNotify()
if ( !pNd->IsOLESizeInvalid() &&
!pSh->GetDoc()->getIDocumentState().IsUpdateExpField() )
pFESh->CalcAndSetScale( xObj,
- &pFly->Prt(), &pFly->Frame(),
+ &pFly->PrintRA(), &pFly->FrameRA(),
bNoTextFramePrtAreaChanged );
}
}
@@ -862,10 +862,10 @@ SwContentNotify::~SwContentNotify()
}
}
//dito animated graphics
- if ( Frame().HasArea() && static_cast<SwNoTextFrame*>(pCnt)->HasAnimation() )
+ if ( FrameRA().HasArea() && static_cast<SwNoTextFrame*>(pCnt)->HasAnimation() )
{
static_cast<SwNoTextFrame*>(pCnt)->StopAnimation();
- pSh->InvalidateWindows( Frame() );
+ pSh->InvalidateWindows( FrameRA() );
}
}
}
@@ -936,7 +936,7 @@ SwContentNotify::~SwContentNotify()
}
// #i44049#
- if ( pCnt->IsTextFrame() && aRectFnSet.PosDiff( maFrame, pCnt->Frame() ) )
+ if ( pCnt->IsTextFrame() && aRectFnSet.PosDiff( maFrame, pCnt->FrameRA() ) )
{
pCnt->InvalidateObjs();
}
@@ -1120,13 +1120,13 @@ static void lcl_SetPos( SwFrame& _rNewFrame,
const SwLayoutFrame& _rLayFrame )
{
SwRectFnSet aRectFnSet(&_rLayFrame);
- aRectFnSet.SetPos( _rNewFrame.Frame(), aRectFnSet.GetPos(_rLayFrame.Frame()) );
+ aRectFnSet.SetPos( _rNewFrame.FrameWA(), aRectFnSet.GetPos(_rLayFrame.FrameRA()) );
// move position by one SwTwip in text flow direction in order to get
// notifications for a new calculated position after its formatting.
if ( aRectFnSet.IsVert() )
- _rNewFrame.Frame().Pos().X() -= 1;
+ _rNewFrame.FrameWA().Pos().X() -= 1;
else
- _rNewFrame.Frame().Pos().Y() += 1;
+ _rNewFrame.FrameWA().Pos().Y() += 1;
}
void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
@@ -2510,7 +2510,7 @@ void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling )
SwFrame* pLast;
do
{ pSav->mpUpper = pParent;
- nGrowVal += aRectFnSet.GetHeight(pSav->Frame());
+ nGrowVal += aRectFnSet.GetHeight(pSav->FrameRA());
pSav->InvalidateAll_();
// register Flys, if TextFrames than also invalidate appropriately
@@ -2734,7 +2734,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
}
- else if ( pOldPrt && *pOldPrt != pFly->Prt() &&
+ else if ( pOldPrt && *pOldPrt != pFly->PrintRA() &&
pFly->GetFormat()->GetSurround().IsContour() )
{
// #i24097#
@@ -2749,10 +2749,10 @@ static void lcl_CheckFlowBack( SwFrame* pFrame, const SwRect &rRect )
{
if( pFrame->IsLayoutFrame() )
{
- if( rRect.IsOver( pFrame->Frame() ) )
+ if( rRect.IsOver( pFrame->FrameRA() ) )
lcl_CheckFlowBack( static_cast<SwLayoutFrame*>(pFrame)->Lower(), rRect );
}
- else if( !pFrame->GetNext() && nBottom > pFrame->Frame().Bottom() )
+ else if( !pFrame->GetNext() && nBottom > pFrame->FrameRA().Bottom() )
{
if( pFrame->IsContentFrame() && static_cast<SwContentFrame*>(pFrame)->HasFollow() )
pFrame->InvalidateSize();
@@ -2768,8 +2768,8 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrame *pCnt,
{
if ( pCnt->IsTextFrame() )
{
- SwRect aCntPrt( pCnt->Prt() );
- aCntPrt.Pos() += pCnt->Frame().Pos();
+ SwRect aCntPrt( pCnt->PrintRA() );
+ aCntPrt.Pos() += pCnt->FrameRA().Pos();
if ( eHint == PREP_FLY_ATTR_CHG )
{
// #i35640# - use given rectangle <rRect> instead
@@ -2890,8 +2890,8 @@ void Notify_Background( const SdrObject* pObj,
// instead of <GetCurrentBoundRect()>, because a recalculation
// of the bounding rectangle isn't intended here.
if (!isValidTableBeforeAnchor
- && (pTab->Frame().IsOver(pObj->GetLastBoundRect()) ||
- pTab->Frame().IsOver(rRect)))
+ && (pTab->FrameRA().IsOver(pObj->GetLastBoundRect()) ||
+ pTab->FrameRA().IsOver(rRect)))
{
if ( !pFlyFrame || !pFlyFrame->IsLowerOf( pTab ) )
pTab->InvalidatePrt();
@@ -2902,8 +2902,8 @@ void Notify_Background( const SdrObject* pObj,
// instead of <GetCurrentBoundRect()>, because a recalculation
// of the bounding rectangle isn't intended here.
if (!isValidTableBeforeAnchor && pCell->IsCellFrame() &&
- ( pCell->Frame().IsOver( pObj->GetLastBoundRect() ) ||
- pCell->Frame().IsOver( rRect ) ) )
+ ( pCell->FrameRA().IsOver( pObj->GetLastBoundRect() ) ||
+ pCell->FrameRA().IsOver( rRect ) ) )
{
const SwFormatVertOrient &rOri = pCell->GetFormat()->GetVertOrient();
if ( text::VertOrientation::NONE != rOri.GetVertOrient() )
@@ -2924,7 +2924,7 @@ void Notify_Background( const SdrObject* pObj,
if( pAnchoredObj->GetDrawObj() == pObj )
continue;
SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
- if ( pFly->Frame().Top() == FAR_AWAY )
+ if ( pFly->FrameRA().Top() == FAR_AWAY )
continue;
if ( !pFlyFrame ||
@@ -2941,10 +2941,10 @@ void Notify_Background( const SdrObject* pObj,
if( pFly->IsFlyLayFrame() )
{
if( pFly->Lower() && pFly->Lower()->IsColumnFrame() &&
- pFly->Frame().Bottom() >= rRect.Top() &&
- pFly->Frame().Top() <= rRect.Bottom() &&
- pFly->Frame().Right() >= rRect.Left() &&
- pFly->Frame().Left() <= rRect.Right() )
+ pFly->FrameRA().Bottom() >= rRect.Top() &&
+ pFly->FrameRA().Top() <= rRect.Bottom() &&
+ pFly->FrameRA().Right() >= rRect.Left() &&
+ pFly->FrameRA().Left() <= rRect.Right() )
{
pFly->InvalidateSize();
}
@@ -2961,8 +2961,8 @@ void Notify_Background( const SdrObject* pObj,
if ( text::HoriOrientation::NONE != rH.GetHoriOrient() &&
text::HoriOrientation::CENTER != rH.GetHoriOrient() &&
( !pFly->IsAutoPos() || text::RelOrientation::CHAR != rH.GetRelationOrient() ) &&
- (pFly->Frame().Bottom() >= rRect.Top() &&
- pFly->Frame().Top() <= rRect.Bottom()) )
+ (pFly->FrameRA().Bottom() >= rRect.Top() &&
+ pFly->FrameRA().Top() <= rRect.Bottom()) )
pFly->InvalidatePos();
}
}
@@ -2987,14 +2987,14 @@ const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos )
if( pFrame->IsTextFrame() )
{
pFrame = pFrame->GetUpper();
- if( !pFrame->Frame().IsInside( rPos ) )
+ if( !pFrame->FrameRA().IsInside( rPos ) )
{
if( pFrame->IsFootnoteFrame() )
{
const SwFootnoteFrame* pTmp = static_cast<const SwFootnoteFrame*>(pFrame)->GetFollow();
while( pTmp )
{
- if( pTmp->Frame().IsInside( rPos ) )
+ if( pTmp->FrameRA().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetFollow();
}
@@ -3004,7 +3004,7 @@ const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos )
SwFlyFrame* pTmp = const_cast<SwFlyFrame*>(pFrame->FindFlyFrame());
while( pTmp )
{
- if( pTmp->Frame().IsInside( rPos ) )
+ if( pTmp->FrameRA().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetNextLink();
}
@@ -3022,7 +3022,7 @@ bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject* pObj)
{
const SwFlyFrame* pFly = pFlyDrawObj->GetFlyFrame();
pFrame = pFly->GetAnchorFrame();
- aPos = pFly->Frame().Pos();
+ aPos = pFly->FrameRA().Pos();
}
else
{
@@ -3036,7 +3036,7 @@ bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject* pObj)
return true;
if( pFrame->IsFlyFrame() )
{
- aPos = pFrame->Frame().Pos();
+ aPos = pFrame->FrameRA().Pos();
pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos );
}
else
@@ -3077,7 +3077,7 @@ bool IsFrameInSameContext( const SwFrame *pInnerFrame, const SwFrame *pFrame )
}
if( pFrame->IsFlyFrame() )
{
- Point aPos( pFrame->Frame().Pos() );
+ Point aPos( pFrame->FrameRA().Pos() );
pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos );
}
else
@@ -3095,9 +3095,9 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell )
long nHeight = 0, nFlyAdd = 0;
do
{
- long nLow = pLow->Frame().Height();
+ long nLow = pLow->FrameRA().Height();
if( pLow->IsTextFrame() && static_cast<SwTextFrame*>(pLow)->IsUndersized() )
- nLow += static_cast<SwTextFrame*>(pLow)->GetParHeight()-pLow->Prt().Height();
+ nLow += static_cast<SwTextFrame*>(pLow)->GetParHeight()-pLow->PrintRA().Height();
else if( pLow->IsSctFrame() && static_cast<SwSectionFrame*>(pLow)->IsUndersized() )
nLow += static_cast<SwSectionFrame*>(pLow)->Undersize();
nFlyAdd = std::max( 0L, nFlyAdd - nLow );
@@ -3113,7 +3113,7 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell )
const SwBorderAttrs &rAttrs = *aAccess.Get();
nHeight += rAttrs.CalcTop() + rAttrs.CalcBottom();
- return pCell->Frame().Height() - nHeight;
+ return pCell->FrameRA().Height() - nHeight;
}
else
{
@@ -3142,7 +3142,7 @@ SwTwips CalcRowRstHeight( SwLayoutFrame *pRow )
const SwFrame* FindPage( const SwRect &rRect, const SwFrame *pPage )
{
- if ( !rRect.IsOver( pPage->Frame() ) )
+ if ( !rRect.IsOver( pPage->FrameRA() ) )
{
const SwRootFrame* pRootFrame = static_cast<const SwRootFrame*>(pPage->GetUpper());
const SwFrame* pTmpPage = pRootFrame ? pRootFrame->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr;
@@ -3233,8 +3233,8 @@ SwFrame* GetFrameOfModify( const SwRootFrame* pLayout, SwModify const& rMod, SwF
// Note: The Writer fly frame could be the frame itself.
SwFlyFrame* pFlyFrame( pTmpFrame->FindFlyFrame() );
if ( pFlyFrame &&
- pFlyFrame->Frame().Pos().X() == FAR_AWAY &&
- pFlyFrame->Frame().Pos().Y() == FAR_AWAY )
+ pFlyFrame->FrameRA().Pos().X() == FAR_AWAY &&
+ pFlyFrame->FrameRA().Pos().Y() == FAR_AWAY )
{
SwObjectFormatter::FormatObj( *pFlyFrame );
}
@@ -3254,11 +3254,11 @@ SwFrame* GetFrameOfModify( const SwRootFrame* pLayout, SwModify const& rMod, SwF
// for Flys go via the parent if the Fly is not yet "formatted"
if( !bCalcFrame && pTmpFrame->GetType() & SwFrameType::Fly &&
static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame() &&
- FAR_AWAY == pTmpFrame->Frame().Pos().getX() &&
- FAR_AWAY == pTmpFrame->Frame().Pos().getY() )
- aCalcRect = static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame()->Frame();
+ FAR_AWAY == pTmpFrame->FrameRA().Pos().getX() &&
+ FAR_AWAY == pTmpFrame->FrameRA().Pos().getY() )
+ aCalcRect = static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame()->FrameRA();
else
- aCalcRect = pTmpFrame->Frame();
+ aCalcRect = pTmpFrame->FrameRA();
if ( aCalcRect.IsInside( *pPoint ) )
{
@@ -3304,8 +3304,8 @@ bool IsExtraData( const SwDoc *pDoc )
// OD 22.09.2003 #110978#
const SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const
{
- SwRect aPrtWithoutHeaderFooter( Prt() );
- aPrtWithoutHeaderFooter.Pos() += Frame().Pos();
+ SwRect aPrtWithoutHeaderFooter( PrintRA() );
+ aPrtWithoutHeaderFooter.Pos() += FrameRA().Pos();
const SwFrame* pLowerFrame = Lower();
while ( pLowerFrame )
@@ -3315,12 +3315,12 @@ const SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const
if ( pLowerFrame->IsHeaderFrame() )
{
aPrtWithoutHeaderFooter.Top( aPrtWithoutHeaderFooter.Top() +
- pLowerFrame->Frame().Height() );
+ pLowerFrame->FrameRA().Height() );
}
if ( pLowerFrame->IsFooterFrame() )
{
aPrtWithoutHeaderFooter.Bottom( aPrtWithoutHeaderFooter.Bottom() -
- pLowerFrame->Frame().Height() );
+ pLowerFrame->FrameRA().Height() );
}
pLowerFrame = pLowerFrame->GetNext();
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index d1a973f03033..f6ddc37391c8 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -162,7 +162,7 @@ static long lcl_Undersize( const SwFrame* pFrame )
{
// Does this TextFrame would like to be a little bit bigger?
nRet = static_cast<const SwTextFrame*>(pFrame)->GetParHeight() -
- aRectFnSet.GetHeight(pFrame->Prt());
+ aRectFnSet.GetHeight(pFrame->PrintRA());
if( nRet < 0 )
nRet = 0;
}
@@ -191,10 +191,10 @@ void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const
if ( !mbValidPrtArea )
{
mbValidPrtArea = true;
- aRectFnSet.SetTop( Prt(), nBorder );
- aRectFnSet.SetWidth( Prt(), aRectFnSet.GetWidth(Frame()) );
- aRectFnSet.SetHeight(Prt(), aRectFnSet.GetHeight(Frame()) - nBorder );
- if( aRectFnSet.GetHeight(Prt()) < 0 && !pPage->IsFootnotePage() )
+ aRectFnSet.SetTop( PrintWA(), nBorder );
+ aRectFnSet.SetWidth( PrintWA(), aRectFnSet.GetWidth(FrameRA()) );
+ aRectFnSet.SetHeight(PrintWA(), aRectFnSet.GetHeight(FrameRA()) - nBorder );
+ if( aRectFnSet.GetHeight(PrintRA()) < 0 && !pPage->IsFootnotePage() )
mbValidSize = false;
}
@@ -219,7 +219,7 @@ void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const
// would like to be bigger. They are created especially in
// columnized borders, if these do not have their maximum
// size yet.
- nRemaining += aRectFnSet.GetHeight(pFrame->Frame()) + lcl_Undersize( pFrame );
+ nRemaining += aRectFnSet.GetHeight(pFrame->FrameRA()) + lcl_Undersize( pFrame );
pFrame = pFrame->GetNext();
}
// add the own border
@@ -228,16 +228,16 @@ void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const
SwTwips nDiff;
if( IsInSct() )
{
- nDiff = -aRectFnSet.BottomDist( Frame(), aRectFnSet.GetPrtBottom(*GetUpper()) );
+ nDiff = -aRectFnSet.BottomDist( FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()) );
if( nDiff > 0 )
{
- if( nDiff > aRectFnSet.GetHeight(Frame()) )
- nDiff = aRectFnSet.GetHeight(Frame());
- aRectFnSet.AddBottom( Frame(), -nDiff );
- aRectFnSet.AddHeight( Prt(), -nDiff );
+ if( nDiff > aRectFnSet.GetHeight(FrameRA()) )
+ nDiff = aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.AddBottom( FrameWA(), -nDiff );
+ aRectFnSet.AddHeight( PrintWA(), -nDiff );
}
}
- nDiff = aRectFnSet.GetHeight(Frame()) - nRemaining;
+ nDiff = aRectFnSet.GetHeight(FrameRA()) - nRemaining;
if ( nDiff > 0 )
Shrink( nDiff );
else if ( nDiff < 0 )
@@ -246,12 +246,12 @@ void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const
// It may happen that there is less space available,
// than what the border needs - the size of the PrtArea
// will then be negative.
- SwTwips nPrtHeight = aRectFnSet.GetHeight(Prt());
+ SwTwips nPrtHeight = aRectFnSet.GetHeight(PrintRA());
if( nPrtHeight < 0 )
{
- const SwTwips nTmpDiff = std::max( aRectFnSet.GetTop(Prt()),
+ const SwTwips nTmpDiff = std::max( aRectFnSet.GetTop(PrintRA()),
-nPrtHeight );
- aRectFnSet.SubTop( Prt(), nTmpDiff );
+ aRectFnSet.SubTop( PrintWA(), nTmpDiff );
}
}
}
@@ -267,9 +267,9 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
assert(GetUpper() && GetUpper()->IsFootnoteBossFrame());
SwRectFnSet aRectFnSet(this);
- if( aRectFnSet.GetHeight(Frame()) > 0 &&
- nDist > ( LONG_MAX - aRectFnSet.GetHeight(Frame()) ) )
- nDist = LONG_MAX - aRectFnSet.GetHeight(Frame());
+ if( aRectFnSet.GetHeight(FrameRA()) > 0 &&
+ nDist > ( LONG_MAX - aRectFnSet.GetHeight(FrameRA()) ) )
+ nDist = LONG_MAX - aRectFnSet.GetHeight(FrameRA());
SwFootnoteBossFrame *pBoss = static_cast<SwFootnoteBossFrame*>(GetUpper());
if( IsInSct() )
@@ -293,7 +293,7 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
if ( pBoss->GetMaxFootnoteHeight() != LONG_MAX )
{
nDist = std::min( nDist, pBoss->GetMaxFootnoteHeight()
- - aRectFnSet.GetHeight(Frame()) );
+ - aRectFnSet.GetHeight(FrameRA()) );
if ( nDist <= 0 )
return 0L;
}
@@ -307,17 +307,17 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
return 0L;
}
}
- else if( nDist > aRectFnSet.GetHeight(GetPrev()->Frame()) )
+ else if( nDist > aRectFnSet.GetHeight(GetPrev()->FrameRA()) )
// do not use more space than the body has
- nDist = aRectFnSet.GetHeight(GetPrev()->Frame());
+ nDist = aRectFnSet.GetHeight(GetPrev()->FrameRA());
long nAvail = 0;
if ( bBrowseMode )
{
- nAvail = GetUpper()->Prt().Height();
+ nAvail = GetUpper()->PrintRA().Height();
const SwFrame *pAvail = GetUpper()->Lower();
do
- { nAvail -= pAvail->Frame().Height();
+ { nAvail -= pAvail->FrameRA().Height();
pAvail = pAvail->GetNext();
} while ( pAvail );
if ( nAvail > nDist )
@@ -326,10 +326,10 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
if ( !bTst )
{
- aRectFnSet.SetHeight( Frame(), aRectFnSet.GetHeight(Frame()) + nDist );
+ aRectFnSet.SetHeight( FrameWA(), aRectFnSet.GetHeight(FrameRA()) + nDist );
if( IsVertical() && !IsVertLR() && !IsReverse() )
- Frame().Pos().X() -= nDist;
+ FrameWA().Pos().X() -= nDist;
}
long nGrow = nDist - nAvail,
nReal = 0;
@@ -369,10 +369,10 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
{
nDist -= nReal;
// We can only respect the boundless wish so much
- Frame().SSize().Height() -= nDist;
+ FrameWA().SSize().Height() -= nDist;
if( IsVertical() && !IsVertLR() && !IsReverse() )
- Frame().Pos().X() += nDist;
+ FrameWA().Pos().X() += nDist;
}
// growing happens upwards, so successors to not need to be invalidated
@@ -496,8 +496,8 @@ void SwFootnoteFrame::Cut()
pSect->InvalidateSize_();
}
else
- { if ( Frame().Height() )
- pUp->Shrink( Frame().Height() );
+ { if ( FrameRA().Height() )
+ pUp->Shrink( FrameRA().Height() );
pUp->SetCompletePaint();
pUp->InvalidatePage();
}
@@ -517,15 +517,15 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
SwRectFnSet aRectFnSet(this);
- if( aRectFnSet.GetWidth(Frame())!=aRectFnSet.GetWidth(pParent->Prt()) )
+ if( aRectFnSet.GetWidth(FrameRA())!=aRectFnSet.GetWidth(pParent->PrintRA()) )
InvalidateSize_();
InvalidatePos_();
SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( GetNext() )
GetNext()->InvalidatePos_();
- if( aRectFnSet.GetHeight(Frame()) )
- pParent->Grow( aRectFnSet.GetHeight(Frame()) );
+ if( aRectFnSet.GetHeight(FrameRA()) )
+ pParent->Grow( aRectFnSet.GetHeight(FrameRA()) );
// If the predecessor is the master and/or the successor is the Follow,
// then take their content and destroy them.
@@ -1900,19 +1900,19 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b
while( pTmp && static_cast<SwLayoutFrame*>(pCnt)->IsAnLower( pTmp ) )
{
pTmp->Prepare( PREP_MOVEFTN );
- aRectFnSet.SetHeight(pTmp->Frame(), 0);
- aRectFnSet.SetHeight(pTmp->Prt(), 0);
+ aRectFnSet.SetHeight(pTmp->FrameWA(), 0);
+ aRectFnSet.SetHeight(pTmp->PrintWA(), 0);
pTmp = pTmp->FindNext();
}
}
else
pCnt->Prepare( PREP_MOVEFTN );
- aRectFnSet.SetHeight(pCnt->Frame(), 0);
- aRectFnSet.SetHeight(pCnt->Prt(), 0);
+ aRectFnSet.SetHeight(pCnt->FrameWA(), 0);
+ aRectFnSet.SetHeight(pCnt->PrintWA(), 0);
pCnt = pCnt->GetNext();
}
- aRectFnSet.SetHeight(pFootnote->Frame(), 0);
- aRectFnSet.SetHeight(pFootnote->Prt(), 0);
+ aRectFnSet.SetHeight(pFootnote->FrameWA(), 0);
+ aRectFnSet.SetHeight(pFootnote->PrintWA(), 0);
pFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut());
pFootnote->GetUpper()->Calc(getRootFrame()->GetCurrShell()->GetOut());
@@ -2175,7 +2175,7 @@ void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const boo
{
SwRectFnSet aRectFnSet(this);
SwFrame* pFootnoteContFrame = pFootnoteFrame->GetUpper();
- if ( aRectFnSet.TopDist(pFootnoteFrame->Frame(), aRectFnSet.GetPrtBottom(*pFootnoteContFrame)) > 0 )
+ if ( aRectFnSet.TopDist(pFootnoteFrame->FrameRA(), aRectFnSet.GetPrtBottom(*pFootnoteContFrame)) > 0 )
{
pFootnoteFrame->InvalidatePos_();
}
@@ -2366,10 +2366,10 @@ void SwFootnoteBossFrame::SetFootnoteDeadLine( const SwTwips nDeadLine )
if ( pCont )
{
pCont->Calc(getRootFrame()->GetCurrShell()->GetOut());
- m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pCont->Frame(), nDeadLine );
+ m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pCont->FrameRA(), nDeadLine );
}
else
- m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pBody->Frame(), nDeadLine );
+ m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pBody->FrameRA(), nDeadLine );
const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
@@ -2400,7 +2400,7 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
{
nRet = 0;
SwTwips nTmp = aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pBody),
- aRectFnSet.GetTop(Frame()) );
+ aRectFnSet.GetTop(FrameRA()) );
const SwSectionFrame* pSect = FindSctFrame();
// Endnotes in a ftncontainer causes a deadline:
// the bottom of the last contentfrm
@@ -2423,8 +2423,8 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
while( pFrame->GetNext() )
pFrame = pFrame->GetNext(); // last cntntfrm
nTmp += aRectFnSet.YDiff(
- aRectFnSet.GetTop(Frame()),
- aRectFnSet.GetBottom(pFrame->Frame()) );
+ aRectFnSet.GetTop(FrameRA()),
+ aRectFnSet.GetBottom(pFrame->FrameRA()) );
}
break;
}
@@ -2436,8 +2436,8 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
nRet = nTmp;
}
else
- nRet = - aRectFnSet.GetHeight(pPg->Prt())/5;
- nRet += aRectFnSet.GetHeight(pBody->Frame());
+ nRet = - aRectFnSet.GetHeight(pPg->PrintRA())/5;
+ nRet += aRectFnSet.GetHeight(pBody->FrameRA());
if( nRet < 0 )
nRet = 0;
}
@@ -2447,7 +2447,7 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
{
const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
- nRet += BROWSE_HEIGHT - Frame().Height();
+ nRet += BROWSE_HEIGHT - FrameRA().Height();
}
return nRet;
}
@@ -2700,8 +2700,8 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pO
pNewUp = new SwSectionFrame( *pSect, false );
pNewUp->InsertBefore( pTmpFootnote, pTmpFootnote->Lower() );
static_cast<SwSectionFrame*>(pNewUp)->Init();
- pNewUp->Frame().Pos() = pTmpFootnote->Frame().Pos();
- pNewUp->Frame().Pos().Y() += 1; // for notifications
+ pNewUp->FrameWA().Pos() = pTmpFootnote->FrameRA().Pos();
+ pNewUp->FrameWA().Pos().Y() += 1; // for notifications
// If the section frame has a successor then the latter needs
// to be moved behind the new Follow of the section frame.
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 150730c3423b..b34ce9b6933a 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->Frame().Height();
+ nTmp = pFrame->FrameRA().Height();
nRemaining += nTmp;
if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
{
nTmp = static_cast<SwTextFrame*>(pFrame)->GetParHeight()
- - pFrame->Prt().Height();
+ - pFrame->PrintRA().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.Frame().Height() < nMinHeight)
+ if (rFrame.FrameRA().Height() < nMinHeight)
{
- rFrame.Grow(nMinHeight - rFrame.Frame().Height());
+ rFrame.Grow(nMinHeight - rFrame.FrameRA().Height());
}
}
@@ -172,36 +172,36 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
// OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)>
SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this );
- maPrt.Left(pAttrs->CalcLeft(this));
+ PrintWA().Left(pAttrs->CalcLeft(this));
if (IsHeaderFrame())
- maPrt.Top(pAttrs->CalcTop());
+ PrintWA().Top(pAttrs->CalcTop());
else
- maPrt.Top(nSpace);
+ PrintWA().Top(nSpace);
- maPrt.Width(maFrame.Width() - nLR);
+ PrintWA().Width(FrameRA().Width() - nLR);
SwTwips nNewHeight;
- if (nUL < maFrame.Height())
- nNewHeight = maFrame.Height() - nUL;
+ if (nUL < FrameRA().Height())
+ nNewHeight = FrameRA().Height() - nUL;
else
nNewHeight = 0;
- maPrt.Height(nNewHeight);
+ PrintWA().Height(nNewHeight);
}
else
{
// Set position
- maPrt.Left( pAttrs->CalcLeft( this ) );
- maPrt.Top ( pAttrs->CalcTop() );
+ PrintWA().Left( pAttrs->CalcLeft( this ) );
+ PrintWA().Top ( pAttrs->CalcTop() );
// Set sizes - the sizes are given by the surrounding Frame, just
// subtract the borders.
// OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)>
SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this );
- maPrt.Width ( maFrame.Width() - nLR );
- maPrt.Height( maFrame.Height()- nUL );
+ PrintWA().Width ( FrameRA().Width() - nLR );
+ PrintWA().Height( FrameRA().Height()- nUL );
}
@@ -235,14 +235,14 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
do
{
- nOldHeight = Prt().Height();
+ nOldHeight = PrintRA().Height();
SwFrame* pFrame = Lower();
// #i64301#
if ( pFrame &&
- aOldFooterPrtPos != ( Frame().Pos() + Prt().Pos() ) )
+ aOldFooterPrtPos != ( FrameRA().Pos() + PrintRA().Pos() ) )
{
pFrame->InvalidatePos_();
- aOldFooterPrtPos = Frame().Pos() + Prt().Pos();
+ aOldFooterPrtPos = FrameRA().Pos() + PrintRA().Pos();
}
int nLoopControl = 0;
while( pFrame )
@@ -279,13 +279,13 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
while ( pFrame )
{
- nRemaining += pFrame->Frame().Height();
+ nRemaining += pFrame->FrameRA().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->Prt().Height();
+ - pFrame->PrintRA().Height();
else if( pFrame->IsSctFrame() &&
static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize();
@@ -362,19 +362,19 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
else
break;
// Don't overwrite the lower edge of the upper
- if ( GetUpper() && Frame().Height() )
+ if ( GetUpper() && FrameRA().Height() )
{
- const SwTwips nDeadLine = GetUpper()->Frame().Top() +
- GetUpper()->Prt().Bottom();
- const SwTwips nBot = Frame().Bottom();
+ const SwTwips nDeadLine = GetUpper()->FrameRA().Top() +
+ GetUpper()->PrintRA().Bottom();
+ const SwTwips nBot = FrameRA().Bottom();
if ( nBot > nDeadLine )
{
- Frame().Bottom( nDeadLine );
- Prt().SSize().Height() = Frame().Height() - nBorder;
+ FrameWA().Bottom( nDeadLine );
+ PrintWA().SSize().Height() = FrameRA().Height() - nBorder;
}
}
mbValidSize = mbValidPrtArea = true;
- } while( nRemaining<=nMaxHeight && nOldHeight!=Prt().Height() );
+ } while( nRemaining<=nMaxHeight && nOldHeight!=PrintRA().Height() );
ColUnlock();
}
mbValidSize = mbValidPrtArea = true;
@@ -383,8 +383,8 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
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 );
@@ -444,9 +444,9 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
/* calculate maximum eatable spacing */
if (IsHeaderFrame())
- nMaxEat = maFrame.Height() - maPrt.Top() - maPrt.Height() - pAttrs->CalcBottomLine();
+ nMaxEat = FrameRA().Height() - PrintRA().Top() - PrintRA().Height() - pAttrs->CalcBottomLine();
else
- nMaxEat = maPrt.Top() - pAttrs->CalcTopLine();
+ nMaxEat = PrintRA().Top() - pAttrs->CalcTopLine();
if (nMaxEat < 0)
nMaxEat = 0;
@@ -454,7 +454,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 - Frame().Height();
+ SwTwips nFrameTooSmall = nMinHeight - FrameRA().Height();
if (nFrameTooSmall > 0)
nEat -= nFrameTooSmall;
@@ -475,8 +475,8 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if (! IsHeaderFrame())
{
- maPrt.Top(maPrt.Top() - nEat);
- maPrt.Height(maPrt.Height() - nEat);
+ PrintWA().Top(PrintRA().Top() - nEat);
+ PrintWA().Height(PrintRA().Height() - nEat);
}
InvalidateAll();
@@ -532,7 +532,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
nResult = 0;
SwTwips nMinHeight = lcl_GetFrameMinHeight(*this);
- SwTwips nOldHeight = Frame().Height();
+ SwTwips nOldHeight = FrameRA().Height();
SwTwips nRest = 0; // Amount to shrink by spitting out spacing
if ( nOldHeight >= nMinHeight )
@@ -578,7 +578,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
SwTwips nShrink = nRest;
/* calculate maximum shrinking */
- SwTwips nMaxShrink = maPrt.Height() - nMinPrtHeight;
+ SwTwips nMaxShrink = PrintRA().Height() - nMinPrtHeight;
/* shrink no more than maximum shrinking */
if (nShrink > nMaxShrink)
@@ -591,8 +591,8 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if (! IsHeaderFrame() )
{
- maPrt.Top(maPrt.Top() + nShrink);
- maPrt.Height(maPrt.Height() - nShrink);
+ PrintWA().Top(PrintRA().Top() + nShrink);
+ PrintWA().Height(PrintRA().Height() - nShrink);
}
InvalidateAll();
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index bae8b8390df1..e223c153774c 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -122,7 +122,7 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrame *p
SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrame();
- if ( pFly == pSelfFly || !rRect.IsOver( pFly->Frame() ) )
+ if ( pFly == pSelfFly || !rRect.IsOver( pFly->FrameRA() ) )
continue;
if ( pSelfFly && pSelfFly->IsLowerOf( pFly ) )
@@ -169,7 +169,7 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrame *p
continue;
}
- aTmp -= pFly->Frame();
+ aTmp -= pFly->FrameRA();
}
bool bRetPaint = false;
@@ -214,7 +214,7 @@ void SwLayAction::PaintContent( const SwContentFrame *pCnt,
// paint the area between printing bottom and frame bottom and
// the area left and right beside the frame, if its height changed.
long nOldHeight = aRectFnSet.GetHeight(rOldRect);
- long nNewHeight = aRectFnSet.GetHeight(pCnt->Frame());
+ long nNewHeight = aRectFnSet.GetHeight(pCnt->FrameRA());
const bool bHeightDiff = nOldHeight != nNewHeight;
if( bHeightDiff )
{
@@ -675,7 +675,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
XCHECKPAGE;
const SwRect &rVis = m_pImp->GetShell()->VisArea();
- while( pPg && pPg->Frame().Bottom() < rVis.Top() )
+ while( pPg && pPg->FrameRA().Bottom() < rVis.Top() )
pPg = static_cast<SwPageFrame*>(pPg->GetNext());
if( pPg != pPage )
pPg = pPg ? static_cast<SwPageFrame*>(pPg->GetPrev()) : pPage;
@@ -686,7 +686,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// #i42586# - format current page, if idle action is active
// This is an optimization for the case that the interrupt is created by
// the move of a form control object, which is represented by a window.
- while ( pPg && ( pPg->Frame().Top() < nBottom ||
+ while ( pPg && ( pPg->FrameRA().Top() < nBottom ||
( IsIdle() && pPg == pPage ) ) )
{
unlockPositionOfObjects( pPg );
@@ -780,9 +780,9 @@ bool SwLayAction::TurboAction_( const SwContentFrame *pCnt )
if ( !pCnt->IsValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() )
{
const SwRect aOldRect( pCnt->UnionFrame( true ) );
- const long nOldBottom = pCnt->Frame().Top() + pCnt->Prt().Bottom();
+ const long nOldBottom = pCnt->FrameRA().Top() + pCnt->PrintRA().Bottom();
pCnt->Calc(m_pImp->GetShell()->GetOut());
- if ( pCnt->Frame().Bottom() < aOldRect.Bottom() )
+ if ( pCnt->FrameRA().Bottom() < aOldRect.Bottom() )
pCnt->SetRetouche();
pPage = pCnt->FindPageFrame();
@@ -795,7 +795,7 @@ bool SwLayAction::TurboAction_( const SwContentFrame *pCnt )
if ( nAllLines != static_cast<const SwTextFrame*>(pCnt)->GetAllLines() )
{
if ( IsPaintExtraData() )
- m_pImp->GetShell()->AddPaintRect( pCnt->Frame() );
+ m_pImp->GetShell()->AddPaintRect( pCnt->FrameRA() );
// This is to calculate the remaining LineNums on the page,
// and we don't stop processing here. To perform this inside RecalcAllLines
// would be expensive, because we would have to notify the page even
@@ -850,7 +850,7 @@ bool SwLayAction::TurboAction()
static bool lcl_IsInvaLay( const SwFrame *pFrame, long nBottom )
{
return !pFrame->IsValid() ||
- (pFrame->IsCompletePaint() && ( pFrame->Frame().Top() < nBottom ) );
+ (pFrame->IsCompletePaint() && ( pFrame->FrameRA().Top() < nBottom ) );
}
static const SwFrame *lcl_FindFirstInvaLay( const SwFrame *pFrame, long nBottom )
@@ -884,7 +884,7 @@ static const SwFrame *lcl_FindFirstInvaContent( const SwLayoutFrame *pLay, long
{
if ( !pCnt->IsValid() || pCnt->IsCompletePaint() )
{
- if ( pCnt->Frame().Top() <= nBottom )
+ if ( pCnt->FrameRA().Top() <= nBottom )
return pCnt;
}
@@ -901,17 +901,17 @@ static const SwFrame *lcl_FindFirstInvaContent( const SwLayoutFrame *pLay, long
if ( static_cast<const SwFlyInContentFrame*>(pFly)->IsInvalid() ||
pFly->IsCompletePaint() )
{
- if ( pFly->Frame().Top() <= nBottom )
+ if ( pFly->FrameRA().Top() <= nBottom )
return pFly;
}
const SwFrame *pFrame = lcl_FindFirstInvaContent( pFly, nBottom, nullptr );
- if ( pFrame && pFrame->Frame().Bottom() <= nBottom )
+ if ( pFrame && pFrame->FrameRA().Bottom() <= nBottom )
return pFrame;
}
}
}
}
- if ( pCnt->Frame().Top() > nBottom && !pCnt->IsInTab() )
+ if ( pCnt->FrameRA().Top() > nBottom && !pCnt->IsInTab() )
return nullptr;
pCnt = pCnt->GetNextContentFrame();
if ( !pLay->IsAnLower( pCnt ) )
@@ -931,14 +931,14 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrame* _pPage,
if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr )
{
const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pObj);
- if ( pFly->Frame().Top() <= _nBottom )
+ if ( pFly->FrameRA().Top() <= _nBottom )
{
if ( pFly->IsInvalid() || pFly->IsCompletePaint() )
return pFly;
const SwFrame* pTmp;
if ( nullptr != (pTmp = lcl_FindFirstInvaContent( pFly, _nBottom, nullptr )) &&
- pTmp->Frame().Top() <= _nBottom )
+ pTmp->FrameRA().Top() <= _nBottom )
return pFly;
}
}
@@ -994,8 +994,8 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
}
const SwRect &rVis = m_pImp->GetShell()->VisArea();
- if ( (prPage->Frame().Top() >= rVis.Bottom()) ||
- (prPage->Frame().Left()>= rVis.Right()) )
+ if ( (prPage->FrameRA().Top() >= rVis.Bottom()) ||
+ (prPage->FrameRA().Left()>= rVis.Right()) )
{
bRet = true;
@@ -1040,8 +1040,8 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
pLst = pContent->FindSctFrame();
pLst = pLst->FindPrev();
if ( pLst &&
- (pLst->Frame().Top() >= rVis.Bottom() ||
- pLst->Frame().Left()>= rVis.Right()) )
+ (pLst->FrameRA().Top() >= rVis.Bottom() ||
+ pLst->FrameRA().Left()>= rVis.Right()) )
{
bTstCnt = false;
}
@@ -1160,13 +1160,13 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
const SwFrame* pFrame( nullptr );
if ( prPage->IsInvalidLayout() &&
nullptr != (pFrame = lcl_FindFirstInvaLay( prPage, nBottom )) &&
- pFrame->Frame().Top() <= nBottom )
+ pFrame->FrameRA().Top() <= nBottom )
{
return false;
}
if ( (prPage->IsInvalidContent() || prPage->IsInvalidFlyInCnt()) &&
nullptr != (pFrame = lcl_FindFirstInvaContent( prPage, nBottom, nullptr )) &&
- pFrame->Frame().Top() <= nBottom )
+ pFrame->FrameRA().Top() <= nBottom )
{
return false;
}
@@ -1192,7 +1192,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
if ( pLay->GetPrev() && !pLay->GetPrev()->IsValid() )
pLay->GetPrev()->SetCompletePaint();
- SwRect aOldFrame( pLay->Frame() );
+ SwRect aOldFrame( pLay->FrameRA() );
SwRect aOldRect( aOldFrame );
if( pLay->IsPageFrame() )
{
@@ -1204,12 +1204,12 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
pLay->Calc(pRenderContext);
}
- if ( aOldFrame != pLay->Frame() )
+ if ( aOldFrame != pLay->FrameRA() )
bChanged = true;
bool bNoPaint = false;
if ( pLay->IsPageBodyFrame() &&
- pLay->Frame().Pos() == aOldRect.Pos() &&
+ pLay->FrameRA().Pos() == aOldRect.Pos() &&
pLay->Lower() )
{
const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell();
@@ -1221,7 +1221,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
if ( !bNoPaint && IsPaint() && bAddRect && (pLay->IsCompletePaint() || bChanged) )
{
- SwRect aPaint( pLay->Frame() );
+ SwRect aPaint( pLay->FrameRA() );
// consider border and shadow for
// page frames -> enlarge paint rectangle correspondingly.
if ( pLay->IsPageFrame() )
@@ -1265,7 +1265,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
m_pImp->GetShell()->AddPaintRect( aPaint );
bAlreadyPainted = true;
// remember frame at complete paint
- aFrameAtCompletePaint = pLay->Frame();
+ aFrameAtCompletePaint = pLay->FrameRA();
}
// provide paint of spacing
@@ -1279,7 +1279,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
const bool bPrev = bLeftToRightViewLayout ? pLay->GetPrev() : pLay->GetNext();
const bool bNext = bLeftToRightViewLayout ? pLay->GetNext() : pLay->GetPrev();
SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(pLay);
- SwRect aPageRect( pLay->Frame() );
+ SwRect aPageRect( pLay->FrameRA() );
if(pSh)
{
@@ -1294,14 +1294,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
// top
SwRect aSpaceToPrevPage( aPageRect );
aSpaceToPrevPage.Top( aSpaceToPrevPage.Top() - nHalfDocBorder );
- aSpaceToPrevPage.Bottom( pLay->Frame().Top() );
+ aSpaceToPrevPage.Bottom( pLay->FrameRA().Top() );
if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage );
// left
aSpaceToPrevPage = aPageRect;
aSpaceToPrevPage.Left( aSpaceToPrevPage.Left() - nHalfDocBorder );
- aSpaceToPrevPage.Right( pLay->Frame().Left() );
+ aSpaceToPrevPage.Right( pLay->FrameRA().Left() );
if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage );
}
@@ -1310,14 +1310,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
// bottom
SwRect aSpaceToNextPage( aPageRect );
aSpaceToNextPage.Bottom( aSpaceToNextPage.Bottom() + nHalfDocBorder );
- aSpaceToNextPage.Top( pLay->Frame().Bottom() );
+ aSpaceToNextPage.Top( pLay->FrameRA().Bottom() );
if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage );
// right
aSpaceToNextPage = aPageRect;
aSpaceToNextPage.Right( aSpaceToNextPage.Right() + nHalfDocBorder );
- aSpaceToNextPage.Left( pLay->Frame().Right() );
+ aSpaceToNextPage.Left( pLay->FrameRA().Right() );
if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage );
}
@@ -1374,7 +1374,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
// add complete frame area as paint area, if frame
// area has been already added and after formatting its lowers the frame area
// is enlarged.
- SwRect aBoundRect(pLay->IsPageFrame() ? static_cast<SwPageFrame*>(pLay)->GetBoundRect(pRenderContext) : pLay->Frame() );
+ SwRect aBoundRect(pLay->IsPageFrame() ? static_cast<SwPageFrame*>(pLay)->GetBoundRect(pRenderContext) : pLay->FrameRA() );
if ( bAlreadyPainted &&
( aBoundRect.Width() > aFrameAtCompletePaint.Width() ||
@@ -1399,13 +1399,13 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrame* pFly )
if ( !pFly->IsValid() || pFly->IsCompletePaint() || pFly->IsInvalid() )
{
// The Frame has changed, now it's getting formatted.
- const SwRect aOldRect( pFly->Frame() );
+ const SwRect aOldRect( pFly->FrameRA() );
pFly->Calc(pRenderContext);
- bChanged = aOldRect != pFly->Frame();
+ bChanged = aOldRect != pFly->FrameRA();
if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) &&
- pFly->Frame().Top() > 0 && pFly->Frame().Left() > 0 )
- m_pImp->GetShell()->AddPaintRect( pFly->Frame() );
+ pFly->FrameRA().Top() > 0 && pFly->FrameRA().Left() > 0 )
+ m_pImp->GetShell()->AddPaintRect( pFly->FrameRA() );
if ( bChanged )
pFly->Invalidate();
@@ -1462,10 +1462,10 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
pTab->GetPrev()->SetCompletePaint();
}
- const SwRect aOldRect( pTab->Frame() );
+ const SwRect aOldRect( pTab->FrameRA() );
pTab->SetLowersFormatted( false );
pTab->Calc(pRenderContext);
- if ( aOldRect != pTab->Frame() )
+ if ( aOldRect != pTab->FrameRA() )
{
bChanged = true;
}
@@ -1473,13 +1473,13 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
if ( IsPaint() && bAddRect )
{
- // add condition <pTab->Frame().HasArea()>
+ // add condition <pTab->FrameRA().HasArea()>
if ( !pTab->IsCompletePaint() &&
pTab->IsComplete() &&
- ( pTab->Frame().SSize() != pTab->Prt().SSize() ||
+ ( pTab->FrameRA().SSize() != pTab->PrintRA().SSize() ||
// vertical layout support
aRectFnSet.GetLeftMargin(*pTab) ) &&
- pTab->Frame().HasArea()
+ pTab->FrameRA().HasArea()
)
{
// re-implement calculation of margin rectangles.
@@ -1488,14 +1488,14 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
SwTwips nLeftMargin = aRectFnSet.GetLeftMargin(*pTab);
if ( nLeftMargin > 0)
{
- aMarginRect = pTab->Frame();
+ aMarginRect = pTab->FrameRA();
aRectFnSet.SetWidth( aMarginRect, nLeftMargin );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
if ( aRectFnSet.GetRightMargin(*pTab) > 0)
{
- aMarginRect = pTab->Frame();
+ aMarginRect = pTab->FrameRA();
aRectFnSet.SetLeft( aMarginRect, aRectFnSet.GetPrtRight(*pTab) );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
@@ -1503,14 +1503,14 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
SwTwips nTopMargin = aRectFnSet.GetTopMargin(*pTab);
if ( nTopMargin > 0)
{
- aMarginRect = pTab->Frame();
+ aMarginRect = pTab->FrameRA();
aRectFnSet.SetHeight( aMarginRect, nTopMargin );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
if ( aRectFnSet.GetBottomMargin(*pTab) > 0)
{
- aMarginRect = pTab->Frame();
+ aMarginRect = pTab->FrameRA();
aRectFnSet.SetTop( aMarginRect, aRectFnSet.GetPrtBottom(*pTab) );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
@@ -1555,7 +1555,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
// Ugly shortcut!
if ( pTab->IsLowersFormatted() &&
- (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->Frame())) )
+ (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->FrameRA())) )
return false;
// Now, deal with the lowers
@@ -1631,7 +1631,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() )
- m_pImp->GetShell()->AddPaintRect( pContent->Frame() );
+ m_pImp->GetShell()->AddPaintRect( pContent->FrameRA() );
}
if ( IsAgain() )
@@ -1690,7 +1690,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
if ( bSetContent )
{
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
- pContent->Frame().Top() > m_pImp->GetShell()->VisArea().Bottom())
+ pContent->FrameRA().Top() > m_pImp->GetShell()->VisArea().Bottom())
{
const long nBottom = m_pImp->GetShell()->VisArea().Bottom();
const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage,
@@ -1725,13 +1725,13 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() )
- m_pImp->GetShell()->AddPaintRect( pContent->Frame() );
+ m_pImp->GetShell()->AddPaintRect( pContent->FrameRA() );
}
// Do this if the frame has been formatted before.
if ( pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() &&
IsPaint() )
- PaintContent( pContent, pPage, pContent->Frame(), pContent->Frame().Bottom());
+ PaintContent( pContent, pPage, pContent->FrameRA(), pContent->FrameRA().Bottom());
if ( IsIdle() )
{
CheckIdleEnd();
@@ -1740,7 +1740,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
return false;
}
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
- pContent->Frame().Top() > m_pImp->GetShell()->VisArea().Bottom())
+ pContent->FrameRA().Top() > m_pImp->GetShell()->VisArea().Bottom())
{
const long nBottom = m_pImp->GetShell()->VisArea().Bottom();
const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage,
@@ -1781,7 +1781,7 @@ void SwLayAction::FormatContent_( const SwContentFrame *pContent,
pContent->OptCalc();
if( IsAgain() )
return;
- if( aRectFnSet.YDiff( aRectFnSet.GetBottom(pContent->Frame()),
+ if( aRectFnSet.YDiff( aRectFnSet.GetBottom(pContent->FrameRA()),
aRectFnSet.GetBottom(aOldRect) ) < 0 )
{
pContent->SetRetouche();
@@ -1791,8 +1791,8 @@ void SwLayAction::FormatContent_( const SwContentFrame *pContent,
else
{
if ( IsPaint() && pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() )
- PaintContent( pContent, pPage, pContent->Frame(),
- aRectFnSet.GetBottom(pContent->Frame()) );
+ PaintContent( pContent, pPage, pContent->FrameRA(),
+ aRectFnSet.GetBottom(pContent->FrameRA()) );
pContent->OptCalc();
}
}
@@ -1825,7 +1825,7 @@ bool SwLayAction::FormatFlyContent( const SwFlyFrame *pFly )
const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() )
- m_pImp->GetShell()->AddPaintRect( pContent->Frame() );
+ m_pImp->GetShell()->AddPaintRect( pContent->FrameRA() );
}
if ( IsAgain() )
@@ -2047,7 +2047,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly )
pPage = static_cast<SwPageFrame*>(pPage->GetNext());
if ( pPage && bVisAreaOnly &&
- !pPage->Frame().IsOver( pImp->GetShell()->VisArea()))
+ !pPage->FrameRA().IsOver( pImp->GetShell()->VisArea()))
break;
}
return false;
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index fb3b14b403b7..e6e44a7ce007 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -281,7 +281,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
{
if (SwFlyFrame *pFly = dynamic_cast<SwFlyFrame*>(pAnchoredObj))
{
- if( pFly->Frame().Left() != FAR_AWAY &&
+ if( pFly->FrameRA().Left() != FAR_AWAY &&
!pFly->GetAnchorFrame()->FindFooterOrHeader() )
{
const SwContact *pC =
@@ -294,9 +294,9 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
aIo.OpenRec( SW_LAYCACHE_IO_REC_FLY );
aIo.OpenFlagRec( 0, 0 );
aIo.CloseFlagRec();
- SwRect &rRct = pFly->Frame();
- sal_Int32 nX = rRct.Left() - pPage->Frame().Left();
- sal_Int32 nY = rRct.Top() - pPage->Frame().Top();
+ const SwRect& rRct = pFly->FrameRA();
+ sal_Int32 nX = rRct.Left() - pPage->FrameRA().Left();
+ sal_Int32 nY = rRct.Top() - pPage->FrameRA().Top();
aIo.GetStream().WriteUInt16( nPageNum ).WriteUInt32( nOrdNum )
.WriteInt32( nX ).WriteInt32( nY )
.WriteInt32( rRct.Width() )
@@ -805,8 +805,8 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
if( bSplit )
{
mrpFrame->InsertBehind( mrpLay, mrpPrv );
- mrpFrame->Frame().Pos() = mrpLay->Frame().Pos();
- mrpFrame->Frame().Pos().Y() += 1;
+ mrpFrame->FrameWA().Pos() = mrpLay->FrameRA().Pos();
+ mrpFrame->FrameWA().Pos().Y() += 1;
mrpPrv = mrpFrame;
if( mrpFrame->IsTabFrame() )
{
@@ -876,7 +876,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
CheckFlyCache_( pLastPage );
if( mrpPrv && mrpPrv->IsTextFrame() && !mrpPrv->GetValidSizeFlag() )
- mrpPrv->Frame().Height( mrpPrv->GetUpper()->Prt().Height() );
+ mrpPrv->FrameWA().Height( mrpPrv->GetUpper()->PrintRA().Height() );
bRet = true;
mrpPrv = nullptr;
@@ -904,8 +904,8 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
pSct->InsertBehind( mrpLay, nullptr );
if( bInit )
pSct->Init();
- pSct->Frame().Pos() = mrpLay->Frame().Pos();
- pSct->Frame().Pos().Y() += 1; //because of the notifications
+ pSct->FrameWA().Pos() = mrpLay->FrameRA().Pos();
+ pSct->FrameWA().Pos().Y() += 1; //because of the notifications
mrpLay = pSct;
if ( mrpLay->Lower() && mrpLay->Lower()->IsLayoutFrame() )
@@ -1001,17 +1001,17 @@ void SwLayHelper::CheckFlyCache_( SwPageFrame* pPage )
const SwFlyCache* pFlyCache = *aFlyCacheSetIt;
SwFlyFrame* pFly = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(*aFlySetIt))->GetFlyFrame();
- if ( pFly->Frame().Left() == FAR_AWAY )
+ if ( pFly->FrameRA().Left() == FAR_AWAY )
{
// we get the stored information
- pFly->Frame().Pos().X() = pFlyCache->Left() +
- pPage->Frame().Left();
- pFly->Frame().Pos().Y() = pFlyCache->Top() +
- pPage->Frame().Top();
+ pFly->FrameWA().Pos().X() = pFlyCache->Left() +
+ pPage->FrameRA().Left();
+ pFly->FrameWA().Pos().Y() = pFlyCache->Top() +
+ pPage->FrameRA().Top();
if ( mpImpl->IsUseFlyCache() )
{
- pFly->Frame().Width( pFlyCache->Width() );
- pFly->Frame().Height( pFlyCache->Height() );
+ pFly->FrameWA().Width( pFlyCache->Width() );
+ pFly->FrameWA().Height( pFlyCache->Height() );
}
}
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index f0b9159bb004..8ce796b907be 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -437,10 +437,10 @@ bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc,
// create hash map key
tMoveBwdLayoutInfoKey aMoveBwdLayoutInfo;
aMoveBwdLayoutInfo.mnFrameId = p_rFlowFrame.GetFrame().GetFrameId();
- aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrame.Frame().Pos().X();
- aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrame.Frame().Pos().Y();
- aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrame.Frame().Width();
- aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrame.Frame().Height();
+ aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrame.FrameRA().Pos().X();
+ aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrame.FrameRA().Pos().Y();
+ aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrame.FrameRA().Width();
+ aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrame.FrameRA().Height();
SwRectFnSet aRectFnSet(&p_rNewUpperFrame);
const SwFrame* pLastLower( p_rNewUpperFrame.Lower() );
while ( pLastLower && pLastLower->GetNext() )
@@ -449,8 +449,8 @@ bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc,
}
aMoveBwdLayoutInfo.mnFreeSpaceInNewUpper =
pLastLower
- ? aRectFnSet.BottomDist( pLastLower->Frame(), aRectFnSet.GetPrtBottom(p_rNewUpperFrame) )
- : aRectFnSet.GetHeight(p_rNewUpperFrame.Frame());
+ ? aRectFnSet.BottomDist( pLastLower->FrameRA(), aRectFnSet.GetPrtBottom(p_rNewUpperFrame) )
+ : aRectFnSet.GetHeight(p_rNewUpperFrame.FrameRA());
// check for moving backward suppress threshold
const sal_uInt16 cMoveBwdCountSuppressThreshold = 20;
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 23c068c0dd7f..d173d710e6e8 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -501,7 +501,7 @@ void SwRootFrame::Init( SwFrameFormat* pFormat )
// Disable "multiple layout"
mpDrawPage = pMd->GetPage(0);
- mpDrawPage->SetSize( Frame().SSize() );
+ mpDrawPage->SetSize( FrameRA().SSize() );
}
// Initialize the layout: create pages, link content with Content etc.
@@ -565,7 +565,7 @@ void SwRootFrame::Init( SwFrameFormat* pFormat )
//b6433357: Update page fields after loading
if ( !mpCurrShell || !mpCurrShell->Imp()->IsUpdateExpFields() )
{
- SwDocPosUpdate aMsgHint( pPage->Frame().Top() );
+ SwDocPosUpdate aMsgHint( pPage->FrameRA().Top() );
rFieldsAccess.UpdatePageFields( &aMsgHint );
}
@@ -654,7 +654,7 @@ void SwRootFrame::AllInvalidateAutoCompleteWords() const
void SwRootFrame::AllAddPaintRect() const
{
- GetCurrShell()->AddPaintRect( Frame() );
+ GetCurrShell()->AddPaintRect( FrameRA() );
}
void SwRootFrame::AllRemoveFootnotes()
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index d689eaf6e4df..8d2fff147361 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -76,27 +76,27 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
if ( !mbValidSize )
{
- SwTwips nHeight = GetUpper()->Prt().Height();
- SwTwips nWidth = GetUpper()->Prt().Width();
+ SwTwips nHeight = GetUpper()->PrintRA().Height();
+ SwTwips nWidth = GetUpper()->PrintRA().Width();
const SwFrame *pFrame = GetUpper()->Lower();
do
{
if ( pFrame != this )
{
if( pFrame->IsVertical() )
- nWidth -= pFrame->Frame().Width();
+ nWidth -= pFrame->FrameRA().Width();
else
- nHeight -= pFrame->Frame().Height();
+ nHeight -= pFrame->FrameRA().Height();
}
pFrame = pFrame->GetNext();
} while ( pFrame );
if ( nHeight < 0 )
nHeight = 0;
- Frame().Height( nHeight );
+ FrameWA().Height( nHeight );
- if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frame().Width() )
- Frame().Pos().setX(Frame().Pos().getX() + Frame().Width() - nWidth);
- Frame().Width( nWidth );
+ if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != FrameRA().Width() )
+ FrameWA().Pos().setX(FrameRA().Pos().getX() + FrameRA().Width() - nWidth);
+ FrameWA().Width( nWidth );
}
bool bNoGrid = true;
@@ -109,7 +109,7 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
bNoGrid = false;
long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
SwRectFnSet aRectFnSet(this);
- long nSize = aRectFnSet.GetWidth(Frame());
+ long nSize = aRectFnSet.GetWidth(FrameRA());
long nBorder = 0;
if( GRID_LINES_CHARS == pGrid->GetGridType() )
{
@@ -119,11 +119,11 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
nSize -= nBorder;
nBorder /= 2;
}
- aRectFnSet.SetPosX( Prt(), nBorder );
- aRectFnSet.SetWidth( Prt(), nSize );
+ aRectFnSet.SetPosX( PrintWA(), nBorder );
+ aRectFnSet.SetWidth( PrintWA(), nSize );
// Height of body frame:
- nBorder = aRectFnSet.GetHeight(Frame());
+ nBorder = aRectFnSet.GetHeight(FrameRA());
// Number of possible lines in area of body frame:
long nNumberOfLines = nBorder / nSum;
@@ -139,16 +139,16 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
const bool bAdjust = static_cast<SwPageFrame*>(GetUpper())->GetFormat()->GetDoc()->
GetFootnoteIdxs().empty();
- aRectFnSet.SetPosY( Prt(), bAdjust ? nBorder : 0 );
- aRectFnSet.SetHeight( Prt(), nSize );
+ aRectFnSet.SetPosY( PrintWA(), bAdjust ? nBorder : 0 );
+ aRectFnSet.SetHeight( PrintWA(), nSize );
}
}
if( bNoGrid )
{
- Prt().Pos().setX(0);
- Prt().Pos().setY(0);
- Prt().Height( Frame().Height() );
- Prt().Width( Frame().Width() );
+ PrintWA().Pos().setX(0);
+ PrintWA().Pos().setY(0);
+ PrintWA().Height( FrameRA().Height() );
+ PrintWA().Width( FrameRA().Width() );
}
mbValidSize = mbValidPrtArea = true;
}
@@ -181,14 +181,14 @@ SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPg
vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr;
if ( bBrowseMode )
{
- Frame().Height( 0 );
+ FrameWA().Height( 0 );
long nWidth = pSh->VisArea().Width();
if ( !nWidth )
nWidth = 5000; // changes anyway
- Frame().Width ( nWidth );
+ FrameWA().Width ( nWidth );
}
else
- Frame().SSize( pFormat->GetFrameSize().GetSize() );
+ FrameWA().SSize( pFormat->GetFrameSize().GetSize() );
// create and insert body area if it is not a blank page
SwDoc *pDoc = pFormat->GetDoc();
@@ -198,7 +198,7 @@ SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPg
m_bEmptyPage = false;
Calc(pRenderContext); // so that the PrtArea is correct
SwBodyFrame *pBodyFrame = new SwBodyFrame( pDoc->GetDfltFrameFormat(), this );
- pBodyFrame->ChgSize( Prt().SSize() );
+ pBodyFrame->ChgSize( PrintRA().SSize() );
pBodyFrame->Paste( this );
pBodyFrame->Calc(pRenderContext); // so that the columns can be inserted correctly
pBodyFrame->InvalidatePos();
@@ -261,7 +261,7 @@ void SwPageFrame::DestroyImpl()
// including border and shadow area.
const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT);
SwRect aRetoucheRect;
- SwPageFrame::GetBorderAndShadowBoundRect( Frame(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
+ SwPageFrame::GetBorderAndShadowBoundRect( FrameRA(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
pSh->AddPaintRect( aRetoucheRect );
}
}
@@ -578,7 +578,7 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
}
case RES_FRM_SIZE:
{
- const SwRect aOldPageFrameRect( Frame() );
+ const SwRect aOldPageFrameRect( FrameRA() );
SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
@@ -600,8 +600,8 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
static_cast<const SwFormatChg*>(pNew)->pChangedFormat->GetFrameSize() :
static_cast<const SwFormatFrameSize&>(*pNew);
- Frame().Height( std::max( rSz.GetHeight(), long(MINLAY) ) );
- Frame().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
+ FrameWA().Height( std::max( rSz.GetHeight(), long(MINLAY) ) );
+ FrameWA().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
if ( GetUpper() )
static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
@@ -618,7 +618,7 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
pSh->InvalidateWindows( aOldRectWithBorderAndShadow );
}
rInvFlags |= 0x03;
- if ( aOldPageFrameRect.Height() != Frame().Height() )
+ if ( aOldPageFrameRect.Height() != FrameRA().Height() )
rInvFlags |= 0x04;
}
break;
@@ -771,7 +771,7 @@ void AdjustSizeChgNotify( SwRootFrame *pRoot )
{
rSh.SizeChgNotify();
if ( rSh.Imp() )
- rSh.Imp()->NotifySizeChg( pRoot->Frame().SSize() );
+ rSh.Imp()->NotifySizeChg( pRoot->FrameRA().SSize() );
}
}
}
@@ -819,7 +819,7 @@ void SwPageFrame::Cut()
}
// cleanup Window
if ( pSh && pSh->GetWin() )
- pSh->InvalidateWindows( Frame() );
+ pSh->InvalidateWindows( FrameRA() );
}
// decrease the root's page number
@@ -877,7 +877,7 @@ void SwPageFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
else
::SetLastPage( this );
- if( Frame().Width() != pParent->Prt().Width() )
+ if( FrameRA().Width() != pParent->PrintRA().Width() )
InvalidateSize_();
InvalidatePos();
@@ -1002,7 +1002,7 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
// invalidate the field, starting from here
if ( nDocPos == LONG_MAX )
- nDocPos = pPrevPage ? pPrevPage->Frame().Top() : pPage->Frame().Top();
+ nDocPos = pPrevPage ? pPrevPage->FrameRA().Top() : pPage->FrameRA().Top();
// Cases:
// 1. Empty page should be "normal" page -> remove empty page and take next one
@@ -1298,7 +1298,7 @@ SwPageFrame *SwFrame::InsertPage( SwPageFrame *pPrevPage, bool bFootnote )
SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( !pSh || !pSh->Imp()->IsUpdateExpFields() )
{
- SwDocPosUpdate aMsgHint( pPrevPage->Frame().Top() );
+ SwDocPosUpdate aMsgHint( pPrevPage->FrameRA().Top() );
pDoc->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
return pPage;
@@ -1326,17 +1326,17 @@ sw::sidebarwindows::SidebarPosition SwPageFrame::SidebarPosition() const
SwTwips SwRootFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
{
if ( !bTst )
- Frame().SSize().Height() += nDist;
+ FrameWA().SSize().Height() += nDist;
return nDist;
}
SwTwips SwRootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool )
{
OSL_ENSURE( nDist >= 0, "nDist < 0." );
- OSL_ENSURE( nDist <= Frame().Height(), "nDist greater than current size." );
+ OSL_ENSURE( nDist <= FrameRA().Height(), "nDist greater than current size." );
if ( !bTst )
- Frame().SSize().Height() -= nDist;
+ FrameWA().SSize().Height() -= nDist;
return nDist;
}
@@ -1424,7 +1424,7 @@ void SwRootFrame::RemoveSuperfluous()
{
SAL_INFO( "sw.pageframe", "RemoveSuperfluous - DestroyFrm p: " << pPage );
RemovePage( &pPage, SwRemoveResult::Prev );
- nDocPos = pPage ? pPage->Frame().Top() : 0;
+ nDocPos = pPage ? pPage->FrameRA().Top() : 0;
}
} while ( pPage );
@@ -1550,24 +1550,24 @@ void SwRootFrame::AssertPageFlys( SwPageFrame *pPage )
Size SwRootFrame::ChgSize( const Size& aNewSize )
{
- Frame().SSize() = aNewSize;
+ FrameWA().SSize() = aNewSize;
InvalidatePrt_();
mbFixSize = false;
- return Frame().SSize();
+ return FrameRA().SSize();
}
void SwRootFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( !mbValidPos )
{ mbValidPos = true;
- maFrame.Pos().setX(DOCUMENTBORDER);
- maFrame.Pos().setY(DOCUMENTBORDER);
+ FrameWA().Pos().setX(DOCUMENTBORDER);
+ FrameWA().Pos().setY(DOCUMENTBORDER);
}
if ( !mbValidPrtArea )
{ mbValidPrtArea = true;
- maPrt.Pos().setX(0);
- maPrt.Pos().setY(0);
- maPrt.SSize( maFrame.SSize() );
+ PrintWA().Pos().setX(0);
+ PrintWA().Pos().setY(0);
+ PrintWA().SSize( FrameRA().SSize() );
}
if ( !mbValidSize )
// SSize is set by the pages (Cut/Paste).
@@ -1682,7 +1682,7 @@ void SwRootFrame::ImplCalcBrowseWidth()
case text::HoriOrientation::INSIDE:
case text::HoriOrientation::LEFT:
if ( text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() )
- nWidth += pFrame->Prt().Left();
+ nWidth += pFrame->PrintRA().Left();
break;
default:
break;
@@ -1874,14 +1874,13 @@ static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset )
static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset )
{
- const SwRect aFrame( pFrame->Frame() );
+ const SwRect aFrame( pFrame->FrameRA() );
// first move the current frame
- Point &rPoint = pFrame->Frame().Pos();
- if (rPoint.X() != FAR_AWAY)
- rPoint.X() += rOffset.X();
- if (rPoint.Y() != FAR_AWAY)
- rPoint.Y() += rOffset.Y();
+ if (pFrame->FrameRA().Pos().X() != FAR_AWAY)
+ pFrame->FrameWA().Pos().X() += rOffset.X();
+ if (pFrame->FrameRA().Pos().Y() != FAR_AWAY)
+ pFrame->FrameWA().Pos().Y() += rOffset.Y();
// Don't forget accessibility:
if( pFrame->IsAccessibleFrame() )
@@ -1959,7 +1958,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
maPageRects.clear();
- const long nBorder = Frame().Pos().getX();
+ const long nBorder = FrameRA().Pos().getX();
const long nVisWidth = mnViewWidth - 2 * nBorder;
const long nGapBetweenPages = pViewOpt ? pViewOpt->GetGapBetweenPages()
: (pSh ? pSh->GetViewOptions()->GetGapBetweenPages()
@@ -2008,15 +2007,15 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
{
const SwFrame& rFormatPage = pPageFrame->GetFormatPage();
- nPageWidth = rFormatPage.Frame().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrame->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages);
- nPageHeight = rFormatPage.Frame().Height() + nGapBetweenPages;
+ nPageWidth = rFormatPage.FrameRA().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrame->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages);
+ nPageHeight = rFormatPage.FrameRA().Height() + nGapBetweenPages;
}
else
{
if ( !pPageFrame->IsEmptyPage() )
{
- nPageWidth = pPageFrame->Frame().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages);
- nPageHeight = pPageFrame->Frame().Height() + nGapBetweenPages;
+ nPageWidth = pPageFrame->FrameRA().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages);
+ nPageHeight = pPageFrame->FrameRA().Height() + nGapBetweenPages;
}
}
@@ -2065,7 +2064,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
const sal_uInt16 nMaxNumberOfVirtualPages = mnColumns > 0 ? mnColumns - nNumberOfPagesInRow : USHRT_MAX;
SwTwips nRemain = nWidthRemain;
SwTwips nVirtualPagesWidth = 0;
- SwTwips nLastPageWidth = pLastPageInCurrentRow->Frame().Width() + nSidebarWidth;
+ SwTwips nLastPageWidth = pLastPageInCurrentRow->FrameRA().Width() + nSidebarWidth;
while ( ( mnColumns > 0 || nRemain > 0 ) && nNumberOfVirtualPages < nMaxNumberOfVirtualPages )
{
@@ -2089,7 +2088,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
{
// #i88036#
nCurrentRowWidth +=
- pStartOfRow->GetFormatPage().Frame().Width() + nSidebarWidth;
+ pStartOfRow->GetFormatPage().FrameRA().Width() + nSidebarWidth;
}
// center page if possible
@@ -2106,7 +2105,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
if ( bFirstRow && mbBookMode )
{
// #i88036#
- nX += pStartOfRow->GetFormatPage().Frame().Width() + nSidebarWidth;
+ nX += pStartOfRow->GetFormatPage().FrameRA().Width() + nSidebarWidth;
}
SwPageFrame* pEndOfRow = pPageFrame;
@@ -2118,8 +2117,8 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
if ( mbBookMode )
pFormatPage = &pPageToAdjust->GetFormatPage();
- const SwTwips nCurrentPageWidth = pFormatPage->Frame().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth);
- const Point aOldPagePos = pPageToAdjust->Frame().Pos();
+ const SwTwips nCurrentPageWidth = pFormatPage->FrameRA().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth);
+ const Point aOldPagePos = pPageToAdjust->FrameRA().Pos();
const bool bLeftSidebar = pPageToAdjust->SidebarPosition() == sw::sidebarwindows::SidebarPosition::LEFT;
const SwTwips nLeftPageAddOffset = bLeftSidebar ?
nSidebarWidth :
@@ -2156,7 +2155,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
// border of nGapBetweenPages around the current page:
SwRect aPageRectWithBorders( aNewPagePos.getX() - nGapBetweenPages,
aNewPagePos.getY(),
- pPageToAdjust->Frame().SSize().Width() + nGapBetweenPages + nSidebarWidth,
+ pPageToAdjust->FrameRA().SSize().Width() + nGapBetweenPages + nSidebarWidth,
nCurrentRowHeight );
static const long nOuterClickDiff = 1000000;
@@ -2214,7 +2213,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
} // end while
// set size of root frame:
- const Size aOldSize( Frame().SSize() );
+ const Size aOldSize( FrameRA().SSize() );
const Size aNewSize( nMaxPageRight - nBorder, nSumRowHeight - nGapBetweenPages );
if ( bPageChanged || aNewSize != aOldSize )
@@ -2234,7 +2233,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
}
}
- maPagesArea.Pos( Frame().Pos() );
+ maPagesArea.Pos( FrameRA().Pos() );
maPagesArea.SSize( aNewSize );
if ( TWIPS_MAX != nMinPageLeft )
maPagesArea.Left_( nMinPageLeft );
@@ -2291,17 +2290,17 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC
{
if ( pFrame->IsBodyFrame() )
{
- nUpperLimit = pFrame->Frame().Top();
- nLowerLimit = pFrame->Frame().Bottom();
+ nUpperLimit = pFrame->FrameRA().Top();
+ nLowerLimit = pFrame->FrameRA().Bottom();
}
else if ( pFrame->IsFootnoteContFrame() )
- nLowerLimit = pFrame->Frame().Bottom();
+ nLowerLimit = pFrame->FrameRA().Bottom();
pFrame = pFrame->GetNext();
}
- SwRect aHeaderArea( Frame().TopLeft(),
- Size( Frame().Width(), nUpperLimit - Frame().Top() ) );
+ SwRect aHeaderArea( FrameRA().TopLeft(),
+ Size( FrameRA().Width(), nUpperLimit - FrameRA().Top() ) );
SwViewShell* pViewShell = getRootFrame()->GetCurrShell();
const bool bHideWhitespaceMode = pViewShell->GetViewOptions()->IsHideWhitespaceMode();
@@ -2315,8 +2314,8 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC
}
else
{
- SwRect aFooterArea( Point( Frame().Left(), nLowerLimit ),
- Size( Frame().Width(), Frame().Bottom() - nLowerLimit ) );
+ SwRect aFooterArea( Point( FrameRA().Left(), nLowerLimit ),
+ Size( FrameRA().Width(), FrameRA().Bottom() - nLowerLimit ) );
if ( aFooterArea.IsInside( rPt ) &&
(!bHideWhitespaceMode || static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetFooter().IsActive()) )
@@ -2346,7 +2345,7 @@ bool SwPageFrame::CheckPageHeightValidForHideWhitespace(SwTwips nDiff)
// Content frame doesn't fit the actual size, check if it fits the nominal one.
const SwFrameFormat* pPageFormat = static_cast<const SwFrameFormat*>(GetRegisteredIn());
const Size& rPageSize = pPageFormat->GetFrameSize().GetSize();
- long nWhitespace = rPageSize.getHeight() - Frame().Height();
+ long nWhitespace = rPageSize.getHeight() - FrameRA().Height();
if (nWhitespace > -nDiff)
{
// It does: don't move it and invalidate our page frame so
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 873b2c67880e..8759246c38bd 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -900,8 +900,8 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties const &prope
// Vertical edge, overlapping with the table edge?
SwTwips nLLeft = rLRect.Left() - 30,
nLRight = rLRect.Right() + 30,
- nTLeft = rLRect.GetTab()->Frame().Left() + rLRect.GetTab()->Prt().Left(),
- nTRight = rLRect.GetTab()->Frame().Left() + rLRect.GetTab()->Prt().Right();
+ nTLeft = rLRect.GetTab()->FrameRA().Left() + rLRect.GetTab()->PrintRA().Left(),
+ nTRight = rLRect.GetTab()->FrameRA().Left() + rLRect.GetTab()->PrintRA().Right();
if ( (nTLeft >= nLLeft && nTLeft <= nLRight) ||
(nTRight>= nLLeft && nTRight<= nLRight) )
bPaint = false;
@@ -911,8 +911,8 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties const &prope
// Horizontal edge, overlapping with the table edge?
SwTwips nLTop = rLRect.Top() - 30,
nLBottom = rLRect.Bottom() + 30,
- nTTop = rLRect.GetTab()->Frame().Top() + rLRect.GetTab()->Prt().Top(),
- nTBottom = rLRect.GetTab()->Frame().Top() + rLRect.GetTab()->Prt().Bottom();
+ nTTop = rLRect.GetTab()->FrameRA().Top() + rLRect.GetTab()->PrintRA().Top(),
+ nTBottom = rLRect.GetTab()->FrameRA().Top() + rLRect.GetTab()->PrintRA().Bottom();
if ( (nTTop >= nLTop && nTTop <= nLBottom) ||
(nTBottom >= nLTop && nTBottom <= nLBottom) )
bPaint = false;
@@ -1292,15 +1292,15 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrame *pFrame,
// See <lcl_PaintLeftLine> and <lcl_PaintRightLine>.
if( pFrame->IsSctFrame() )
{
- rRect = pFrame->Prt();
- rRect.Pos() += pFrame->Frame().Pos();
+ rRect = pFrame->PrintRA();
+ rRect.Pos() += pFrame->FrameRA().Pos();
}
else if ( pFrame->IsCellFrame() )
- rRect = pFrame->Frame();
+ rRect = pFrame->FrameRA();
else
{
- rRect = pFrame->Prt();
- rRect.Pos() += pFrame->Frame().Pos();
+ rRect = pFrame->PrintRA();
+ rRect.Pos() += pFrame->FrameRA().Pos();
if ( rAttrs.IsLine() || rAttrs.IsBorderDist() ||
(bShadow && rAttrs.GetShadow().GetLocation() != SvxShadowLocation::NONE) )
@@ -1431,7 +1431,7 @@ static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage,
const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
- if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->Frame()))
+ if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->FrameRA()))
continue;
if (!pFly->GetFormat()->GetPrint().GetValue() &&
@@ -1565,8 +1565,8 @@ static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage,
}
else
{
- SwRect aRect( pFly->Prt() );
- aRect += pFly->Frame().Pos();
+ SwRect aRect( pFly->PrintRA() );
+ aRect += pFly->FrameRA().Pos();
rRegion -= aRect;
rClipState.subtractRange(lcl_ShrinkFly(aRect));
}
@@ -2428,8 +2428,8 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
}
const SwFrame* pUpper = mrTabFrame.GetUpper();
- SwRect aUpper( pUpper->Prt() );
- aUpper.Pos() += pUpper->Frame().Pos();
+ SwRect aUpper( pUpper->PrintRA() );
+ aUpper.Pos() += pUpper->FrameRA().Pos();
SwRect aUpperAligned( aUpper );
::SwAlignRect( aUpperAligned, gProp.pSGlobalShell, &rDev );
drawinglayer::primitive2d::Primitive2DContainer aHorizontalSequence;
@@ -2754,11 +2754,11 @@ static bool lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
void SwTabFramePainter::Insert( const SwFrame& rFrame, const SvxBoxItem& rBoxItem )
{
// build 4 line entries for the 4 borders:
- SwRect aBorderRect = rFrame.Frame();
+ SwRect aBorderRect = rFrame.FrameRA();
if ( rFrame.IsTabFrame() )
{
- aBorderRect = rFrame.Prt();
- aBorderRect.Pos() += rFrame.Frame().Pos();
+ aBorderRect = rFrame.PrintRA();
+ aBorderRect.Pos() += rFrame.FrameRA().Pos();
}
bool const bBottomAsTop(lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
@@ -3068,7 +3068,7 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
if ( !pPage->IsEmptyPage() )
{
SwRect aPaintRect;
- SwPageFrame::GetBorderAndShadowBoundRect( pPage->Frame(), pSh, &rRenderContext, aPaintRect,
+ SwPageFrame::GetBorderAndShadowBoundRect( pPage->FrameRA(), pSh, &rRenderContext, aPaintRect,
bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
if ( aRect.IsOver( aPaintRect ) )
@@ -3090,8 +3090,8 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
SwRectFnSet aRectFnSet(pPage);
SwRect aPageRectTemp( aPaintRect );
aRectFnSet.SetLeftAndWidth( aPageRectTemp,
- aRectFnSet.GetLeft(pPage->Frame()),
- aRectFnSet.GetWidth(pPage->Frame()) );
+ aRectFnSet.GetLeft(pPage->FrameRA()),
+ aRectFnSet.GetWidth(pPage->FrameRA()) );
aPageRectTemp.Intersection_( pSh->VisArea() );
vcl::Region aPageRectRegion( aPageRectTemp.SVRect() );
aPageRectRegion.Exclude( aPaintRect.SVRect() );
@@ -3143,7 +3143,7 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess();
pSh->Imp()->PaintLayer( rIDDMA.GetHellId(),
pPrintData,
- *pPage, pPage->Frame(),
+ *pPage, pPage->FrameRA(),
&aPageBackgrdColor,
pPage->IsRightToLeft(),
&aSwRedirector );
@@ -3168,8 +3168,8 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
if( pSh->GetWin() && pSh->GetDoc()->GetDocShell() &&
!pSh->GetDoc()->GetDocShell()->IsInPlaceActive() )
{
- SwPageFrame::PaintBorderAndShadow( pPage->Frame(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
- SwPageFrame::PaintNotesSidebar( pPage->Frame(), pSh, pPage->GetPhyPageNum(), bRightSidebar);
+ SwPageFrame::PaintBorderAndShadow( pPage->FrameRA(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
+ SwPageFrame::PaintNotesSidebar( pPage->FrameRA(), pSh, pPage->GetPhyPageNum(), bRightSidebar);
}
gProp.pSLines->PaintLines( pSh->GetOut(), gProp );
@@ -3190,7 +3190,7 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(),
pPrintData,
- *pPage, pPage->Frame(),
+ *pPage, pPage->FrameRA(),
&aPageBackgrdColor,
pPage->IsRightToLeft(),
&aSwRedirector );
@@ -3226,11 +3226,11 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
{
// paint empty page
SwRect aPaintRect;
- SwRect aEmptyPageRect( pPage->Frame() );
+ SwRect aEmptyPageRect( pPage->FrameRA() );
// code from vprint.cxx
const SwPageFrame& rFormatPage = pPage->GetFormatPage();
- aEmptyPageRect.SSize() = rFormatPage.Frame().SSize();
+ aEmptyPageRect.SSize() = rFormatPage.FrameRA().SSize();
SwPageFrame::GetBorderAndShadowBoundRect( aEmptyPageRect, pSh, &rRenderContext, aPaintRect,
bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
@@ -3425,11 +3425,11 @@ void SwLayoutFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec
if ( aPaintRect.Height() > 0 )
gProp.pSGlobalShell->InvalidateWindows(aPaintRect);
aPaintRect.Top( rRect.Bottom() + 1 );
- aPaintRect.Bottom( pFrame->Frame().Bottom() );
+ aPaintRect.Bottom( pFrame->FrameRA().Bottom() );
if ( aPaintRect.Height() > 0 )
gProp.pSGlobalShell->InvalidateWindows(aPaintRect);
- aPaintRect.Top( pFrame->Frame().Top() );
- aPaintRect.Bottom( pFrame->Frame().Bottom() );
+ aPaintRect.Top( pFrame->FrameRA().Top() );
+ aPaintRect.Bottom( pFrame->FrameRA().Bottom() );
}
else
{
@@ -3597,8 +3597,8 @@ void SwColumnFrame::PaintBreak( ) const
!gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer ) &&
gProp.pSGlobalShell->GetViewOptions()->IsLineBreak() )
{
- SwRect aRect( pCnt->Prt() );
- aRect.Pos() += pCnt->Frame().Pos();
+ SwRect aRect( pCnt->PrintRA() );
+ aRect.Pos() += pCnt->FrameRA().Pos();
// Draw the line
basegfx::B2DPoint aStart( double( aRect.Left() ), aRect.Top() );
@@ -3679,7 +3679,7 @@ void SwPageFrame::PaintDecorators( ) const
const SwLayoutFrame* pBody = FindBodyCont();
if ( pBody )
{
- SwRect aBodyRect( pBody->Frame() );
+ SwRect aBodyRect( pBody->FrameRA() );
if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER &&
!gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() &&
@@ -3714,7 +3714,7 @@ void SwPageFrame::PaintDecorators( ) const
while ( pFootnoteContFrame )
{
if ( pFootnoteContFrame->IsFootnoteContFrame() )
- aBodyRect.AddBottom( pFootnoteContFrame->Frame().Bottom() - aBodyRect.Bottom() );
+ aBodyRect.AddBottom( pFootnoteContFrame->FrameRA().Bottom() - aBodyRect.Bottom() );
pFootnoteContFrame = pFootnoteContFrame->GetNext();
}
@@ -3821,7 +3821,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
//HACK: exception: printing of frames in tables, those can overlap
//a page once in a while when dealing with oversized tables (HTML).
SwPageFrame *pPage = pFly->FindPageFrame();
- if ( pPage && pPage->Frame().IsOver( pFly->Frame() ) )
+ if ( pPage && pPage->FrameRA().IsOver( pFly->FrameRA() ) )
{
pAnch = pFly->AnchorFrame();
}
@@ -3845,7 +3845,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
//right now. Afterwards they must not be printed if the
//page over which they float position wise gets printed.
const SwPageFrame *pPage = pAnch->FindPageFrame();
- if ( !pPage->Frame().IsOver( pObj->GetCurrentBoundRect() ) )
+ if ( !pPage->FrameRA().IsOver( pObj->GetCurrentBoundRect() ) )
pAnch = nullptr;
}
}
@@ -3903,7 +3903,7 @@ void SwFlyFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
if (bInGenerateThumbnail)
{
SwRect aVisRect = pShell->VisArea();
- if (!aVisRect.IsOver(Frame()))
+ if (!aVisRect.IsOver(FrameRA()))
return;
}
}
@@ -3915,7 +3915,7 @@ void SwFlyFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
BorderLinesGuard blg; // this should not paint borders added from PaintBaBo
SwRect aRect( rRect );
- aRect.Intersection_( Frame() );
+ aRect.Intersection_( FrameRA() );
rRenderContext.Push( PushFlags::CLIPREGION );
rRenderContext.SetClipRegion();
@@ -3984,7 +3984,7 @@ void SwFlyFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
}
// paint of margin needed.
const bool bPaintMarginOnly( !bPaintCompleteBack &&
- Prt().SSize() != Frame().SSize() );
+ PrintRA().SSize() != FrameRA().SSize() );
// #i47804# - paint background of parent fly frame
// for transparent graphics in layer Hell, if parent fly frame isn't
@@ -4007,7 +4007,7 @@ void SwFlyFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pParentFlyFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
SwRect aPaintRect( aRect );
- aPaintRect.Intersection_( pParentFlyFrame->Frame() );
+ aPaintRect.Intersection_( pParentFlyFrame->FrameRA() );
pParentFlyFrame->PaintBackground( aPaintRect, pPage, rAttrs );
gProp.pSRetoucheFly2 = pOldRet;
@@ -4040,7 +4040,7 @@ void SwFlyFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
{
//What we actually want to paint is the small stripe between
//PrtArea and outer border.
- SwRect aTmp( Prt() ); aTmp += Frame().Pos();
+ SwRect aTmp( PrintRA() ); aTmp += FrameRA().Pos();
aRegion -= aTmp;
}
if ( bContour )
@@ -4174,8 +4174,8 @@ void SwTabFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() )
{
// OD 10.01.2003 #i6467# - intersect output rectangle with table frame
- SwRect aTabRect( Prt() );
- aTabRect.Pos() += Frame().Pos();
+ SwRect aTabRect( PrintRA() );
+ aTabRect.Pos() += FrameRA().Pos();
SwRect aTabOutRect( rRect );
aTabOutRect.Intersection( aTabRect );
SwViewOption::DrawRect( &rRenderContext, aTabOutRect, COL_LIGHTGRAY );
@@ -5272,8 +5272,8 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
//be painted.
//For the PrtArea the aligned value needs to be used, otherwise it could
//happen, that some parts won't be processed.
- SwRect aRect( Prt() );
- aRect += Frame().Pos();
+ SwRect aRect( PrintRA() );
+ aRect += FrameRA().Pos();
::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
// OD 27.09.2002 #103636# - new local boolean variable in order to
// suspend border paint under special cases - see below.
@@ -5369,8 +5369,8 @@ void SwFootnoteContFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *p
{
//If the rectangle is completely inside the PrtArea, no border needs to
//be painted.
- SwRect aRect( Prt() );
- aRect.Pos() += Frame().Pos();
+ SwRect aRect( PrintRA() );
+ aRect.Pos() += FrameRA().Pos();
if ( !aRect.IsInside( rRect ) )
PaintLine( rRect, pPage );
}
@@ -5388,7 +5388,7 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
const SwPageFootnoteInfo &rInf = pPage->GetPageDesc()->GetFootnoteInfo();
SwRectFnSet aRectFnSet(this);
- SwTwips nPrtWidth = aRectFnSet.GetWidth(Prt());
+ SwTwips nPrtWidth = aRectFnSet.GetWidth(PrintRA());
Fraction aFract( nPrtWidth, 1 );
const SwTwips nWidth = (long)(aFract *= rInf.GetWidth());
@@ -5407,9 +5407,9 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
}
SwTwips nLineWidth = rInf.GetLineWidth();
const SwRect aLineRect = aRectFnSet.IsVert() ?
- SwRect( Point(Frame().Left()+Frame().Width()-rInf.GetTopDist()-nLineWidth,
+ SwRect( Point(FrameRA().Left()+FrameRA().Width()-rInf.GetTopDist()-nLineWidth,
nX), Size( nLineWidth, nWidth ) )
- : SwRect( Point( nX, Frame().Pos().Y() + rInf.GetTopDist() ),
+ : SwRect( Point( nX, FrameRA().Pos().Y() + rInf.GetTopDist() ),
Size( nWidth, rInf.GetLineWidth()));
if ( aLineRect.HasArea() && rInf.GetLineStyle() != SvxBorderLineStyle::NONE)
PaintBorderLine( rRect, aLineRect , pPage, &rInf.GetLineColor(),
@@ -5426,8 +5426,8 @@ void SwLayoutFrame::PaintColLines( const SwRect &rRect, const SwFormatCol &rForm
SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- SwRect aLineRect = Prt();
- aLineRect += Frame().Pos();
+ SwRect aLineRect = PrintRA();
+ aLineRect += FrameRA().Pos();
SwTwips nTop = ((aLineRect.*fnRect->fnGetHeight)()*rFormatCol.GetLineHeight())
/ 100 - (aLineRect.*fnRect->fnGetHeight)();
@@ -5462,7 +5462,7 @@ void SwLayoutFrame::PaintColLines( const SwRect &rRect, const SwFormatCol &rForm
while ( pCol->GetNext() )
{
(aLineRect.*fnRect->fnSetPosX)
- ( (pCol->Frame().*fnGetX)() - nPenHalf );
+ ( (pCol->FrameRA().*fnGetX)() - nPenHalf );
if ( aRect.IsOver( aLineRect ) )
PaintBorderLine( aRect, aLineRect , pPage, &rFormatCol.GetLineColor(),
rFormatCol.GetLineStyle() );
@@ -5481,8 +5481,8 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
const SwLayoutFrame* pBody = FindBodyCont();
if( pBody )
{
- SwRect aGrid( pBody->Prt() );
- aGrid += pBody->Frame().Pos();
+ SwRect aGrid( pBody->PrintRA() );
+ aGrid += pBody->FrameRA().Pos();
SwRect aInter( aGrid );
aInter.Intersection( rRect );
@@ -5786,7 +5786,7 @@ void SwPageFrame::PaintMarginArea( const SwRect& _rOutputRect,
if ( _pViewShell->GetWin() && !_pViewShell->GetViewOptions()->getBrowseMode() )
{
// Simplified paint with DrawingLayer FillStyle
- SwRect aPgRect = Frame();
+ SwRect aPgRect = FrameRA();
aPgRect.Intersection_( _rOutputRect );
if(!aPgRect.IsEmpty())
@@ -6207,7 +6207,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
SwRect SwPageFrame::GetBoundRect(OutputDevice const * pOutputDevice) const
{
const SwViewShell *pSh = getRootFrame()->GetCurrShell();
- SwRect aPageRect( Frame() );
+ SwRect aPageRect( FrameRA() );
SwRect aResult;
if(!pSh) {
@@ -6360,7 +6360,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
}
}
- SwRect aPaintRect( Frame() );
+ SwRect aPaintRect( FrameRA() );
if( IsTextFrame() || IsSctFrame() )
aPaintRect = UnionFrame( true );
@@ -6371,9 +6371,9 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
const bool bBrowse = pSh->GetViewOptions()->getBrowseMode();
SwRect aRect;
if ( (bPageFrame && bBrowse) ||
- (IsTextFrame() && Prt().SSize() == Frame().SSize()) )
+ (IsTextFrame() && PrintRA().SSize() == FrameRA().SSize()) )
{
- aRect = Frame();
+ aRect = FrameRA();
::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
}
else
@@ -6384,7 +6384,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
if ( GetPrev()->GetAttrSet()->GetBackground() == GetAttrSet()->GetBackground() &&
lcl_compareFillAttributes(GetPrev()->getSdrAllFillAttributesHelper(), getSdrAllFillAttributesHelper()))
{
- aRect.Top( Frame().Top() );
+ aRect.Top( FrameRA().Top() );
}
}
}
@@ -6557,9 +6557,9 @@ void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage,
if( !pLow )
return;
SwShortCut aShortCut( *pLow, rRect );
- while( pLow && !aShortCut.Stop( pLow->Frame() ) )
+ while( pLow && !aShortCut.Stop( pLow->FrameRA() ) )
{
- if ( pLow->Frame().IsOver( rRect ) && pLow->Frame().HasArea() )
+ if ( pLow->FrameRA().IsOver( rRect ) && pLow->FrameRA().HasArea() )
{
if ( pLow->IsLayoutFrame() )
static_cast<const SwLayoutFrame*>(pLow)->RefreshLaySubsidiary( pPage, rRect);
@@ -6574,7 +6574,7 @@ void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage,
{
const SwFlyFrame *pFly =
static_cast<const SwFlyFrame*>(pAnchoredObj);
- if ( pFly->IsFlyInContentFrame() && pFly->Frame().IsOver( rRect ) )
+ if ( pFly->IsFlyInContentFrame() && pFly->FrameRA().IsOver( rRect ) )
{
if ( !pFly->Lower() || !pFly->Lower()->IsNoTextFrame() ||
!static_cast<const SwNoTextFrame*>(pFly->Lower())->HasAnimation())
@@ -6807,9 +6807,9 @@ void SwPageFrame::PaintSubsidiaryLines( const SwPageFrame *,
pLay = pLay->GetNext();
}
- SwRect aArea( pPageBody->Frame() );
+ SwRect aArea( pPageBody->FrameRA() );
if ( pFootnoteCont )
- aArea.AddBottom( pFootnoteCont->Frame().Bottom() - aArea.Bottom() );
+ aArea.AddBottom( pFootnoteCont->FrameRA().Bottom() - aArea.Bottom() );
if ( !gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars( ) )
ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) );
@@ -6833,7 +6833,7 @@ void SwColumnFrame::PaintSubsidiaryLines( const SwPageFrame *,
pLay = pLay->GetNext();
}
- SwRect aArea( pColBody->Frame() );
+ SwRect aArea( pColBody->FrameRA() );
// #i3662# - enlarge top of column body frame's printing area
// in sections to top of section frame.
@@ -6841,13 +6841,13 @@ void SwColumnFrame::PaintSubsidiaryLines( const SwPageFrame *,
if ( bColInSection )
{
if ( IsVertical() )
- aArea.Right( GetUpper()->Frame().Right() );
+ aArea.Right( GetUpper()->FrameRA().Right() );
else
- aArea.Top( GetUpper()->Frame().Top() );
+ aArea.Top( GetUpper()->FrameRA().Top() );
}
if ( pFootnoteCont )
- aArea.AddBottom( pFootnoteCont->Frame().Bottom() - aArea.Bottom() );
+ aArea.AddBottom( pFootnoteCont->FrameRA().Bottom() - aArea.Bottom() );
::SwAlignRect( aArea, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
@@ -6880,8 +6880,8 @@ void SwHeadFootFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect &
{
if ( gProp.pSGlobalShell->IsHeaderFooterEdit() )
{
- SwRect aArea( Prt() );
- aArea.Pos() += Frame().Pos();
+ SwRect aArea( PrintRA() );
+ aArea.Pos() += FrameRA().Pos();
if ( !gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars( ) )
ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) );
else
@@ -6935,9 +6935,9 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
// use frame area for cells
// OD 13.02.2003 #i3662# - for section use also frame area
const bool bUseFrameArea = bCell || IsSctFrame();
- SwRect aOriginal( bUseFrameArea ? Frame() : Prt() );
+ SwRect aOriginal( bUseFrameArea ? FrameRA() : PrintRA() );
if ( !bUseFrameArea )
- aOriginal.Pos() += Frame().Pos();
+ aOriginal.Pos() += FrameRA().Pos();
::SwAlignRect( aOriginal, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
@@ -7054,8 +7054,8 @@ void SwPageFrame::RefreshExtraData( const SwRect &rRect ) const
if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
- if ( pFly->Frame().Top() <= aRect.Bottom() &&
- pFly->Frame().Bottom() >= aRect.Top() )
+ if ( pFly->FrameRA().Top() <= aRect.Bottom() &&
+ pFly->FrameRA().Bottom() >= aRect.Top() )
pFly->RefreshExtraData( aRect );
}
}
@@ -7077,8 +7077,8 @@ void SwLayoutFrame::RefreshExtraData( const SwRect &rRect ) const
( !pCnt->IsInTab() &&
((bLineInBody && pCnt->IsInDocBody()) ||
(bLineInFly && pCnt->IsInFly())) ) ) &&
- pCnt->Frame().Top() <= rRect.Bottom() &&
- pCnt->Frame().Bottom() >= rRect.Top() )
+ pCnt->FrameRA().Top() <= rRect.Bottom() &&
+ pCnt->FrameRA().Bottom() >= rRect.Top() )
{
static_cast<const SwTextFrame*>(pCnt)->PaintExtraData( rRect );
}
@@ -7089,8 +7089,8 @@ void SwLayoutFrame::RefreshExtraData( const SwRect &rRect ) const
{
const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
if ( pFly->IsFlyInContentFrame() &&
- pFly->Frame().Top() <= rRect.Bottom() &&
- pFly->Frame().Bottom() >= rRect.Top() )
+ pFly->FrameRA().Top() <= rRect.Bottom() &&
+ pFly->FrameRA().Bottom() >= rRect.Top() )
pFly->RefreshExtraData( rRect );
}
}
@@ -7188,7 +7188,7 @@ void SwFrame::Retouch( const SwPageFrame * pPage, const SwRect &rRect ) const
OSL_ENSURE( getRootFrame()->GetCurrShell() && gProp.pSGlobalShell->GetWin(), "Retouche on a printer?" );
SwRect aRetouche( GetUpper()->PaintArea() );
- aRetouche.Top( Frame().Top() + Frame().Height() );
+ aRetouche.Top( FrameRA().Top() + FrameRA().Height() );
aRetouche.Intersection( gProp.pSGlobalShell->VisArea() );
if ( aRetouche.HasArea() )
@@ -7385,11 +7385,11 @@ bool SwFrame::GetBackgroundBrush(
rpBrush = &rBack;
if ( pFrame->IsPageFrame() && pSh->GetViewOptions()->getBrowseMode() )
{
- rOrigRect = pFrame->Frame();
+ rOrigRect = pFrame->FrameRA();
}
else
{
- if ( pFrame->Frame().SSize() != pFrame->Prt().SSize() )
+ if ( pFrame->FrameRA().SSize() != pFrame->PrintRA().SSize() )
{
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
@@ -7397,8 +7397,8 @@ bool SwFrame::GetBackgroundBrush(
}
else
{
- rOrigRect = pFrame->Prt();
- rOrigRect += pFrame->Frame().Pos();
+ rOrigRect = pFrame->PrintRA();
+ rOrigRect += pFrame->FrameRA().Pos();
}
}
@@ -7471,7 +7471,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
aMet.SetPrefMapMode( aMap );
::SwCalcPixStatics( pSh->GetOut() );
- aMet.SetPrefSize( pFly->Frame().SSize() );
+ aMet.SetPrefSize( pFly->FrameRA().SSize() );
aMet.Record( pDev.get() );
pDev->SetLineColor();
@@ -7479,7 +7479,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
pDev->SetFont( pOld->GetFont() );
//Enlarge the rectangle if needed, so the border is painted too.
- SwRect aOut( pFly->Frame() );
+ SwRect aOut( pFly->FrameRA() );
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFly );
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( rAttrs.CalcRightLine() )
@@ -7533,13 +7533,13 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
pSh->DLPostPaint2(true);
aMet.Stop();
- aMet.Move( -pFly->Frame().Left(), -pFly->Frame().Top() );
+ aMet.Move( -pFly->FrameRA().Left(), -pFly->FrameRA().Top() );
aRet = Graphic( aMet );
if( bNoteURL )
{
OSL_ENSURE( pNoteURL, "MakeGraphic: Good Bye, NoteURL." );
- pNoteURL->FillImageMap( pMap, pFly->Frame().Pos(), aMap );
+ pNoteURL->FillImageMap( pMap, pFly->FrameRA().Pos(), aMap );
delete pNoteURL;
pNoteURL = nullptr;
}
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index ff091c12327b..fc7686210355 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -100,16 +100,16 @@ void SwSectionFrame::Init()
{
assert(GetUpper() && "SwSectionFrame::Init before insertion?!");
SwRectFnSet aRectFnSet(this);
- long nWidth = aRectFnSet.GetWidth(GetUpper()->Prt());
- aRectFnSet.SetWidth( Frame(), nWidth );
- aRectFnSet.SetHeight( Frame(), 0 );
+ long nWidth = aRectFnSet.GetWidth(GetUpper()->PrintRA());
+ aRectFnSet.SetWidth( FrameWA(), nWidth );
+ aRectFnSet.SetHeight( FrameWA(), 0 );
// #109700# LRSpace for sections
const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace();
- aRectFnSet.SetLeft( Prt(), rLRSpace.GetLeft() );
- aRectFnSet.SetWidth( Prt(), nWidth - rLRSpace.GetLeft() -
+ aRectFnSet.SetLeft( PrintWA(), rLRSpace.GetLeft() );
+ aRectFnSet.SetWidth( PrintWA(), nWidth - rLRSpace.GetLeft() -
rLRSpace.GetRight() );
- aRectFnSet.SetHeight( Prt(), 0 );
+ aRectFnSet.SetHeight( PrintWA(), 0 );
const SwFormatCol &rCol = GetFormat()->GetCol();
if( ( rCol.GetNumCols() > 1 || IsAnyNoteAtEnd() ) && !IsInFootnote() )
@@ -197,7 +197,7 @@ void SwSectionFrame::DelEmpty( bool bRemove )
SetFollow(nullptr);
if( pUp )
{
- Frame().Height( 0 );
+ FrameWA().Height( 0 );
// If we are destroyed immediately anyway, we don't need
// to put us into the list
if( bRemove )
@@ -281,13 +281,13 @@ void SwSectionFrame::Cut_( bool bRemove )
if ( pUp )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nFrameHeight = aRectFnSet.GetHeight(Frame());
+ SwTwips nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if( nFrameHeight > 0 )
{
if( !bRemove )
{
- aRectFnSet.SetHeight( Frame(), 0 );
- aRectFnSet.SetHeight( Prt(), 0 );
+ aRectFnSet.SetHeight( FrameWA(), 0 );
+ aRectFnSet.SetHeight( PrintWA(), 0 );
}
pUp->Shrink( nFrameHeight );
}
@@ -382,7 +382,7 @@ void SwSectionFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
pSibling->InvalidatePage( pPage );
}
- SwTwips nFrameHeight = aRectFnSet.GetHeight(Frame());
+ SwTwips nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if( nFrameHeight )
pParent->Grow( nFrameHeight );
@@ -725,7 +725,7 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* pRenderContext)
aRectFnSet.MakePos( *this, GetUpper(), GetPrev(), false );
}
- if (Frame().Height() == 0)
+ if (FrameRA().Height() == 0)
{
// SwLayoutFrame::MakeAll() is not called for to-be-deleted
// section frames (which would invalidate the position of the
@@ -885,7 +885,7 @@ bool SwSectionFrame::CalcMinDiff( SwTwips& rMinDiff ) const
{
SwRectFnSet aRectFnSet(this);
rMinDiff = aRectFnSet.GetPrtBottom(*GetUpper());
- rMinDiff = aRectFnSet.BottomDist( Frame(), rMinDiff );
+ rMinDiff = aRectFnSet.BottomDist( FrameRA(), rMinDiff );
return true;
}
return false;
@@ -1012,7 +1012,7 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
if( bGrow && ( !IsInFly() || !GetUpper()->IsColBodyFrame() ||
!FindFlyFrame()->IsLocked() ) )
{
- nDiff = -aRectFnSet.BottomDist( Frame(), nDeadLine );
+ nDiff = -aRectFnSet.BottomDist( FrameRA(), nDeadLine );
if( !bMaximize )
nDiff += Undersize();
if( nDiff > 0 )
@@ -1024,11 +1024,11 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
nDeadLine += nAdd;
}
}
- nDiff = -aRectFnSet.BottomDist( Frame(), nDeadLine );
+ nDiff = -aRectFnSet.BottomDist( FrameRA(), nDeadLine );
SetUndersized( !bMaximize && nDiff >= 0 );
const bool bCalc = ( IsUndersized() || bMaximize ) &&
( nDiff ||
- aRectFnSet.GetTop(Prt()) > aRectFnSet.GetHeight(Frame()) );
+ aRectFnSet.GetTop(PrintRA()) > aRectFnSet.GetHeight(FrameRA()) );
// OD 03.11.2003 #i19737# - introduce local variable <bExtraCalc> to indicate
// that a calculation has to be done beside the value of <bCalc>.
bool bExtraCalc = false;
@@ -1051,13 +1051,13 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
}
if ( bCalc || bExtraCalc )
{
- nDiff = aRectFnSet.YDiff( nDeadLine, aRectFnSet.GetTop(Frame()) );
+ nDiff = aRectFnSet.YDiff( nDeadLine, aRectFnSet.GetTop(FrameRA()) );
if( nDiff < 0 )
- nDeadLine = aRectFnSet.GetTop(Frame());
- const Size aOldSz( Prt().SSize() );
+ nDeadLine = aRectFnSet.GetTop(FrameRA());
+ const Size aOldSz( PrintRA().SSize() );
long nTop = aRectFnSet.GetTopMargin(*this);
- aRectFnSet.SetBottom( Frame(), nDeadLine );
- nDiff = aRectFnSet.GetHeight(Frame());
+ aRectFnSet.SetBottom( FrameWA(), nDeadLine );
+ nDiff = aRectFnSet.GetHeight(FrameRA());
if( nTop > nDiff )
nTop = nDiff;
aRectFnSet.SetYMargins( *this, nTop, 0 );
@@ -1066,8 +1066,8 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
// Determine, if height has changed.
// Note: In vertical layout the height equals the width value.
bool bHeightChanged = aRectFnSet.IsVert() ?
- (aOldSz.Width() != Prt().Width()) :
- (aOldSz.Height() != Prt().Height());
+ (aOldSz.Width() != PrintRA().Width()) :
+ (aOldSz.Height() != PrintRA().Height());
// Last but not least we have changed the height again, thus the inner
// layout (columns) is calculated and the content as well.
// OD 18.09.2002 #100522#
@@ -1108,10 +1108,10 @@ void SwSectionFrame::SimpleFormat()
SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*GetUpper());
// OD 22.10.2002 #97265# - call always method <lcl_ColumnRefresh(..)>, in
// order to get calculated lowers, not only if there space left in its upper.
- if( aRectFnSet.BottomDist( Frame(), nDeadLine ) >= 0 )
+ if( aRectFnSet.BottomDist( FrameRA(), nDeadLine ) >= 0 )
{
- aRectFnSet.SetBottom( Frame(), nDeadLine );
- long nHeight = aRectFnSet.GetHeight(Frame());
+ aRectFnSet.SetBottom( FrameWA(), nDeadLine );
+ long nHeight = aRectFnSet.GetHeight(FrameRA());
long nTop = CalcUpperSpace();
if( nTop > nHeight )
nTop = nHeight;
@@ -1190,14 +1190,14 @@ class ExtraFormatToPositionObjs
// grow section till bottom of printing area of upper frame
SwRectFnSet aRectFnSet(mpSectFrame);
SwTwips nTopMargin = aRectFnSet.GetTopMargin(*mpSectFrame);
- Size aOldSectPrtSize( mpSectFrame->Prt().SSize() );
- SwTwips nDiff = aRectFnSet.BottomDist( mpSectFrame->Frame(),
+ Size aOldSectPrtSize( mpSectFrame->PrintRA().SSize() );
+ SwTwips nDiff = aRectFnSet.BottomDist( mpSectFrame->FrameRA(),
aRectFnSet.GetPrtBottom(*mpSectFrame->GetUpper()) );
- aRectFnSet.AddBottom( mpSectFrame->Frame(), nDiff );
+ aRectFnSet.AddBottom( mpSectFrame->FrameWA(), nDiff );
aRectFnSet.SetYMargins( *mpSectFrame, nTopMargin, 0 );
// #i59789#
// suppress formatting, if printing area of section is too narrow
- if ( aRectFnSet.GetHeight(mpSectFrame->Prt()) <= 0 )
+ if ( aRectFnSet.GetHeight(mpSectFrame->PrintRA()) <= 0 )
{
return;
}
@@ -1283,7 +1283,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
if ( !mbValidSize )
{
PROTOCOL_ENTER( this, PROT::Size, DbgAction::NONE, nullptr )
- const long nOldHeight = aRectFnSet.GetHeight(Frame());
+ const long nOldHeight = aRectFnSet.GetHeight(FrameRA());
bool bOldLock = IsColLocked();
ColLock();
@@ -1318,12 +1318,12 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
if( GetUpper() )
{
- long nWidth = aRectFnSet.GetWidth(GetUpper()->Prt());
- aRectFnSet.SetWidth( maFrame, nWidth );
+ long nWidth = aRectFnSet.GetWidth(GetUpper()->PrintRA());
+ aRectFnSet.SetWidth( FrameWA(), nWidth );
// #109700# LRSpace for sections
const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace();
- aRectFnSet.SetWidth( maPrt, nWidth - rLRSpace.GetLeft() -
+ aRectFnSet.SetWidth( PrintWA(), nWidth - rLRSpace.GetLeft() -
rLRSpace.GetRight() );
// OD 15.10.2002 #103517# - allow grow in online layout
@@ -1349,7 +1349,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
{
// #i61435#
// suppress formatting, if upper frame has height <= 0
- if ( aRectFnSet.GetHeight(GetUpper()->Frame()) > 0 )
+ if ( aRectFnSet.GetHeight(GetUpper()->FrameRA()) > 0 )
{
FormatWidthCols( *pAttr, nRemaining, MINLAY );
}
@@ -1364,7 +1364,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
break;
}
bMaximize = ToMaximize( false );
- nRemaining += aRectFnSet.GetHeight(pFrame->Frame());
+ nRemaining += aRectFnSet.GetHeight(pFrame->FrameRA());
}
else
{
@@ -1386,12 +1386,12 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
}
}
- SwTwips nDiff = aRectFnSet.GetHeight(Frame()) - nRemaining;
+ SwTwips nDiff = aRectFnSet.GetHeight(FrameRA()) - nRemaining;
if( nDiff < 0)
{
SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*GetUpper());
{
- long nBottom = aRectFnSet.GetBottom(Frame());
+ long nBottom = aRectFnSet.GetBottom(FrameRA());
nBottom = aRectFnSet.YInc( nBottom, -nDiff );
long nTmpDiff = aRectFnSet.YDiff( nBottom, nDeadLine );
if( nTmpDiff > 0 )
@@ -1408,9 +1408,9 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
}
if( nDiff )
{
- long nTmp = nRemaining - aRectFnSet.GetHeight(Frame());
+ long nTmp = nRemaining - aRectFnSet.GetHeight(FrameRA());
long nTop = aRectFnSet.GetTopMargin(*this);
- aRectFnSet.AddBottom( Frame(), nTmp );
+ aRectFnSet.AddBottom( FrameWA(), nTmp );
aRectFnSet.SetYMargins( *this, nTop, 0 );
InvalidateNextPos();
if (m_pLower && (!m_pLower->IsColumnFrame() || !m_pLower->GetNext()))
@@ -1451,7 +1451,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
CheckClipping( true, bMaximize );
if( !bOldLock )
ColUnlock();
- long nDiff = nOldHeight - aRectFnSet.GetHeight(Frame());
+ long nDiff = nOldHeight - aRectFnSet.GetHeight(FrameRA());
if( nDiff > 0 )
{
if( !GetNext() )
@@ -1707,7 +1707,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
if( pOldBoss == pNxtContent->FindFootnoteBossFrame( true ) )
{
SwSaveFootnoteHeight aHeight( pOldBoss,
- pOldBoss->Frame().Top() + pOldBoss->Frame().Height() );
+ pOldBoss->FrameRA().Top() + pOldBoss->FrameRA().Height() );
pSect->GetUpper()->MoveLowerFootnotes( pNxtContent, pOldBoss,
pLayLeaf->FindFootnoteBossFrame( true ), false );
}
@@ -1939,7 +1939,7 @@ static SwTwips lcl_DeadLine( const SwFrame* pFrame )
}
SwRectFnSet aRectFnSet(pFrame);
return pUp ? aRectFnSet.GetPrtBottom(*pUp) :
- aRectFnSet.GetBottom(pFrame->Frame());
+ aRectFnSet.GetBottom(pFrame->FrameRA());
}
/// checks whether the SectionFrame is still able to grow, as case may be the environment has to be asked
@@ -1947,7 +1947,7 @@ bool SwSectionFrame::Growable() const
{
SwRectFnSet aRectFnSet(this);
if( aRectFnSet.YDiff( lcl_DeadLine( this ),
- aRectFnSet.GetBottom(Frame()) ) > 0 )
+ aRectFnSet.GetBottom(FrameRA()) ) > 0 )
return true;
return ( GetUpper() && const_cast<SwFrame*>(static_cast<SwFrame const *>(GetUpper()))->Grow( LONG_MAX, true ) );
@@ -1958,7 +1958,7 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst )
if ( !IsColLocked() && !HasFixSize() )
{
SwRectFnSet aRectFnSet(this);
- long nFrameHeight = aRectFnSet.GetHeight(Frame());
+ long nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) )
nDist = LONG_MAX - nFrameHeight;
@@ -1982,7 +1982,7 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst )
else
{
nGrow = lcl_DeadLine( this );
- nGrow = aRectFnSet.YDiff( nGrow, aRectFnSet.GetBottom(Frame()) );
+ nGrow = aRectFnSet.YDiff( nGrow, aRectFnSet.GetBottom(FrameRA()) );
}
SwTwips nSpace = nGrow;
if( !bInCalcContent && nGrow < nDist && GetUpper() )
@@ -2021,9 +2021,9 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst )
if( GetUpper() && GetUpper()->IsHeaderFrame() )
GetUpper()->InvalidateSize();
}
- aRectFnSet.AddBottom( Frame(), nGrow );
- long nPrtHeight = aRectFnSet.GetHeight(Prt()) + nGrow;
- aRectFnSet.SetHeight( Prt(), nPrtHeight );
+ aRectFnSet.AddBottom( FrameWA(), nGrow );
+ long nPrtHeight = aRectFnSet.GetHeight(PrintRA()) + nGrow;
+ aRectFnSet.SetHeight( PrintWA(), nPrtHeight );
if( Lower() && Lower()->IsColumnFrame() && Lower()->GetNext() )
{
@@ -2083,7 +2083,7 @@ SwTwips SwSectionFrame::Shrink_( SwTwips nDist, bool bTst )
else
{
SwRectFnSet aRectFnSet(this);
- long nFrameHeight = aRectFnSet.GetHeight(Frame());
+ long nFrameHeight = aRectFnSet.GetHeight(FrameRA());
if ( nDist > nFrameHeight )
nDist = nFrameHeight;
@@ -2104,9 +2104,9 @@ SwTwips SwSectionFrame::Shrink_( SwTwips nDist, bool bTst )
SetCompletePaint();
InvalidatePage();
}
- aRectFnSet.AddBottom( Frame(), -nDist );
- long nPrtHeight = aRectFnSet.GetHeight(Prt()) - nDist;
- aRectFnSet.SetHeight( Prt(), nPrtHeight );
+ aRectFnSet.AddBottom( FrameWA(), -nDist );
+ long nPrtHeight = aRectFnSet.GetHeight(PrintRA()) - nDist;
+ aRectFnSet.SetHeight( PrintWA(), nPrtHeight );
// We do not allow a section frame to shrink the its upper
// footer frame. This is because in the calculation of a
@@ -2583,7 +2583,7 @@ void SwSectionFrame::InvalidateFootnotePos()
SwTwips SwSectionFrame::CalcUndersize() const
{
SwRectFnSet aRectFnSet(this);
- return InnerHeight() - aRectFnSet.GetHeight(Prt());
+ return InnerHeight() - aRectFnSet.GetHeight(PrintRA());
}
SwTwips SwSectionFrame::Undersize()
@@ -2650,7 +2650,7 @@ void SwRootFrame::DeleteEmptySct_()
mpDestroy->erase( mpDestroy->begin() );
OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
"DeleteEmptySct: Locked SectionFrame" );
- if( !pSect->Frame().HasArea() && !pSect->ContainsContent() )
+ if( !pSect->FrameRA().HasArea() && !pSect->ContainsContent() )
{
SwLayoutFrame* pUp = pSect->GetUpper();
pSect->RemoveFromLayout();
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index b8b3c1ecf8cf..e611d0329436 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -34,29 +34,29 @@
// No inline cause we need the function pointers
long SwFrame::GetTopMargin() const
- { return Prt().Top(); }
+ { return PrintRA().Top(); }
long SwFrame::GetBottomMargin() const
- { return Frame().Height() -Prt().Height() -Prt().Top(); }
+ { return FrameRA().Height() -PrintRA().Height() -PrintRA().Top(); }
long SwFrame::GetLeftMargin() const
- { return Prt().Left(); }
+ { return PrintRA().Left(); }
long SwFrame::GetRightMargin() const
- { return Frame().Width() - Prt().Width() - Prt().Left(); }
+ { return FrameRA().Width() - PrintRA().Width() - PrintRA().Left(); }
long SwFrame::GetPrtLeft() const
- { return Frame().Left() + Prt().Left(); }
+ { return FrameRA().Left() + PrintRA().Left(); }
long SwFrame::GetPrtBottom() const
- { return Frame().Top() + Prt().Height() + Prt().Top(); }
+ { return FrameRA().Top() + PrintRA().Height() + PrintRA().Top(); }
long SwFrame::GetPrtRight() const
- { return Frame().Left() + Prt().Width() + Prt().Left(); }
+ { return FrameRA().Left() + PrintRA().Width() + PrintRA().Left(); }
long SwFrame::GetPrtTop() const
- { return Frame().Top() + Prt().Top(); }
+ { return FrameRA().Top() + PrintRA().Top(); }
bool SwFrame::SetMinLeft( long nDeadline )
{
- SwTwips nDiff = nDeadline - Frame().Left();
+ SwTwips nDiff = nDeadline - FrameRA().Left();
if( nDiff > 0 )
{
- Frame().Left( nDeadline );
- Prt().Width( Prt().Width() - nDiff );
+ FrameWA().Left( nDeadline );
+ PrintWA().Width( PrintRA().Width() - nDiff );
return true;
}
return false;
@@ -64,11 +64,11 @@ bool SwFrame::SetMinLeft( long nDeadline )
bool SwFrame::SetMaxBottom( long nDeadline )
{
- SwTwips nDiff = Frame().Top() + Frame().Height() - nDeadline;
+ SwTwips nDiff = FrameRA().Top() + FrameRA().Height() - nDeadline;
if( nDiff > 0 )
{
- Frame().Height( Frame().Height() - nDiff );
- Prt().Height( Prt().Height() - nDiff );
+ FrameWA().Height( FrameRA().Height() - nDiff );
+ PrintWA().Height( PrintRA().Height() - nDiff );
return true;
}
return false;
@@ -76,11 +76,11 @@ bool SwFrame::SetMaxBottom( long nDeadline )
bool SwFrame::SetMinTop( long nDeadline )
{
- SwTwips nDiff = nDeadline - Frame().Top();
+ SwTwips nDiff = nDeadline - FrameRA().Top();
if( nDiff > 0 )
{
- Frame().Top( nDeadline );
- Prt().Height( Prt().Height() - nDiff );
+ FrameWA().Top( nDeadline );
+ PrintWA().Height( PrintRA().Height() - nDiff );
return true;
}
return false;
@@ -88,11 +88,11 @@ bool SwFrame::SetMinTop( long nDeadline )
bool SwFrame::SetMaxRight( long nDeadline )
{
- SwTwips nDiff = Frame().Left() + Frame().Width() - nDeadline;
+ SwTwips nDiff = FrameRA().Left() + FrameRA().Width() - nDeadline;
if( nDiff > 0 )
{
- Frame().Width( Frame().Width() - nDiff );
- Prt().Width( Prt().Width() - nDiff );
+ FrameWA().Width( FrameRA().Width() - nDiff );
+ PrintWA().Width( PrintRA().Width() - nDiff );
return true;
}
return false;
@@ -102,90 +102,90 @@ void SwFrame::MakeBelowPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
{
if( pPrv )
{
- maFrame.Pos( pPrv->Frame().Pos() );
- maFrame.Pos().Y() += pPrv->Frame().Height();
+ FrameWA().Pos( pPrv->FrameRA().Pos() );
+ FrameWA().Pos().Y() += pPrv->FrameRA().Height();
}
else
{
- maFrame.Pos( pUp->Frame().Pos() );
- maFrame.Pos() += pUp->Prt().Pos();
+ FrameWA().Pos( pUp->FrameRA().Pos() );
+ FrameWA().Pos() += pUp->PrintRA().Pos();
}
if( bNotify )
- maFrame.Pos().Y() += 1;
+ FrameWA().Pos().Y() += 1;
}
void SwFrame::MakeUpperPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
if( pPrv )
{
- maFrame.Pos( pPrv->Frame().Pos() );
- maFrame.Pos().Y() -= Frame().Height();
+ FrameWA().Pos( pPrv->FrameRA().Pos() );
+ FrameWA().Pos().Y() -= FrameRA().Height();
}
else
{
- maFrame.Pos( pUp->Frame().Pos() );
- maFrame.Pos() += pUp->Prt().Pos();
- maFrame.Pos().Y() += pUp->Prt().Height() - maFrame.Height();
+ FrameWA().Pos( pUp->FrameRA().Pos() );
+ FrameWA().Pos() += pUp->PrintRA().Pos();
+ FrameWA().Pos().Y() += pUp->PrintRA().Height() - FrameRA().Height();
}
if( bNotify )
- maFrame.Pos().Y() -= 1;
+ FrameWA().Pos().Y() -= 1;
}
void SwFrame::MakeLeftPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
if( pPrv )
{
- maFrame.Pos( pPrv->Frame().Pos() );
- maFrame.Pos().X() -= Frame().Width();
+ FrameWA().Pos( pPrv->FrameRA().Pos() );
+ FrameWA().Pos().X() -= FrameRA().Width();
}
else
{
- maFrame.Pos( pUp->Frame().Pos() );
- maFrame.Pos() += pUp->Prt().Pos();
- maFrame.Pos().X() += pUp->Prt().Width() - maFrame.Width();
+ FrameWA().Pos( pUp->FrameRA().Pos() );
+ FrameWA().Pos() += pUp->PrintRA().Pos();
+ FrameWA().Pos().X() += pUp->PrintRA().Width() - FrameRA().Width();
}
if( bNotify )
- maFrame.Pos().X() -= 1;
+ FrameWA().Pos().X() -= 1;
}
void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
if( pPrv )
{
- maFrame.Pos( pPrv->Frame().Pos() );
- maFrame.Pos().X() += pPrv->Frame().Width();
+ FrameWA().Pos( pPrv->FrameRA().Pos() );
+ FrameWA().Pos().X() += pPrv->FrameRA().Width();
}
else
{
- maFrame.Pos( pUp->Frame().Pos() );
- maFrame.Pos() += pUp->Prt().Pos();
+ FrameWA().Pos( pUp->FrameRA().Pos() );
+ FrameWA().Pos() += pUp->PrintRA().Pos();
}
if( bNotify )
- maFrame.Pos().X() += 1;
+ FrameWA().Pos().X() += 1;
}
void SwFrame::SetTopBottomMargins( long nTop, long nBot )
{
- Prt().Top( nTop );
- Prt().Height( Frame().Height() - nTop - nBot );
+ PrintWA().Top( nTop );
+ PrintWA().Height( FrameRA().Height() - nTop - nBot );
}
void SwFrame::SetBottomTopMargins( long nBot, long nTop )
{
- Prt().Top( nTop );
- Prt().Height( Frame().Height() - nTop - nBot );
+ PrintWA().Top( nTop );
+ PrintWA().Height( FrameRA().Height() - nTop - nBot );
}
void SwFrame::SetLeftRightMargins( long nLeft, long nRight)
{
- Prt().Left( nLeft );
- Prt().Width( Frame().Width() - nLeft - nRight );
+ PrintWA().Left( nLeft );
+ PrintWA().Width( FrameRA().Width() - nLeft - nRight );
}
void SwFrame::SetRightLeftMargins( long nRight, long nLeft)
{
- Prt().Left( nLeft );
- Prt().Width( Frame().Width() - nLeft - nRight );
+ PrintWA().Left( nLeft );
+ PrintWA().Width( FrameRA().Width() - nLeft - nRight );
}
/// checks the layout direction and invalidates the lower frames recursively, if necessary.
@@ -291,10 +291,10 @@ void SwFrame::CheckDirChange()
// previous frame according to new option 'Use former object positioning'
Point SwFrame::GetFrameAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const
{
- Point aAnchor = Frame().Pos();
+ Point aAnchor = FrameRA().Pos();
if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() )
- aAnchor.X() += Frame().Width();
+ aAnchor.X() += FrameRA().Width();
if ( IsTextFrame() )
{
@@ -550,14 +550,14 @@ SwLayoutFrame::~SwLayoutFrame()
/**
|* The paintarea is the area, in which the content of a frame is allowed
-|* to be displayed. This region could be larger than the printarea (Prt())
+|* to be displayed. This region could be larger than the printarea (PrintRA())
|* of the upper, it includes e.g. often the margin of the page.
|*/
const SwRect SwFrame::PaintArea() const
{
// NEW TABLES
// Cell frames may not leave their upper:
- SwRect aRect = IsRowFrame() ? GetUpper()->Frame() : Frame();
+ SwRect aRect = IsRowFrame() ? GetUpper()->FrameRA() : FrameRA();
const bool bVert = IsVertical();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
long nRight = (aRect.*fnRect->fnGetRight)();
@@ -571,17 +571,17 @@ const SwRect SwFrame::PaintArea() const
if( pTmp->IsCellFrame() && pTmp->GetUpper() &&
pTmp->GetUpper()->IsVertical() != pTmp->IsVertical() )
nRowSpan = static_cast<const SwCellFrame*>(pTmp)->GetTabBox()->getRowSpan();
- long nTmpRight = (pTmp->Frame().*fnRect->fnGetRight)();
- long nTmpLeft = (pTmp->Frame().*fnRect->fnGetLeft)();
+ long nTmpRight = (pTmp->FrameRA().*fnRect->fnGetRight)();
+ long nTmpLeft = (pTmp->FrameRA().*fnRect->fnGetLeft)();
if( pTmp->IsRowFrame() && nRowSpan > 1 )
{
const SwFrame* pNxt = pTmp;
while( --nRowSpan > 0 && pNxt->GetNext() )
pNxt = pNxt->GetNext();
if( pTmp->IsVertical() )
- nTmpLeft = (pNxt->Frame().*fnRect->fnGetLeft)();
+ nTmpLeft = (pNxt->FrameRA().*fnRect->fnGetLeft)();
else
- nTmpRight = (pNxt->Frame().*fnRect->fnGetRight)();
+ nTmpRight = (pNxt->FrameRA().*fnRect->fnGetRight)();
}
OSL_ENSURE( pTmp, "PaintArea lost in time and space" );
if( pTmp->IsPageFrame() || pTmp->IsFlyFrame() ||
@@ -644,17 +644,17 @@ const SwRect SwFrame::PaintArea() const
}
/**
-|* The unionframe is the framearea (Frame()) of a frame expanded by the
+|* The unionframe is the framearea (FrameRA()) of a frame expanded by the
|* printarea, if there's a negative margin at the left or right side.
|*/
const SwRect SwFrame::UnionFrame( bool bBorder ) const
{
bool bVert = IsVertical();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- long nLeft = (Frame().*fnRect->fnGetLeft)();
- long nWidth = (Frame().*fnRect->fnGetWidth)();
- long nPrtLeft = (Prt().*fnRect->fnGetLeft)();
- long nPrtWidth = (Prt().*fnRect->fnGetWidth)();
+ long nLeft = (FrameRA().*fnRect->fnGetLeft)();
+ long nWidth = (FrameRA().*fnRect->fnGetWidth)();
+ long nPrtLeft = (PrintRA().*fnRect->fnGetLeft)();
+ long nPrtWidth = (PrintRA().*fnRect->fnGetWidth)();
if( nPrtLeft + nPrtWidth > nWidth )
nWidth = nPrtLeft + nPrtWidth;
if( nPrtLeft < 0 )
@@ -691,7 +691,7 @@ const SwRect SwFrame::UnionFrame( bool bBorder ) const
nAdd = nTmp;
}
nWidth = nRight + nAdd - nLeft;
- SwRect aRet( Frame() );
+ SwRect aRet( FrameRA() );
(aRet.*fnRect->fnSetPosX)( nLeft );
(aRet.*fnRect->fnSetWidth)( nWidth );
return aRet;
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index c840c62649ea..d7b0ece213f2 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -199,7 +199,7 @@ static SwTwips lcl_GetHeightOfRows( const SwFrame* pStart, long nCount )
SwRectFnSet aRectFnSet(pStart);
while ( pStart && nCount > 0 )
{
- nRet += aRectFnSet.GetHeight(pStart->Frame());
+ nRet += aRectFnSet.GetHeight(pStart->FrameRA());
pStart = pStart->GetNext();
--nCount;
}
@@ -266,7 +266,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrame& _rLayoutFrame,
// modification of the anchored object resp. it's attributes
// due to the movement
SwObjPositioningInProgress aObjPosInProgress( *pAnchoredObj );
- pAnchoredObj->SetObjLeft( _pPageFrame->Frame().Right() );
+ pAnchoredObj->SetObjLeft( _pPageFrame->FrameRA().Right() );
// #115759# - reset character rectangle,
// top of line and relative position in order to assure,
// that anchored object is correctly positioned.
@@ -344,7 +344,7 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
{
lcl_ShrinkCellsAndAllContent( *pTmpRow );
- if (aRectFnSet.GetHeight(pTmpRow->Frame()) > 0)
+ if (aRectFnSet.GetHeight(pTmpRow->FrameRA()) > 0)
bAllRowsCollapsed = false;
pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetNext());
@@ -353,20 +353,20 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
if (bAllRowsCollapsed)
{
// All rows of this table have 0 height -> set height of the table itself as well.
- aRectFnSet.SetHeight(pTmp->Frame(), 0);
- aRectFnSet.SetTop(pTmp->Prt(), 0);
- aRectFnSet.SetHeight(pTmp->Prt(), 0);
+ aRectFnSet.SetHeight(pTmp->FrameWA(), 0);
+ aRectFnSet.SetTop(pTmp->PrintWA(), 0);
+ aRectFnSet.SetHeight(pTmp->PrintWA(), 0);
}
else
bAllLowersCollapsed = false;
}
else
{
- pTmp->Shrink(aRectFnSet.GetHeight(pTmp->Frame()));
- aRectFnSet.SetTop(pTmp->Prt(), 0);
- aRectFnSet.SetHeight(pTmp->Prt(), 0);
+ pTmp->Shrink(aRectFnSet.GetHeight(pTmp->FrameRA()));
+ aRectFnSet.SetTop(pTmp->PrintWA(), 0);
+ aRectFnSet.SetHeight(pTmp->PrintWA(), 0);
- if (aRectFnSet.GetHeight(pTmp->Frame()) > 0)
+ if (aRectFnSet.GetHeight(pTmp->FrameRA()) > 0)
bAllLowersCollapsed = false;
}
@@ -382,9 +382,9 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
if (bAllLowersCollapsed)
{
// All lower frame of this cell have 0 height -> set height of the cell itself as well.
- aRectFnSet.SetHeight(pCurrMasterCell->Frame(), 0);
- aRectFnSet.SetTop(pCurrMasterCell->Prt(), 0);
- aRectFnSet.SetHeight(pCurrMasterCell->Prt(), 0);
+ aRectFnSet.SetHeight(pCurrMasterCell->FrameWA(), 0);
+ aRectFnSet.SetTop(pCurrMasterCell->PrintWA(), 0);
+ aRectFnSet.SetHeight(pCurrMasterCell->PrintWA(), 0);
}
else
bAllCellsCollapsed = false;
@@ -395,9 +395,9 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
if (bAllCellsCollapsed)
{
// All cells have 0 height -> set height of row as well.
- aRectFnSet.SetHeight(rRow.Frame(), 0);
- aRectFnSet.SetTop(rRow.Prt(), 0);
- aRectFnSet.SetHeight(rRow.Prt(), 0);
+ aRectFnSet.SetHeight(rRow.FrameWA(), 0);
+ aRectFnSet.SetTop(rRow.PrintWA(), 0);
+ aRectFnSet.SetHeight(rRow.PrintWA(), 0);
}
}
@@ -520,7 +520,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrame& rTab, SwRowFrame& rLastLine,
// 2. The borders of the cells inside the row
// 3. The minimum height of the row
if ( pTmpLastLineRow->HasFixSize() )
- nMinHeight = aRectFnSet.GetHeight(pTmpLastLineRow->Frame());
+ nMinHeight = aRectFnSet.GetHeight(pTmpLastLineRow->FrameRA());
else
{
{
@@ -574,8 +574,8 @@ static void lcl_PreprocessRowsInCells( SwTabFrame& rTab, SwRowFrame& rLastLine,
lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pTmpLastLineRow );
pTmpLastLineRow->RemoveFromLayout();
pTmpLastLineRow->InsertBefore( pCurrFollowFlowLineCell, nullptr );
- pTmpLastLineRow->Shrink( aRectFnSet.GetHeight(pTmpLastLineRow->Frame()) );
- pCurrFollowFlowLineCell->Grow( aRectFnSet.GetHeight(pTmpLastLineRow->Frame()) );
+ pTmpLastLineRow->Shrink( aRectFnSet.GetHeight(pTmpLastLineRow->FrameRA()) );
+ pCurrFollowFlowLineCell->Grow( aRectFnSet.GetHeight(pTmpLastLineRow->FrameRA()) );
pTmpLastLineRow = pTmp;
}
}
@@ -629,7 +629,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine,
vcl::RenderContext* pRenderContext = rLastLine.getRootFrame()->GetCurrShell()->GetOut();
SwTabFrame& rTab = static_cast<SwTabFrame&>(*rLastLine.GetUpper());
SwRectFnSet aRectFnSet(rTab.GetUpper());
- SwTwips nCurLastLineHeight = aRectFnSet.GetHeight(rLastLine.Frame());
+ SwTwips nCurLastLineHeight = aRectFnSet.GetHeight(rLastLine.FrameRA());
// If there are nested cells in rLastLine, the recalculation of the last
// line needs some preprocessing.
@@ -706,7 +706,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine,
// 1. Check if table fits to its upper.
// #i26945# - include check, if objects fit
const SwTwips nDistanceToUpperPrtBottom =
- aRectFnSet.BottomDist(rTab.Frame(), aRectFnSet.GetPrtBottom(*rTab.GetUpper()));
+ aRectFnSet.BottomDist(rTab.FrameRA(), aRectFnSet.GetPrtBottom(*rTab.GetUpper()));
if ( nDistanceToUpperPrtBottom < 0 || !rTab.DoesObjsFit() )
bRet = false;
@@ -781,9 +781,9 @@ static void lcl_AdjustRowSpanCells( SwRowFrame* pRow )
{
// calculate height of cell:
const long nNewCellHeight = lcl_GetHeightOfRows( pRow, nLayoutRowSpan );
- const long nDiff = nNewCellHeight - aRectFnSet.GetHeight(pCellFrame->Frame());
+ const long nDiff = nNewCellHeight - aRectFnSet.GetHeight(pCellFrame->FrameRA());
if ( nDiff )
- aRectFnSet.AddBottom(pCellFrame->Frame(), nDiff);
+ aRectFnSet.AddBottom(pCellFrame->FrameWA(), nDiff);
}
pCellFrame = static_cast<SwCellFrame*>(pCellFrame->GetNext());
@@ -864,7 +864,7 @@ bool SwTabFrame::RemoveFollowFlowLine()
while ( pRow && nRowsToMove-- > 1 )
{
SwFrame* pNxt = pRow->GetNext();
- nGrow += aRectFnSet.GetHeight(pRow->Frame());
+ nGrow += aRectFnSet.GetHeight(pRow->FrameRA());
// The footnotes have to be moved:
lcl_MoveFootnotes( *GetFollow(), *this, static_cast<SwRowFrame&>(*pRow) );
@@ -980,20 +980,20 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
sal_uInt16 nRowCount = 0; // pRow currently points to the first row
SwTwips nRemainingSpaceForLastRow =
- aRectFnSet.YDiff(nCutPos, aRectFnSet.GetTop(Frame()));
+ aRectFnSet.YDiff(nCutPos, aRectFnSet.GetTop(FrameRA()));
nRemainingSpaceForLastRow -= aRectFnSet.GetTopMargin(*this);
// Make pRow point to the line that does not fit anymore:
while( pRow->GetNext() &&
- nRemainingSpaceForLastRow >= ( aRectFnSet.GetHeight(pRow->Frame()) +
+ nRemainingSpaceForLastRow >= ( aRectFnSet.GetHeight(pRow->FrameRA()) +
(IsCollapsingBorders() ?
pRow->GetBottomLineSize() :
0 ) ) )
{
if( bTryToSplit || !pRow->IsRowSpanLine() ||
- 0 != aRectFnSet.GetHeight(pRow->Frame()) )
+ 0 != aRectFnSet.GetHeight(pRow->FrameRA()) )
++nRowCount;
- nRemainingSpaceForLastRow -= aRectFnSet.GetHeight(pRow->Frame());
+ nRemainingSpaceForLastRow -= aRectFnSet.GetHeight(pRow->FrameRA());
pRow = static_cast<SwRowFrame*>(pRow->GetNext());
}
@@ -1045,7 +1045,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
{
const SwRowFrame* pLowerRow = static_cast<SwRowFrame*>(pLowerCell->Lower());
if ( !pLowerRow->IsRowSplitAllowed() &&
- aRectFnSet.GetHeight(pLowerRow->Frame()) > nRemainingSpaceForLastRow )
+ aRectFnSet.GetHeight(pLowerRow->FrameRA()) > nRemainingSpaceForLastRow )
{
bKeepNextRow = true;
break;
@@ -1062,7 +1062,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
if ( bKeepNextRow )
{
pRow = GetFirstNonHeadlineRow();
- if ( pRow && pRow->IsRowSpanLine() && 0 == aRectFnSet.GetHeight(pRow->Frame()) )
+ if ( pRow && pRow->IsRowSpanLine() && 0 == aRectFnSet.GetHeight(pRow->FrameRA()) )
pRow = static_cast<SwRowFrame*>(pRow->GetNext());
if ( pRow )
{
@@ -1139,9 +1139,9 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
pFoll = new SwTabFrame( *this );
// We give the follow table an initial width.
- aRectFnSet.AddWidth(pFoll->Frame(), aRectFnSet.GetWidth(Frame()));
- aRectFnSet.AddWidth(pFoll->Prt(), aRectFnSet.GetWidth(Prt()));
- aRectFnSet.SetLeft(pFoll->Frame(), aRectFnSet.GetLeft(Frame()));
+ aRectFnSet.AddWidth(pFoll->FrameWA(), aRectFnSet.GetWidth(FrameRA()));
+ aRectFnSet.AddWidth(pFoll->PrintWA(), aRectFnSet.GetWidth(PrintRA()));
+ aRectFnSet.SetLeft(pFoll->FrameWA(), aRectFnSet.GetLeft(FrameRA()));
// Insert the new follow table
pFoll->InsertBehind( GetUpper(), this );
@@ -1225,7 +1225,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
while ( pRow )
{
SwFrame* pNxt = pRow->GetNext();
- nShrink += aRectFnSet.GetHeight(pRow->Frame());
+ nShrink += aRectFnSet.GetHeight(pRow->FrameRA());
// The footnotes do not have to be moved, this is done in the
// MoveFwd of the follow table!!!
pRow->RemoveFromLayout();
@@ -1244,7 +1244,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
while ( pRow )
{
SwFrame* pNxt = pRow->GetNext();
- nShrink += aRectFnSet.GetHeight(pRow->Frame());
+ nShrink += aRectFnSet.GetHeight(pRow->FrameRA());
// The footnotes have to be moved:
lcl_MoveFootnotes( *this, *GetFollow(), *pRow );
@@ -1303,7 +1303,7 @@ bool SwTabFrame::Join()
while ( pRow )
{
pNxt = pRow->GetNext();
- nHeight += aRectFnSet.GetHeight(pRow->Frame());
+ nHeight += aRectFnSet.GetHeight(pRow->FrameRA());
pRow->RemoveFromLayout();
pRow->InvalidateAll_();
pRow->InsertBehind( this, pPrv );
@@ -1344,7 +1344,7 @@ void SwInvalidatePositions( SwFrame *pFrame, long nBottom )
pFrame = pFrame->GetNext();
} while ( pFrame &&
( bAll ||
- aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->Frame()), nBottom ) < 0 ) );
+ aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->FrameRA()), nBottom ) < 0 ) );
}
void SwInvalidateAll( SwFrame *pFrame, long nBottom )
@@ -1379,7 +1379,7 @@ void SwInvalidateAll( SwFrame *pFrame, long nBottom )
pFrame = pFrame->GetNext();
} while ( pFrame &&
( bAll ||
- aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->Frame()), nBottom ) < 0 ) );
+ aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->FrameRA()), nBottom ) < 0 ) );
}
// #i29550#
@@ -1489,7 +1489,7 @@ bool SwContentFrame::CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDont
}
pCnt->GetUpper()->Calc(pRenderContext);
}
- if( ! bAll && aRectFnSet.YDiff(aRectFnSet.GetTop(pCnt->Frame()), nBottom) > 0 )
+ if( ! bAll && aRectFnSet.YDiff(aRectFnSet.GetTop(pCnt->FrameRA()), nBottom) > 0 )
break;
pCnt = pCnt->GetNextContentFrame();
}
@@ -1537,7 +1537,7 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
pFrame = pFrame->GetNext();
} while( pFrame &&
( bAll ||
- aRectFnSet.YDiff(aRectFnSet.GetTop(pFrame->Frame()), nBottom) < 0 )
+ aRectFnSet.YDiff(aRectFnSet.GetTop(pFrame->FrameRA()), nBottom) < 0 )
&& pFrame->GetUpper() == pOldUp );
return bRet;
}
@@ -1880,7 +1880,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
// a new one is moved forwards immediately
- if ( !Frame().Top() && IsFollow() )
+ if ( !FrameRA().Top() && IsFollow() )
{
SwFrame *pPre = GetPrev();
if ( pPre && pPre->IsTabFrame() && static_cast<SwTabFrame*>(pPre)->GetFollow() == this)
@@ -1909,12 +1909,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
bSplit = false;
}
- Point aOldPos( aRectFnSet.GetPos(Frame()) );
+ Point aOldPos( aRectFnSet.GetPos(FrameRA()) );
MakePos();
- if ( aOldPos != aRectFnSet.GetPos(Frame()) )
+ if ( aOldPos != aRectFnSet.GetPos(FrameRA()) )
{
- if ( aOldPos.Y() != aRectFnSet.GetTop(Frame()) )
+ if ( aOldPos.Y() != aRectFnSet.GetTop(FrameRA()) )
{
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if( pLayout )
@@ -1948,20 +1948,20 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
SwFrame* pFrame = GetFirstNonHeadlineRow();
if ( pFrame )
- n1StLineHeight = aRectFnSet.GetHeight(pFrame->Frame());
+ n1StLineHeight = aRectFnSet.GetHeight(pFrame->FrameRA());
}
if ( !mbValidSize || !mbValidPrtArea )
{
- const long nOldPrtWidth = aRectFnSet.GetWidth(Prt());
- const long nOldFrameWidth = aRectFnSet.GetWidth(Frame());
- const Point aOldPrtPos = aRectFnSet.GetPos(Prt());
+ const long nOldPrtWidth = aRectFnSet.GetWidth(PrintRA());
+ const long nOldFrameWidth = aRectFnSet.GetWidth(FrameRA());
+ const Point aOldPrtPos = aRectFnSet.GetPos(PrintRA());
Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout &&
- (aRectFnSet.GetWidth(Prt()) != nOldPrtWidth ||
- aRectFnSet.GetWidth(Frame()) != nOldFrameWidth) )
+ (aRectFnSet.GetWidth(PrintRA()) != nOldPrtWidth ||
+ aRectFnSet.GetWidth(FrameRA()) != nOldFrameWidth) )
{
pAccess.reset();
m_bCalcLowers |= pLayout->Resize(
@@ -1969,7 +1969,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
- if ( aOldPrtPos != aRectFnSet.GetPos(Prt()) )
+ if ( aOldPrtPos != aRectFnSet.GetPos(PrintRA()) )
aNotify.SetLowersComplete( false );
}
@@ -1985,7 +1985,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
// Only if the height of the first line got smaller.
SwFrame *pFrame = GetFirstNonHeadlineRow();
- if( pFrame && n1StLineHeight >aRectFnSet.GetHeight(pFrame->Frame()) )
+ if( pFrame && n1StLineHeight >aRectFnSet.GetHeight(pFrame->FrameRA()) )
{
SwTabFrame *pMaster = FindMaster();
bool bDummy;
@@ -2004,9 +2004,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
MoveLowerFootnotes( nullptr, pOldBoss, nullptr, true );
if ( bReformat || bKeep )
{
- long nOldTop = aRectFnSet.GetTop(Frame());
+ long nOldTop = aRectFnSet.GetTop(FrameRA());
MakePos();
- if( nOldTop != aRectFnSet.GetTop(Frame()) )
+ if( nOldTop != aRectFnSet.GetTop(FrameRA()) )
{
SwHTMLTableLayout *pHTMLLayout =
GetTable()->GetHTMLTableLayout();
@@ -2054,7 +2054,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// table frame bottom to the bottom of the upper printing area.
// Note: negative values denotes the situation that table frame doesn't fit in its upper.
SwTwips nDistanceToUpperPrtBottom =
- aRectFnSet.BottomDist(Frame(), aRectFnSet.GetPrtBottom(*GetUpper()));
+ aRectFnSet.BottomDist(FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()));
/// In online layout try to grow upper of table frame, if table frame doesn't fit in its upper.
const SwViewShell *pSh = getRootFrame()->GetCurrShell();
@@ -2064,7 +2064,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
if ( GetUpper()->Grow( -nDistanceToUpperPrtBottom ) )
{
// upper is grown --> recalculate <nDistanceToUpperPrtBottom>
- nDistanceToUpperPrtBottom = aRectFnSet.BottomDist(Frame(), aRectFnSet.GetPrtBottom(*GetUpper()));
+ nDistanceToUpperPrtBottom = aRectFnSet.BottomDist(FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()));
}
}
@@ -2085,7 +2085,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*pTmp);
if ( bBrowseMode )
nDeadLine += pTmp->Grow( LONG_MAX, true );
- if( aRectFnSet.BottomDist( Frame(), nDeadLine ) > 0 )
+ if( aRectFnSet.BottomDist( FrameRA(), nDeadLine ) > 0 )
{
// First, we remove an existing follow flow line.
if ( HasFollowFlowLine() )
@@ -2121,7 +2121,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
continue;
}
- const SwTwips nOld = aRectFnSet.GetHeight(Frame());
+ const SwTwips nOld = aRectFnSet.GetHeight(FrameRA());
long nRowsToMove = lcl_GetMaximumLayoutRowSpan( *pRow );
SwFrame* pRowToMove = pRow;
@@ -2154,7 +2154,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pRowToMove = pNextRow;
}
- if ( nOld != aRectFnSet.GetHeight(Frame()) )
+ if ( nOld != aRectFnSet.GetHeight(FrameRA()) )
lcl_RecalcTable( *this, static_cast<SwLayoutFrame*>(pRow), aNotify );
continue;
@@ -2292,7 +2292,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// all kinds of unexpected things could happen.
if ( !bEmulateTableKeepFwdMoveAllowed ||
( IsInSct() && (FindSctFrame())->Lower()->IsColumnFrame() &&
- 0 == aRectFnSet.GetHeight(GetUpper()->Frame())
+ 0 == aRectFnSet.GetHeight(GetUpper()->FrameRA())
) )
{
bTryToSplit = false;
@@ -2318,7 +2318,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// One more check if its really necessary to split the table.
// 1. The table either has to exceed the deadline or
// 2. We explicitly want to cut off the last row.
- if( aRectFnSet.BottomDist( Frame(), nDeadLine ) > 0 && !bLastRowHasToMoveToFollow )
+ if( aRectFnSet.BottomDist( FrameRA(), nDeadLine ) > 0 && !bLastRowHasToMoveToFollow )
{
continue;
}
@@ -2355,7 +2355,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
++nMinNumOfLines;
const SwTwips nBreakLine = aRectFnSet.YInc(
- aRectFnSet.GetTop(Frame()),
+ aRectFnSet.GetTop(FrameRA()),
aRectFnSet.GetTopMargin(*this) +
lcl_GetHeightOfRows( GetLower(), nMinNumOfLines ) );
@@ -2448,7 +2448,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
const bool bOldJoinLock = GetFollow()->IsJoinLocked();
GetFollow()->LockJoin();
::lcl_RecalcRow( static_cast<SwRowFrame&>(*GetFollow()->Lower()),
- fnRectX.GetBottom(GetFollow()->GetUpper()->Frame()) );
+ fnRectX.GetBottom(GetFollow()->GetUpper()->FrameRA()) );
// #i43913#
// #i63632# Do not unlock the
// follow if it wasn't locked before.
@@ -2551,7 +2551,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// and can cause layout loops, if table doesn't fit and isn't
// allowed to split.
SwTwips nDistToUpperPrtBottom =
- aRectFnSet.BottomDist( Frame(), aRectFnSet.GetPrtBottom(*GetUpper()));
+ aRectFnSet.BottomDist( FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()));
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
{
lcl_RecalcTable( *this, nullptr, aNotify );
@@ -2606,10 +2606,10 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
{
SwRectFnSet aRectFnSet(this);
const bool bConsiderWrapOnObjPos = rIDSA.get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION);
- long nPrtPos = aRectFnSet.GetTop(Frame());
+ long nPrtPos = aRectFnSet.GetTop(FrameRA());
nPrtPos = aRectFnSet.YInc( nPrtPos, rUpper );
- SwRect aRect( Frame() );
- long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(Prt()), rUpper );
+ SwRect aRect( FrameRA() );
+ long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(PrintRA()), rUpper );
if( nYDiff > 0 )
aRectFnSet.AddBottom( aRect, -nYDiff );
for ( size_t i = 0; i < pPage->GetSortedObjs()->size(); ++i )
@@ -2696,7 +2696,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
{
const long nWidth = aRectFnSet.XDiff(
aRectFnSet.GetRight(aFlyRect),
- aRectFnSet.GetLeft(pFly->GetAnchorFrame()->Frame()) );
+ aRectFnSet.GetLeft(pFly->GetAnchorFrame()->FrameRA()) );
rLeftOffset = std::max( rLeftOffset, nWidth );
bInvalidatePrtArea = true;
}
@@ -2705,7 +2705,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
text::HoriOrientation::RIGHT == rHori.GetHoriOrient() )
{
const long nWidth = aRectFnSet.XDiff(
- aRectFnSet.GetRight(pFly->GetAnchorFrame()->Frame()),
+ aRectFnSet.GetRight(pFly->GetAnchorFrame()->FrameRA()),
aRectFnSet.GetLeft(aFlyRect) );
rRightOffset = std::max( rRightOffset, nWidth );
bInvalidatePrtArea = true;
@@ -2713,7 +2713,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
}
}
}
- rUpper = aRectFnSet.YDiff( nPrtPos, aRectFnSet.GetTop(Frame()) );
+ rUpper = aRectFnSet.YDiff( nPrtPos, aRectFnSet.GetTop(FrameRA()) );
}
return bInvalidatePrtArea;
@@ -2728,10 +2728,10 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
SwRectFnSet aRectFnSet(this);
if ( !mbValidSize )
{
- long nDiff = aRectFnSet.GetWidth(GetUpper()->Prt()) -
- aRectFnSet.GetWidth(Frame());
+ long nDiff = aRectFnSet.GetWidth(GetUpper()->PrintRA()) -
+ aRectFnSet.GetWidth(FrameRA());
if( nDiff )
- aRectFnSet.AddRight( maFrame, nDiff );
+ aRectFnSet.AddRight( FrameWA(), nDiff );
}
//VarSize is always the height.
@@ -2766,8 +2766,8 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
//If the adjustment is 0, the borders are set according to the border
//attributes.
- const SwTwips nOldHeight = aRectFnSet.GetHeight(Prt());
- const SwTwips nMax = aRectFnSet.GetWidth(maFrame);
+ const SwTwips nOldHeight = aRectFnSet.GetHeight(PrintRA());
+ const SwTwips nMax = aRectFnSet.GetWidth(FrameRA());
// OD 14.03.2003 #i9040# - adjust variable names.
const SwTwips nLeftLine = pAttrs->CalcLeftLine();
@@ -2947,12 +2947,12 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
//The page width can be bigger because objects with
//"over-size" are possible (RootFrame::ImplCalcBrowseWidth())
long nWidth = pSh->GetBrowseWidth();
- nWidth -= Prt().Left();
+ nWidth -= PrintRA().Left();
nWidth -= pAttrs->CalcRightLine();
- Prt().Width( std::min( nWidth, Prt().Width() ) );
+ PrintWA().Width( std::min( nWidth, PrintRA().Width() ) );
}
- if ( nOldHeight != aRectFnSet.GetHeight(Prt()) )
+ if ( nOldHeight != aRectFnSet.GetHeight(PrintRA()) )
mbValidSize = false;
}
@@ -2965,13 +2965,13 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
SwFrame *pFrame = m_pLower;
while ( pFrame )
{
- nRemaining += aRectFnSet.GetHeight(pFrame->Frame());
+ nRemaining += aRectFnSet.GetHeight(pFrame->FrameRA());
pFrame = pFrame->GetNext();
}
//And now add the borders
nRemaining += nUpper + nLower;
- nDiff = aRectFnSet.GetHeight(Frame()) - nRemaining;
+ nDiff = aRectFnSet.GetHeight(FrameRA()) - nRemaining;
if ( nDiff > 0 )
Shrink( nDiff );
else if ( nDiff < 0 )
@@ -2982,7 +2982,7 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nHeight = aRectFnSet.GetHeight(Frame());
+ SwTwips nHeight = aRectFnSet.GetHeight(FrameRA());
if( nHeight > 0 && nDist > ( LONG_MAX - nHeight ) )
nDist = LONG_MAX - nHeight;
@@ -2991,15 +2991,15 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( GetUpper() )
{
- SwRect aOldFrame( Frame() );
+ SwRect aOldFrame( FrameRA() );
//The upper only grows as far as needed. nReal provides the distance
//which is already available.
- SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->Prt());
+ SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->PrintRA());
SwFrame *pFrame = GetUpper()->Lower();
while ( pFrame && GetFollow() != pFrame )
{
- nReal -= aRectFnSet.GetHeight(pFrame->Frame());
+ nReal -= aRectFnSet.GetHeight(pFrame->FrameRA());
pFrame = pFrame->GetNext();
}
@@ -3016,7 +3016,7 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
- aRectFnSet.AddBottom( Frame(), nDist );
+ aRectFnSet.AddBottom( FrameWA(), nDist );
SwRootFrame *pRootFrame = getRootFrame();
if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
@@ -3170,7 +3170,7 @@ void SwTabFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
CheckPageDescs( pPage );
if (GetFormat()->GetPageDesc().GetNumOffset())
static_cast<SwRootFrame*>(pPage->GetUpper())->SetVirtPageNum( true );
- SwDocPosUpdate aMsgHint( pPage->Frame().Top() );
+ SwDocPosUpdate aMsgHint( pPage->FrameRA().Top() );
GetFormat()->GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
}
@@ -3337,33 +3337,33 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat
if ( !SwFlowFrame::IsMoveBwdJump() )
{
- long nOldWidth = aRectFnSet.GetWidth(GetUpper()->Prt());
+ long nOldWidth = aRectFnSet.GetWidth(GetUpper()->PrintRA());
SwRectFnSet fnRectX(pNewUpper);
- long nNewWidth = fnRectX.GetWidth(pNewUpper->Prt());
+ long nNewWidth = fnRectX.GetWidth(pNewUpper->PrintRA());
if( std::abs( nNewWidth - nOldWidth ) < 2 )
{
- bMoveAnyway = BwdMoveNecessary( pOldPage, Frame() ) > 1;
+ bMoveAnyway = BwdMoveNecessary( pOldPage, FrameRA() ) > 1;
if( !bMoveAnyway )
{
- SwRect aRect( pNewUpper->Prt() );
- aRect.Pos() += pNewUpper->Frame().Pos();
+ SwRect aRect( pNewUpper->PrintRA() );
+ aRect.Pos() += pNewUpper->FrameRA().Pos();
const SwFrame *pPrevFrame = pNewUpper->Lower();
while ( pPrevFrame && pPrevFrame != this )
{
- fnRectX.SetTop( aRect, fnRectX.GetBottom(pPrevFrame->Frame()) );
+ fnRectX.SetTop( aRect, fnRectX.GetBottom(pPrevFrame->FrameRA()) );
pPrevFrame = pPrevFrame->GetNext();
}
bMoveAnyway = BwdMoveNecessary( pNewPage, aRect) > 1;
// #i54861# Due to changes made in PrepareMake,
// the tabfrm may not have a correct position. Therefore
- // it is possible that pNewUpper->Prt().Height == 0. In this
+ // it is possible that pNewUpper->PrintRA().Height == 0. In this
// case the above calculation of nSpace might give wrong
// results and we really do not want to MoveBackward into a
// 0 height frame. If nTmpSpace is already <= 0, we take this
// value:
const SwTwips nTmpSpace = fnRectX.GetHeight(aRect);
- if ( fnRectX.GetHeight(pNewUpper->Prt()) > 0 || nTmpSpace <= 0 )
+ if ( fnRectX.GetHeight(pNewUpper->PrintRA()) > 0 || nTmpSpace <= 0 )
nSpace = nTmpSpace;
const SwViewShell *pSh = getRootFrame()->GetCurrShell();
@@ -3497,11 +3497,11 @@ void SwTabFrame::Cut()
SwFrame::DestroyFrame(pUp);
}
}
- else if( aRectFnSet.GetHeight(Frame()) )
+ else if( aRectFnSet.GetHeight(FrameRA()) )
{
// OD 26.08.2003 #i18103# - *no* 'ColUnlock' of section -
// undo changes of fix for #104992#
- pUp->Shrink( Frame().Height() );
+ pUp->Shrink( FrameRA().Height() );
}
}
@@ -3535,10 +3535,10 @@ void SwTabFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
}
SwRectFnSet aRectFnSet(this);
- if( aRectFnSet.GetHeight(Frame()) )
- pParent->Grow( aRectFnSet.GetHeight(Frame()) );
+ if( aRectFnSet.GetHeight(FrameRA()) )
+ pParent->Grow( aRectFnSet.GetHeight(FrameRA()) );
- if( aRectFnSet.GetWidth(Frame()) != aRectFnSet.GetWidth(pParent->Prt()) )
+ if( aRectFnSet.GetWidth(FrameRA()) != aRectFnSet.GetWidth(pParent->PrintRA()) )
Prepare( PREP_FIXSIZE_CHG );
if ( GetPrev() )
{
@@ -3740,14 +3740,14 @@ long CalcHeightWithFlys( const SwFrame *pFrame )
const SwTwips nFrameDiff =
aRectFnSet.YDiff(
- aRectFnSet.GetTop(pTmp->Frame()),
- aRectFnSet.GetTop(pFrame->Frame()) );
+ aRectFnSet.GetTop(pTmp->FrameRA()),
+ aRectFnSet.GetTop(pFrame->FrameRA()) );
nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop + nFrameDiff -
- aRectFnSet.GetHeight(pFrame->Frame()) );
+ aRectFnSet.GetHeight(pFrame->FrameRA()) );
// #i56115# The first height calculation
- // gives wrong results if pFrame->Prt().Y() > 0. We do
+ // gives wrong results if pFrame->PrintRA().Y() > 0. We do
// a second calculation based on the actual rectangles of
// pFrame and pAnchoredObj, and use the maximum of the results.
// I do not want to remove the first calculation because
@@ -3755,7 +3755,7 @@ long CalcHeightWithFlys( const SwFrame *pFrame )
// might be the better option to calculate nHeight.
const SwTwips nDistOfFlyBottomToAnchorTop2 = aRectFnSet.YDiff(
aRectFnSet.GetBottom(pAnchoredObj->GetObjRect()),
- aRectFnSet.GetBottom(pFrame->Frame()) );
+ aRectFnSet.GetBottom(pFrame->FrameRA()) );
nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop2 );
}
@@ -3826,7 +3826,7 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrame *_pCell,
}
else
{
- long nLowHeight = aRectFnSet.GetHeight(pLow->Frame());
+ long nLowHeight = aRectFnSet.GetHeight(pLow->FrameRA());
nHeight += nLowHeight;
// #i26945#
if ( _bConsiderObjs )
@@ -3906,7 +3906,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* _pRow,
const SwFrame* pMasterRow = rMaster.GetUpper();
while ( pMasterRow && pMasterRow != _pRow )
{
- nTmp -= aRectFnSet.GetHeight(pMasterRow->Frame());
+ nTmp -= aRectFnSet.GetHeight(pMasterRow->FrameRA());
pMasterRow = pMasterRow->GetNext();
}
}
@@ -4043,7 +4043,7 @@ static SwTwips lcl_calcHeightOfRowBeforeThisFrame(const SwRowFrame& rRow)
{
// The found row frame belongs to a table frame that precedes
// (above) this one in chain. So, include it in the sum
- nResult += aRectFnSet.GetHeight(pCurRow->Frame());
+ nResult += aRectFnSet.GetHeight(pCurRow->FrameRA());
}
}
}
@@ -4062,10 +4062,10 @@ void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
//RowFrames don't have borders and so on therefore the PrtArea always
//matches the Frame.
mbValidPrtArea = true;
- maPrt.Left( 0 );
- maPrt.Top( 0 );
- maPrt.Width ( maFrame.Width() );
- maPrt.Height( maFrame.Height() );
+ PrintWA().Left( 0 );
+ PrintWA().Top( 0 );
+ PrintWA().Width ( FrameRA().Width() );
+ PrintWA().Height( FrameRA().Height() );
// #i29550#
// Here we calculate the top-printing area for the lower cell frames
@@ -4178,7 +4178,7 @@ void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
OSL_ENSURE( rFrameSize.GetSize().Height() > 0, "Has it" );
}
#endif
- const SwTwips nDiff = aRectFnSet.GetHeight(Frame()) -
+ const SwTwips nDiff = aRectFnSet.GetHeight(FrameRA()) -
( HasFixSize() && !IsRowSpanLine()
? pAttrs->GetSize().Height()
// #i26945#
@@ -4199,10 +4199,10 @@ void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
if ( !GetNext() )
{
//The last fills the remaining space in the upper.
- SwTwips nDiff = aRectFnSet.GetHeight(GetUpper()->Prt());
+ SwTwips nDiff = aRectFnSet.GetHeight(GetUpper()->PrintRA());
SwFrame *pSibling = GetUpper()->Lower();
do
- { nDiff -= aRectFnSet.GetHeight(pSibling->Frame());
+ { nDiff -= aRectFnSet.GetHeight(pSibling->FrameRA());
pSibling = pSibling->GetNext();
} while ( pSibling );
if ( nDiff > 0 )
@@ -4239,10 +4239,10 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
if ( pCellFrame->GetTabBox()->getRowSpan() < 1 )
{
// Set height of current (covered) cell to new line height.
- const long nDiff = nHeight - aRectFnSet.GetHeight(pCellFrame->Frame());
+ const long nDiff = nHeight - aRectFnSet.GetHeight(pCellFrame->FrameRA());
if ( nDiff )
{
- aRectFnSet.AddBottom( pCellFrame->Frame(), nDiff );
+ aRectFnSet.AddBottom( pCellFrame->FrameWA(), nDiff );
pCellFrame->InvalidatePrt_();
}
}
@@ -4271,7 +4271,7 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
// Use new height for the current row:
nSumRowHeight += pToAdjustRow == this ?
nHeight :
- aRectFnSet.GetHeight(pToAdjustRow->Frame());
+ aRectFnSet.GetHeight(pToAdjustRow->FrameRA());
if ( nRowSpan-- == 1 )
break;
@@ -4282,11 +4282,11 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
if ( pToAdjustRow && pToAdjustRow != this )
pToAdjustRow->InvalidateSize_();
- const long nDiff = nSumRowHeight - aRectFnSet.GetHeight(pToAdjust->Frame());
+ const long nDiff = nSumRowHeight - aRectFnSet.GetHeight(pToAdjust->FrameRA());
if ( nDiff )
{
- aOldFrame = pToAdjust->Frame();
- aRectFnSet.AddBottom( pToAdjust->Frame(), nDiff );
+ aOldFrame = pToAdjust->FrameRA();
+ aRectFnSet.AddBottom( pToAdjust->FrameWA(), nDiff );
pNotify = pToAdjust;
}
@@ -4346,13 +4346,13 @@ SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
// There may still be some space left in my direct upper:
const SwTwips nAdditionalSpace =
- aRectFnSet.BottomDist( Frame(), aRectFnSet.GetPrtBottom(*GetUpper()->GetUpper()) );
+ aRectFnSet.BottomDist( FrameRA(), aRectFnSet.GetPrtBottom(*GetUpper()->GetUpper()) );
if ( bRestrictTableGrowth && nAdditionalSpace > 0 )
{
nReal = std::min( nAdditionalSpace, nDist );
nDist -= nReal;
if ( !bTst )
- aRectFnSet.AddBottom( Frame(), nReal );
+ aRectFnSet.AddBottom( FrameWA(), nReal );
}
}
@@ -4378,7 +4378,7 @@ SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
SwRectFnSet fnRectX(this);
- AdjustCells( fnRectX.GetHeight(Prt()) + nReal, true );
+ AdjustCells( fnRectX.GetHeight(PrintRA()) + nReal, true );
if ( nReal )
SetCompletePaint();
}
@@ -4391,7 +4391,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
SwRectFnSet aRectFnSet(this);
if( HasFixSize() )
{
- AdjustCells( aRectFnSet.GetHeight(Prt()), true );
+ AdjustCells( aRectFnSet.GetHeight(PrintRA()), true );
return 0L;
}
@@ -4413,7 +4413,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
// Only necessary to calculate minimal row height if height
// of pRow is at least nMinHeight. Otherwise nMinHeight is the
// minimum height.
- if( nMinHeight < aRectFnSet.GetHeight(Frame()) )
+ if( nMinHeight < aRectFnSet.GetHeight(FrameRA()) )
{
// #i26945#
OSL_ENSURE( FindTabFrame(), "<SwRowFrame::ShrinkFrame(..)> - no table frame -> crash." );
@@ -4421,8 +4421,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
nMinHeight = lcl_CalcMinRowHeight( this, bConsiderObjs );
}
- if ( (aRectFnSet.GetHeight(Frame()) - nRealDist) < nMinHeight )
- nRealDist = aRectFnSet.GetHeight(Frame()) - nMinHeight;
+ if ( (aRectFnSet.GetHeight(FrameRA()) - nRealDist) < nMinHeight )
+ nRealDist = aRectFnSet.GetHeight(FrameRA()) - nMinHeight;
}
if ( nRealDist < 0 )
nRealDist = 0;
@@ -4432,11 +4432,11 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if ( !bTst )
{
- SwTwips nHeight = aRectFnSet.GetHeight(Frame());
- aRectFnSet.SetHeight( Frame(), nHeight - nReal );
+ SwTwips nHeight = aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.SetHeight( FrameWA(), nHeight - nReal );
if( IsVertical() && !IsVertLR() && !aRectFnSet.IsRev() )
- Frame().Pos().X() += nReal;
+ FrameWA().Pos().X() += nReal;
}
SwLayoutFrame* pFrame = GetUpper();
@@ -4448,11 +4448,11 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
nReal -= nTmp;
- SwTwips nHeight = aRectFnSet.GetHeight(Frame());
- aRectFnSet.SetHeight( Frame(), nHeight + nReal );
+ SwTwips nHeight = aRectFnSet.GetHeight(FrameRA());
+ aRectFnSet.SetHeight( FrameWA(), nHeight + nReal );
if( IsVertical() && !IsVertLR() && !aRectFnSet.IsRev() )
- Frame().Pos().X() -= nReal;
+ FrameWA().Pos().X() -= nReal;
}
nReal = nTmp;
}
@@ -4478,7 +4478,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
pMasterTab->InvalidatePos();
}
}
- AdjustCells( aRectFnSet.GetHeight(Prt()) - nReal, true );
+ AdjustCells( aRectFnSet.GetHeight(PrintRA()) - nReal, true );
}
return nReal;
}
@@ -4578,14 +4578,14 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
SwRectFnSet aRectFnSet(pLay);
while ( pFrame )
{
- long nFrameTop = aRectFnSet.GetTop(pFrame->Frame());
+ long nFrameTop = aRectFnSet.GetTop(pFrame->FrameRA());
if( nFrameTop != lYStart )
{
bRet = true;
const long lDiff = aRectFnSet.YDiff( lYStart, nFrameTop );
const long lDiffX = lYStart - nFrameTop;
- aRectFnSet.SubTop( pFrame->Frame(), -lDiff );
- aRectFnSet.AddBottom( pFrame->Frame(), lDiff );
+ aRectFnSet.SubTop( pFrame->FrameWA(), -lDiff );
+ aRectFnSet.AddBottom( pFrame->FrameWA(), lDiff );
pFrame->SetCompletePaint();
if ( !pFrame->GetNext() )
pFrame->SetRetouche();
@@ -4593,7 +4593,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
pFrame->Prepare( PREP_POS_CHGD );
if ( pFrame->IsLayoutFrame() && static_cast<SwLayoutFrame*>(pFrame)->Lower() )
lcl_ArrangeLowers( static_cast<SwLayoutFrame*>(pFrame),
- aRectFnSet.GetTop(static_cast<SwLayoutFrame*>(pFrame)->Lower()->Frame())
+ aRectFnSet.GetTop(static_cast<SwLayoutFrame*>(pFrame)->Lower()->FrameRA())
+ lDiffX, bInva );
if ( pFrame->GetDrawObjs() )
{
@@ -4635,13 +4635,13 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
// #i52904# - no direct move of objects,
// whose vertical position doesn't depend on anchor frame.
const bool bDirectMove =
- FAR_AWAY != pFly->Frame().Top() &&
+ FAR_AWAY != pFly->FrameRA().Top() &&
bVertPosDepOnAnchor &&
!pFly->ConsiderObjWrapInfluenceOnObjPos();
if ( bDirectMove )
{
- aRectFnSet.SubTop( pFly->Frame(), -lDiff );
- aRectFnSet.AddBottom( pFly->Frame(), lDiff );
+ aRectFnSet.SubTop( pFly->FrameWA(), -lDiff );
+ aRectFnSet.AddBottom( pFly->FrameWA(), lDiff );
pFly->GetVirtDrawObj()->SetRectsDirty();
// --> OD 2004-08-17 - also notify view of <SdrObject>
// instance, which represents the Writer fly frame in
@@ -4765,7 +4765,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
// Columns and cells are ordered horizontal, not vertical
if( !pFrame->IsColumnFrame() && !pFrame->IsCellFrame() )
lYStart = aRectFnSet.YInc( lYStart,
- aRectFnSet.GetHeight(pFrame->Frame()) );
+ aRectFnSet.GetHeight(pFrame->FrameRA()) );
// Nowadays, the content inside a cell can flow into the follow table.
// Thus, the cell may only grow up to the end of the environment.
@@ -4773,7 +4773,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
// Therefore we have to trigger a formatting for the frames, which do
// not fit into the cell anymore:
SwTwips nDistanceToUpperPrtBottom =
- aRectFnSet.BottomDist( pFrame->Frame(), aRectFnSet.GetPrtBottom(*pLay) );
+ aRectFnSet.BottomDist( pFrame->FrameRA(), aRectFnSet.GetPrtBottom(*pLay) );
// #i56146# - Revise fix of issue #i26945#
// do *not* consider content inside fly frames, if it's an undersized paragraph.
// #i26945# - consider content inside fly frames
@@ -4852,7 +4852,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
OSL_ENSURE( nWidth <= nWish, "Width of cell larger than table." );
OSL_ENSURE( nWidth > 0, "Box without width" );
- const long nPrtWidth = aRectFnSet.GetWidth(pTab->Prt());
+ const long nPrtWidth = aRectFnSet.GetWidth(pTab->PrintRA());
if ( nWish != nPrtWidth )
{
// Avoid rounding problems, at least for the new table model
@@ -4883,7 +4883,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
SwTwips nSumFrameWidths = 0;
while ( pTmpCell != this )
{
- nSumFrameWidths += aRectFnSet.GetWidth(pTmpCell->Frame());
+ nSumFrameWidths += aRectFnSet.GetWidth(pTmpCell->FrameRA());
pTmpCell = pTmpCell->GetNext();
}
@@ -4903,23 +4903,23 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
else
{
OSL_ENSURE( pAttrs->GetSize().Width() > 0, "Box without width" );
- nWidth = aRectFnSet.GetWidth(GetUpper()->Prt());
+ nWidth = aRectFnSet.GetWidth(GetUpper()->PrintRA());
SwFrame *pPre = GetUpper()->Lower();
while ( pPre != this )
{
- nWidth -= aRectFnSet.GetWidth(pPre->Frame());
+ nWidth -= aRectFnSet.GetWidth(pPre->FrameRA());
pPre = pPre->GetNext();
}
}
- const long nDiff = nWidth - aRectFnSet.GetWidth(Frame());
+ const long nDiff = nWidth - aRectFnSet.GetWidth(FrameRA());
if( IsNeighbourFrame() && IsRightToLeft() )
- aRectFnSet.SubLeft( Frame(), nDiff );
+ aRectFnSet.SubLeft( FrameWA(), nDiff );
else
- aRectFnSet.AddRight( Frame(), nDiff );
- aRectFnSet.AddRight( Prt(), nDiff );
+ aRectFnSet.AddRight( FrameWA(), nDiff );
+ aRectFnSet.AddRight( PrintWA(), nDiff );
//Adjust the height, it's defined through the content and the border.
- const long nDiffHeight = nRemaining - aRectFnSet.GetHeight(Frame());
+ const long nDiffHeight = nRemaining - aRectFnSet.GetHeight(FrameRA());
if ( nDiffHeight )
{
if ( nDiffHeight > 0 )
@@ -4966,7 +4966,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
//No alignment if border with flow overlaps the cell.
if ( pPg->GetSortedObjs() )
{
- SwRect aRect( Prt() ); aRect += Frame().Pos();
+ SwRect aRect( PrintRA() ); aRect += FrameRA().Pos();
for (SwAnchoredObject* pAnchoredObj : *pPg->GetSortedObjs())
{
SwRect aTmp( pAnchoredObj->GetObjRect() );
@@ -5006,11 +5006,11 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
}
}
- long nPrtHeight = aRectFnSet.GetHeight(Prt());
+ long nPrtHeight = aRectFnSet.GetHeight(PrintRA());
if( ( bVertDir && ( nRemaining -= lcl_CalcTopAndBottomMargin( *this, *pAttrs ) ) < nPrtHeight ) ||
- aRectFnSet.GetTop(Lower()->Frame()) != aRectFnSet.GetPrtTop(*this) )
+ aRectFnSet.GetTop(Lower()->FrameRA()) != aRectFnSet.GetPrtTop(*this) )
{
- long nDiff = aRectFnSet.GetHeight(Prt()) - nRemaining;
+ long nDiff = aRectFnSet.GetHeight(PrintRA()) - nRemaining;
if ( nDiff >= 0 )
{
long lTopOfst = 0;
@@ -5291,12 +5291,12 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrame& rSourceLine )
// If we are in a split row, there may be some space
// left in the cell frame of the master row.
// We look for the minimum of all first line heights;
- SwTwips nReal = aRectFnSet.GetHeight(pPrevCell->Prt());
+ SwTwips nReal = aRectFnSet.GetHeight(pPrevCell->PrintRA());
const SwFrame* pFrame = pPrevCell->Lower();
const SwFrame* pLast = pFrame;
while ( pFrame )
{
- nReal -= aRectFnSet.GetHeight(pFrame->Frame());
+ nReal -= aRectFnSet.GetHeight(pFrame->FrameRA());
pLast = pFrame;
pFrame = pFrame->GetNext();
}
@@ -5382,7 +5382,7 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
if ( bDontSplit )
{
// Table is not allowed to split: Take the whole height, that's all
- return aRectFnSet.GetHeight(Frame());
+ return aRectFnSet.GetHeight(FrameRA());
}
SwTwips nTmpHeight = 0;
@@ -5433,7 +5433,7 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
if ( pFirstRow )
{
const bool bSplittable = pFirstRow->IsRowSplitAllowed();
- const SwTwips nFirstLineHeight = aRectFnSet.GetHeight(pFirstRow->Frame());
+ const SwTwips nFirstLineHeight = aRectFnSet.GetHeight(pFirstRow->FrameRA());
if ( !bSplittable )
{
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 8cfbec1f17cf..ad472b329a29 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -176,12 +176,12 @@ bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
Point aPoint( rPoint );
// check, if we have to adjust the point
- if ( !Frame().IsInside( aPoint ) )
+ if ( !FrameRA().IsInside( aPoint ) )
{
- aPoint.X() = std::max( aPoint.X(), Frame().Left() );
- aPoint.X() = std::min( aPoint.X(), Frame().Right() );
- aPoint.Y() = std::max( aPoint.Y(), Frame().Top() );
- aPoint.Y() = std::min( aPoint.Y(), Frame().Bottom() );
+ aPoint.X() = std::max( aPoint.X(), FrameRA().Left() );
+ aPoint.X() = std::min( aPoint.X(), FrameRA().Right() );
+ aPoint.Y() = std::max( aPoint.Y(), FrameRA().Top() );
+ aPoint.Y() = std::min( aPoint.Y(), FrameRA().Bottom() );
}
bool bTextRet = false;
@@ -398,9 +398,9 @@ bool SwRootFrame::FillSelection( SwSelectionList& aSelList, const SwRect& rRect)
const long nBottom = rRect.Bottom();
while( pPage )
{
- if( pPage->Frame().Top() < nBottom )
+ if( pPage->FrameRA().Top() < nBottom )
{
- if( pPage->Frame().Bottom() > rRect.Top() )
+ if( pPage->FrameRA().Bottom() > rRect.Top() )
pPage->FillSelection( aSelList, rRect );
pPage = pPage->GetNext();
}
@@ -430,8 +430,8 @@ bool SwRootFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
// #i95626#
// special handling for <rPoint> beyond root frames area
if ( !pPage &&
- rPoint.X() > Frame().Right() &&
- rPoint.Y() > Frame().Bottom() )
+ rPoint.X() > FrameRA().Right() &&
+ rPoint.Y() > FrameRA().Bottom() )
{
pPage = dynamic_cast<const SwPageFrame*>(Lower());
while ( pPage && pPage->GetNext() )
@@ -496,7 +496,7 @@ bool SwCellFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
while ( pFrame && !bRet )
{
pFrame->Calc(pRenderContext);
- if ( pFrame->Frame().IsInside( rPoint ) )
+ if ( pFrame->FrameRA().IsInside( rPoint ) )
{
bRet = pFrame->GetCursorOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->m_bStop )
@@ -539,7 +539,7 @@ bool SwFlyFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
//However if the Point sits inside a Fly which is completely located inside
//the current one, we call GetCursorOfst for it.
Calc(pRenderContext);
- bool bInside = Frame().IsInside( rPoint ) && Lower();
+ bool bInside = FrameRA().IsInside( rPoint ) && Lower();
bool bRet = false;
//If an Frame contains a graphic, but only text was requested, it basically
@@ -557,8 +557,8 @@ bool SwFlyFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
{
const SwVirtFlyDrawObj* pObj = static_cast<const SwVirtFlyDrawObj*>(aIter());
const SwFlyFrame* pFly = pObj ? pObj->GetFlyFrame() : nullptr;
- if ( pFly && pFly->Frame().IsInside( rPoint ) &&
- Frame().IsInside( pFly->Frame() ) )
+ if ( pFly && pFly->FrameRA().IsInside( rPoint ) &&
+ FrameRA().IsInside( pFly->FrameRA() ) )
{
if (g_OszCtrl.ChkOsz(pFly))
break;
@@ -578,7 +578,7 @@ bool SwFlyFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
while ( pFrame && !bRet )
{
pFrame->Calc(pRenderContext);
- if ( pFrame->Frame().IsInside( rPoint ) )
+ if ( pFrame->FrameRA().IsInside( rPoint ) )
{
bRet = pFrame->GetCursorOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->m_bStop )
@@ -741,7 +741,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
if ( bTab )
{
// pStart or pCnt is inside a table. nX will be used for travelling:
- SwRect aRect( pStart->Frame() );
+ SwRect aRect( pStart->FrameRA() );
pStart->GetCharRect( aRect, *pPam->GetPoint() );
Point aCenter = aRect.Center();
nX = aRectFnSet.IsVert() ? aCenter.Y() : aCenter.X();
@@ -758,16 +758,16 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
while ( pCell && !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
OSL_ENSURE( pCell, "could not find the cell" );
- nX = aRectFnSet.GetLeft(pCell->Frame()) +
- aRectFnSet.GetWidth(pCell->Frame()) / 2;
+ nX = aRectFnSet.GetLeft(pCell->FrameRA()) +
+ aRectFnSet.GetWidth(pCell->FrameRA()) / 2;
//The flow leads from one table to the next. The X-value needs to be
//corrected based on the middle of the starting cell by the amount
//of the offset of the tables.
if ( pStTab != pTable )
{
- nX += aRectFnSet.GetLeft(pTable->Frame()) -
- aRectFnSet.GetLeft(pStTab->Frame());
+ nX += aRectFnSet.GetLeft(pTable->FrameRA()) -
+ aRectFnSet.GetLeft(pStTab->FrameRA());
}
}
@@ -870,7 +870,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
if ( pTable &&
!pTab->GetUpper()->IsInTab() &&
!pTable->GetUpper()->IsInTab() )
- nX += pTab->Frame().Left() - pTable->Frame().Left();
+ nX += pTab->FrameRA().Left() - pTable->FrameRA().Left();
pTable = pTab;
}
const SwLayoutFrame *pCell = pCnt->GetUpper();
@@ -881,7 +881,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
Point aInsideCnt;
if ( pCell )
{
- long nTmpTop = aRectFnSet.GetTop(pCell->Frame());
+ long nTmpTop = aRectFnSet.GetTop(pCell->FrameRA());
if ( aRectFnSet.IsVert() )
{
if ( nTmpTop )
@@ -893,7 +893,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
aInsideCell = Point( nX, nTmpTop );
}
- long nTmpTop = aRectFnSet.GetTop(pCnt->Frame());
+ long nTmpTop = aRectFnSet.GetTop(pCnt->FrameRA());
if ( aRectFnSet.IsVert() )
{
if ( nTmpTop )
@@ -904,11 +904,11 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
else
aInsideCnt = Point( nX, nTmpTop );
- if ( pCell && pCell->Frame().IsInside( aInsideCell ) )
+ if ( pCell && pCell->FrameRA().IsInside( aInsideCell ) )
{
bEnd = true;
//Get the right Content out of the cell.
- if ( !pCnt->Frame().IsInside( aInsideCnt ) )
+ if ( !pCnt->FrameRA().IsInside( aInsideCnt ) )
{
pCnt = pCell->ContainsContent();
if ( fnNxtPrv == lcl_GetPrvCnt )
@@ -916,7 +916,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
pCnt = pCnt->GetNextContentFrame();
}
}
- else if ( pCnt->Frame().IsInside( aInsideCnt ) )
+ else if ( pCnt->FrameRA().IsInside( aInsideCnt ) )
bEnd = true;
}
}
@@ -1022,8 +1022,8 @@ sal_uInt16 SwRootFrame::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
if( pSCursor )
{
Point &rPt = pSCursor->GetPtPos();
- rPt = pContent->Frame().Pos();
- rPt += pContent->Prt().Pos();
+ rPt = pContent->FrameRA().Pos();
+ rPt += pContent->PrintRA().Pos();
}
return pPage->GetPhyPageNum();
}
@@ -1147,12 +1147,12 @@ static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point& rPt )
{
if( pUp->IsPageBodyFrame() || pUp->IsFooterFrame() || pUp->IsHeaderFrame() )
{
- if( rPt.Y() >= pUp->Frame().Top() && rPt.Y() <= pUp->Frame().Bottom() )
+ if( rPt.Y() >= pUp->FrameRA().Top() && rPt.Y() <= pUp->FrameRA().Bottom() )
return pUp;
return nullptr;
}
if( pUp->IsFootnoteContFrame() )
- return pUp->Frame().IsInside( rPt ) ? pUp : nullptr;
+ return pUp->FrameRA().IsInside( rPt ) ? pUp : nullptr;
pUp = pUp->GetUpper();
}
return nullptr;
@@ -1195,7 +1195,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
((!bDontLeave || IsAnLower( pContent )) &&
(pContent->GetPhyPageNum() <= nMaxPage)) )
{
- if ( pContent->Frame().Width() &&
+ if ( pContent->FrameRA().Width() &&
( !bBodyOnly || pContent->IsInDocBody() ) )
{
//If the Content lies in a protected area (cell, Footnote, section),
@@ -1319,34 +1319,34 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
}
//A small correction at the first/last
- Size aActualSize( pActual->Prt().SSize() );
- if ( aActualSize.Height() > pActual->GetUpper()->Prt().Height() )
- aActualSize.Height() = pActual->GetUpper()->Prt().Height();
+ Size aActualSize( pActual->PrintRA().SSize() );
+ if ( aActualSize.Height() > pActual->GetUpper()->PrintRA().Height() )
+ aActualSize.Height() = pActual->GetUpper()->PrintRA().Height();
SwRectFnSet aRectFnSet(pActual);
if ( !pActual->GetPrev() &&
aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pActual),
aRectFnSet.IsVert() ? rPoint.X() : rPoint.Y() ) > 0 )
{
- aPoint.Y() = pActual->Frame().Top() + pActual->Prt().Top();
- aPoint.X() = pActual->Frame().Left() +
+ aPoint.Y() = pActual->FrameRA().Top() + pActual->PrintRA().Top();
+ aPoint.X() = pActual->FrameRA().Left() +
( pActual->IsRightToLeft() || aRectFnSet.IsVert() ?
- pActual->Prt().Right() :
- pActual->Prt().Left() );
+ pActual->PrintRA().Right() :
+ pActual->PrintRA().Left() );
}
else if ( !pActual->GetNext() &&
aRectFnSet.YDiff( aRectFnSet.GetPrtBottom(*pActual),
aRectFnSet.IsVert() ? rPoint.X() : rPoint.Y() ) < 0 )
{
- aPoint.Y() = pActual->Frame().Top() + pActual->Prt().Bottom();
- aPoint.X() = pActual->Frame().Left() +
+ aPoint.Y() = pActual->FrameRA().Top() + pActual->PrintRA().Bottom();
+ aPoint.X() = pActual->FrameRA().Left() +
( pActual->IsRightToLeft() || aRectFnSet.IsVert() ?
- pActual->Prt().Left() :
- pActual->Prt().Right() );
+ pActual->PrintRA().Left() :
+ pActual->PrintRA().Right() );
}
//Bring the Point in to the PrtArea
- const SwRect aRect( pActual->Frame().Pos() + pActual->Prt().Pos(),
+ const SwRect aRect( pActual->FrameRA().Pos() + pActual->PrintRA().Pos(),
aActualSize );
if ( aPoint.Y() < aRect.Top() )
aPoint.Y() = aRect.Top();
@@ -1413,7 +1413,7 @@ void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
nDist = nDiff;
pAct = pContent;
}
- else if ( aContentFrame.Top() > Frame().Bottom() )
+ else if ( aContentFrame.Top() > FrameRA().Bottom() )
//In terms of fields, it's not possible to be closer any more!
break;
@@ -1423,7 +1423,7 @@ void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
}
//Bring the point into the PrtArea.
- const SwRect aRect( pAct->Frame().Pos() + pAct->Prt().Pos(), pAct->Prt().SSize() );
+ const SwRect aRect( pAct->FrameRA().Pos() + pAct->PrintRA().Pos(), pAct->PrintRA().SSize() );
if ( aAct.Y() < aRect.Top() )
aAct.Y() = aRect.Top();
else if ( aAct.Y() > aRect.Bottom() )
@@ -1466,7 +1466,7 @@ Point SwRootFrame::GetNextPrevContentPos( const Point& rPoint, bool bNext ) cons
//page.
const SwLayoutFrame *pPage = static_cast<const SwLayoutFrame*>(Lower());
if( pPage )
- while( pPage->GetNext() && pPage->Frame().Bottom() < rPoint.Y() )
+ while( pPage->GetNext() && pPage->FrameRA().Bottom() < rPoint.Y() )
pPage = static_cast<const SwLayoutFrame*>(pPage->GetNext());
const SwContentFrame *pCnt = pPage ? pPage->ContainsContent() : ContainsContent();
@@ -1481,7 +1481,7 @@ Point SwRootFrame::GetNextPrevContentPos( const Point& rPoint, bool bNext ) cons
{
// As long as the point lies before the first ContentFrame and there are
// still precedent pages I'll go to the next page.
- while ( rPoint.Y() < pCnt->Frame().Top() && pPage->GetPrev() )
+ while ( rPoint.Y() < pCnt->FrameRA().Top() && pPage->GetPrev() )
{
pPage = static_cast<const SwLayoutFrame*>(pPage->GetPrev());
pCnt = pPage->ContainsContent();
@@ -1498,7 +1498,7 @@ Point SwRootFrame::GetNextPrevContentPos( const Point& rPoint, bool bNext ) cons
}
//Does the point lie above the first ContentFrame?
- if ( rPoint.Y() < pCnt->Frame().Top() && !lcl_IsInRepeatedHeadline( pCnt ) )
+ if ( rPoint.Y() < pCnt->FrameRA().Top() && !lcl_IsInRepeatedHeadline( pCnt ) )
return pCnt->UnionFrame().Pos();
Point aRet(0, 0);
@@ -1530,12 +1530,12 @@ Point SwRootFrame::GetNextPrevContentPos( const Point& rPoint, bool bNext ) cons
//searched.
const SwTabFrame* pTFrame;
pNxt->Calc(pRenderContext);
- if( pNxt->Frame().Top() > rPoint.Y() &&
+ if( pNxt->FrameRA().Top() > rPoint.Y() &&
!lcl_IsInRepeatedHeadline( pCnt, &pTFrame ) &&
- ( !pTFrame || pNxt->Frame().Left() > rPoint.X() ))
+ ( !pTFrame || pNxt->FrameRA().Left() > rPoint.X() ))
{
if (bNext)
- aRet = pNxt->Frame().Pos();
+ aRet = pNxt->FrameRA().Pos();
else
aRet = Point( aContentFrame.Right(), aContentFrame.Bottom() );
break;
@@ -1564,7 +1564,7 @@ Point SwRootFrame::GetPagePos( sal_uInt16 nPageNum ) const
break;
pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
}
- return pPage->Frame().Pos();
+ return pPage->FrameRA().Pos();
}
/** get page frame by phyiscal page number
@@ -1771,10 +1771,10 @@ void SwFrame::Calc(vcl::RenderContext* pRenderContext) const
Point SwFrame::GetRelPos() const
{
- Point aRet( maFrame.Pos() );
+ Point aRet( FrameRA().Pos() );
// here we cast since SwLayoutFrame is declared only as forwarded
- aRet -= GetUpper()->Prt().Pos();
- aRet -= GetUpper()->Frame().Pos();
+ aRet -= GetUpper()->PrintRA().Pos();
+ aRet -= GetUpper()->FrameRA().Pos();
return aRet;
}
@@ -1893,7 +1893,7 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor )
while ( pRow )
{
- if ( pRow->Frame().IsOver( rUnion.GetUnion() ) )
+ if ( pRow->FrameRA().IsOver( rUnion.GetUnion() ) )
{
const SwLayoutFrame *pCell = pRow->FirstCell();
@@ -1995,7 +1995,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
// #i12836# enhanced pdf
SwRegionRects aRegion( !bIgnoreVisArea ?
pSh->VisArea() :
- Frame() );
+ FrameRA() );
if( !pStartPos->nNode.GetNode().IsContentNode() ||
!pStartPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) ||
( pStartPos->nNode != pEndPos->nNode &&
@@ -2387,8 +2387,8 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
}
else
{
- lLeft = aRectFnSet.GetLeft(pStartFrame->Frame()) +
- aRectFnSet.GetLeft(pStartFrame->Prt());
+ lLeft = aRectFnSet.GetLeft(pStartFrame->FrameRA()) +
+ aRectFnSet.GetLeft(pStartFrame->PrintRA());
lRight = aRectFnSet.GetRight(aEndFrame);
}
if( lLeft < aRectFnSet.GetLeft(aStFrame) )
@@ -2556,7 +2556,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
}
}
if( inSelection )
- Add( aRegion, pFly->Frame() );
+ Add( aRegion, pFly->FrameRA() );
else if ( !pFly->IsAnLower( pStartFrame ) &&
(rSur.GetSurround() != css::text::WrapTextMode_THROUGH &&
!rSur.IsContour()) )
@@ -2584,7 +2584,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
} while ( bSub && pTmp );
}
if ( bSub )
- Sub( aRegion, pFly->Frame() );
+ Sub( aRegion, pFly->FrameRA() );
}
}
}
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() );
}
}