summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-30 21:30:32 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-31 09:39:32 +0100
commit4e5817b8520f2d517444e24163d66dd13580e727 (patch)
tree9cd4e921cefd0fd20fa8098696f08a3feb3047d3
parent2891ee3e4e8b7e1b519de99ae74603c0197a2e40 (diff)
RotateFlyFrame2: Unified FrameAreaDefinitionfeature/RotateFlyFrame2
Isolated all Frame AreaDefinition and it's layout flags to SwFrameAreaDefinition class which is now base for SwFrame. Adapted calls to get/set and WriteAccess hekper classes accordingly. This allows much deeper understanding what Writer is doing when layouting it's frames and needed when reaction on such changes is necessary Change-Id: I96220a1d140e69c76cc63023aae26e4ed17f3504
-rw-r--r--sw/source/core/access/acccontext.cxx4
-rw-r--r--sw/source/core/access/accfrmobj.cxx12
-rw-r--r--sw/source/core/access/acctable.cxx42
-rw-r--r--sw/source/core/crsr/callnk.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx30
-rw-r--r--sw/source/core/crsr/crstrvl.cxx22
-rw-r--r--sw/source/core/crsr/swcrsr.cxx15
-rw-r--r--sw/source/core/crsr/trvlcol.cxx6
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx10
-rw-r--r--sw/source/core/crsr/trvltbl.cxx6
-rw-r--r--sw/source/core/crsr/viscrs.cxx12
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx2
-rw-r--r--sw/source/core/doc/doc.cxx2
-rw-r--r--sw/source/core/doc/docfly.cxx16
-rw-r--r--sw/source/core/doc/htmltbl.cxx8
-rw-r--r--sw/source/core/doc/notxtfrm.cxx63
-rw-r--r--sw/source/core/doc/tblrwcl.cxx16
-rw-r--r--sw/source/core/docnode/ndtbl.cxx50
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx74
-rw-r--r--sw/source/core/docnode/node.cxx18
-rw-r--r--sw/source/core/draw/dflyobj.cxx42
-rw-r--r--sw/source/core/draw/dpage.cxx12
-rw-r--r--sw/source/core/draw/dview.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx17
-rw-r--r--sw/source/core/edit/edattr.cxx4
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/fields/expfld.cxx6
-rw-r--r--sw/source/core/fields/postithelper.cxx8
-rw-r--r--sw/source/core/fields/reffld.cxx48
-rw-r--r--sw/source/core/frmedt/fecopy.cxx20
-rw-r--r--sw/source/core/frmedt/fedesc.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx52
-rw-r--r--sw/source/core/frmedt/feshview.cxx98
-rw-r--r--sw/source/core/frmedt/fetab.cxx66
-rw-r--r--sw/source/core/frmedt/fews.cxx130
-rw-r--r--sw/source/core/frmedt/tblsel.cxx207
-rw-r--r--sw/source/core/inc/flyfrms.hxx2
-rw-r--r--sw/source/core/inc/frame.hxx128
-rw-r--r--sw/source/core/inc/frmtool.hxx2
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx12
-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.cxx396
-rw-r--r--sw/source/core/layout/colfrm.cxx18
-rw-r--r--sw/source/core/layout/dbg_lay.cxx30
-rw-r--r--sw/source/core/layout/findfrm.cxx20
-rw-r--r--sw/source/core/layout/flowfrm.cxx14
-rw-r--r--sw/source/core/layout/fly.cxx167
-rw-r--r--sw/source/core/layout/flycnt.cxx208
-rw-r--r--sw/source/core/layout/flyincnt.cxx44
-rw-r--r--sw/source/core/layout/flylay.cxx173
-rw-r--r--sw/source/core/layout/frmtool.cxx150
-rw-r--r--sw/source/core/layout/ftnfrm.cxx114
-rw-r--r--sw/source/core/layout/hffrm.cxx95
-rw-r--r--sw/source/core/layout/layact.cxx155
-rw-r--r--sw/source/core/layout/laycache.cxx30
-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/objectformatter.cxx2
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx2
-rw-r--r--sw/source/core/layout/pagechg.cxx130
-rw-r--r--sw/source/core/layout/paintfrm.cxx178
-rw-r--r--sw/source/core/layout/sectfrm.cxx147
-rw-r--r--sw/source/core/layout/ssfrm.cxx124
-rw-r--r--sw/source/core/layout/tabfrm.cxx416
-rw-r--r--sw/source/core/layout/trvlfrm.cxx128
-rw-r--r--sw/source/core/layout/wsfrm.cxx418
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx144
-rw-r--r--sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx4
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx12
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx4
-rw-r--r--sw/source/core/ole/ndole.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx10
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx18
-rw-r--r--sw/source/core/text/frmcrsr.cxx56
-rw-r--r--sw/source/core/text/frmform.cxx158
-rw-r--r--sw/source/core/text/frminf.cxx10
-rw-r--r--sw/source/core/text/frmpaint.cxx40
-rw-r--r--sw/source/core/text/itrcrsr.cxx34
-rw-r--r--sw/source/core/text/itrform2.cxx24
-rw-r--r--sw/source/core/text/itrpaint.cxx4
-rw-r--r--sw/source/core/text/itrtxt.cxx2
-rw-r--r--sw/source/core/text/porfly.cxx8
-rw-r--r--sw/source/core/text/pormulti.cxx4
-rw-r--r--sw/source/core/text/porrst.cxx18
-rw-r--r--sw/source/core/text/txtdrop.cxx4
-rw-r--r--sw/source/core/text/txtfly.cxx32
-rw-r--r--sw/source/core/text/txtfrm.cxx200
-rw-r--r--sw/source/core/text/txtftn.cxx34
-rw-r--r--sw/source/core/text/txtio.cxx4
-rw-r--r--sw/source/core/text/txttab.cxx12
-rw-r--r--sw/source/core/text/widorp.cxx12
-rw-r--r--sw/source/core/text/xmldump.cxx22
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx10
-rw-r--r--sw/source/core/view/vdraw.cxx6
-rw-r--r--sw/source/core/view/viewimp.cxx12
-rw-r--r--sw/source/core/view/viewpg.cxx16
-rw-r--r--sw/source/core/view/viewsh.cxx38
-rw-r--r--sw/source/core/view/vprint.cxx10
-rw-r--r--sw/source/uibase/docvw/FrameControlsManager.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx6
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
104 files changed, 2820 insertions, 2633 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 5e56fa85ff44..04dd13dfbaeb 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1123,7 +1123,7 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
{
SolarMutexGuard aGuard;
- OSL_ENSURE( GetFrame() && !GetFrame()->getSwFrame().IsEmpty(), "context should have a size" );
+ OSL_ENSURE( GetFrame() && !GetFrame()->geFrameArea().IsEmpty(), "context should have a size" );
bool bIsOldShowingState;
bool bIsNewShowingState = IsShowing( *(GetMap()) );
@@ -1170,7 +1170,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
// this happens during layout, e.g. when a page is deleted and next page's
// header/footer moves backward such an event is generated
SAL_INFO_IF(rChildFrameOrObj.GetSwFrame() &&
- rChildFrameOrObj.GetSwFrame()->getSwFrame().IsEmpty(),
+ rChildFrameOrObj.GetSwFrame()->geFrameArea().IsEmpty(),
"sw.a11y", "child context should have a size");
if ( rChildFrameOrObj.AlwaysIncludeAsChild() )
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index f233263694ea..1e79cb1fd93c 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -243,16 +243,16 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const
if ( mpFrame->IsPageFrame() &&
static_cast< const SwPageFrame * >( mpFrame )->IsEmptyPage() )
{
- aBox = SwRect( mpFrame->getSwFrame().Left(), mpFrame->getSwFrame().Top()-1, 1, 1 );
+ aBox = SwRect( mpFrame->geFrameArea().Left(), mpFrame->geFrameArea().Top()-1, 1, 1 );
}
else if ( mpFrame->IsTabFrame() )
{
- aBox = SwRect( mpFrame->getSwFrame() );
- aBox.Intersection( mpFrame->GetUpper()->getSwFrame() );
+ aBox = SwRect( mpFrame->geFrameArea() );
+ aBox.Intersection( mpFrame->GetUpper()->geFrameArea() );
}
else
{
- aBox = mpFrame->getSwFrame();
+ aBox = mpFrame->geFrameArea();
}
}
else if( mpDrawObj )
@@ -268,7 +268,7 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const
{
aBox = SwRect( mpDrawObj->GetCurrentBoundRect() );
// tdf#91260 drawing object may be partially off-page
- aBox.Intersection(pPage->getSwFrame());
+ aBox.Intersection(pPage->geFrameArea());
}
}
else if ( mpWindow )
@@ -294,7 +294,7 @@ SwRect SwAccessibleChild::GetBounds( const SwAccessibleMap& rAccMap ) const
if( mpFrame->IsPageFrame() &&
static_cast< const SwPageFrame * >( mpFrame )->IsEmptyPage() )
{
- aBound = SwRect( mpFrame->getSwFrame().Left(), mpFrame->getSwFrame().Top()-1, 0, 0 );
+ aBound = SwRect( mpFrame->geFrameArea().Left(), mpFrame->geFrameArea().Top()-1, 0, 0 );
}
else
aBound = mpFrame->PaintArea();
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 0abbc829a8cf..feaa4f4148d6 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -156,14 +156,14 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrame *pFrame )
// #i77106#
if ( IncludeRow( *pLower ) )
{
- maRows.insert( pLower->getSwFrame().Top() - maTabFramePos.getY() );
+ maRows.insert( pLower->geFrameArea().Top() - maTabFramePos.getY() );
CollectData( pLower );
}
}
else if( pLower->IsCellFrame() &&
rLower.IsAccessible( mbIsInPagePreview ) )
{
- maColumns.insert( pLower->getSwFrame().Left() - maTabFramePos.getX() );
+ maColumns.insert( pLower->geFrameArea().Left() - maTabFramePos.getX() );
}
else
{
@@ -196,7 +196,7 @@ void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrame *pFrame )
//if(mpTabFrame->GetTable()->GetTabLines()[ 0 ] != pLine)
//return ;
- maRows.insert( pLower->getSwFrame().Top() - maTabFramePos.Y() );
+ maRows.insert( pLower->geFrameArea().Top() - maTabFramePos.Y() );
CollectRowHeaderData( pLower );
@@ -206,7 +206,7 @@ void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrame *pFrame )
{
//Added by yanjun. Can't find the "GetRowHeaderFlag" function (need verify).
//if(static_cast<SwCellFrame*>(pLower)->GetRowHeaderFlag())
- // maColumns.insert( pLower->getSwFrame().Left() - maTabFramePos.X() );
+ // maColumns.insert( pLower->geFrameArea().Left() - maTabFramePos.X() );
}
else
{
@@ -244,7 +244,7 @@ void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrame *pFrame
if(iCurrentRowIndex >= mpTabFrame->GetTable()->GetRowsToRepeat_())
return ;
- maRows.insert( pLower->getSwFrame().Top() - maTabFramePos.Y() );
+ maRows.insert( pLower->geFrameArea().Top() - maTabFramePos.Y() );
CollectColumnHeaderData( pLower );
@@ -252,7 +252,7 @@ void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrame *pFrame
else if( pLower->IsCellFrame() &&
rLower.IsAccessible( mbIsInPagePreview ) )
{
- maColumns.insert( pLower->getSwFrame().Left() - maTabFramePos.X() );
+ maColumns.insert( pLower->geFrameArea().Left() - maTabFramePos.X() );
}
else
{
@@ -279,7 +279,7 @@ void SwAccessibleTableData_Impl::CollectExtents( const SwFrame *pFrame )
{
sal_Int32 nRow, nCol;
Int32Pair_Impl aCellExtents;
- GetRowColumnAndExtent( pLower->getSwFrame(), nRow, nCol,
+ GetRowColumnAndExtent( pLower->geFrameArea(), nRow, nCol,
aCellExtents.first,
aCellExtents.second );
@@ -318,7 +318,7 @@ bool SwAccessibleTableData_Impl::FindCell(
if( rLower.IsAccessible( mbIsInPagePreview ) )
{
OSL_ENSURE( pLower->IsCellFrame(), "lower is not a cell frame" );
- const SwRect& rFrame = pLower->getSwFrame();
+ const SwRect& rFrame = pLower->geFrameArea();
if( rFrame.Right() >= rPos.X() && rFrame.Bottom() >= rPos.Y() )
{
// We have found the cell
@@ -432,7 +432,7 @@ void SwAccessibleTableData_Impl::GetSelection(
SwAccTableSelHander_Impl& rSelHdl,
bool bColumns ) const
{
- SwRect aArea( mpTabFrame->getSwFrame() );
+ SwRect aArea( mpTabFrame->geFrameArea() );
Point aPos( aArea.Pos() );
const Int32Set_Impl& rRowsOrColumns = bColumns ? maColumns : maRows;
@@ -463,7 +463,7 @@ void SwAccessibleTableData_Impl::GetSelection(
const SwFrame *SwAccessibleTableData_Impl::GetCellAtPos(
sal_Int32 nLeft, sal_Int32 nTop ) const
{
- Point aPos( mpTabFrame->getSwFrame().Pos() );
+ Point aPos( mpTabFrame->geFrameArea().Pos() );
aPos.Move( nLeft, nTop );
const SwFrame *pRet = nullptr;
FindCell( aPos, mpTabFrame, false/*bExact*/, pRet );
@@ -497,7 +497,7 @@ SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap
bool bIsInPagePreview,
bool bOnlyTableColumnHeader )
: mrAccMap( rAccMap )
- , maTabFramePos( pTabFrame->getSwFrame().Pos() )
+ , maTabFramePos( pTabFrame->geFrameArea().Pos() )
, mpTabFrame( pTabFrame )
, mbIsInPagePreview( bIsInPagePreview )
, mbOnlyTableColumnHeader( bOnlyTableColumnHeader )
@@ -1016,8 +1016,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt(
const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow );
if( pCellFrame )
{
- sal_Int32 nBottom = pCellFrame->getSwFrame().Bottom();
- nBottom -= GetFrame()->getSwFrame().Top();
+ sal_Int32 nBottom = pCellFrame->geFrameArea().Bottom();
+ nBottom -= GetFrame()->geFrameArea().Top();
Int32Set_Impl::const_iterator aEndRow(
GetTableData().GetRows().upper_bound( nBottom ) );
nExtend =
@@ -1046,8 +1046,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnExtentAt(
const SwFrame *pCellFrame = GetTableData().GetCellAtPos( *aSttCol, *aSttRow );
if( pCellFrame )
{
- sal_Int32 nRight = pCellFrame->getSwFrame().Right();
- nRight -= GetFrame()->getSwFrame().Left();
+ sal_Int32 nRight = pCellFrame->geFrameArea().Right();
+ nRight -= GetFrame()->geFrameArea().Left();
Int32Set_Impl::const_iterator aEndCol(
GetTableData().GetColumns().upper_bound( nRight ) );
nExtend =
@@ -1271,8 +1271,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex )
SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
if ( aCell.GetSwFrame() )
{
- sal_Int32 nTop = aCell.GetSwFrame()->getSwFrame().Top();
- nTop -= GetFrame()->getSwFrame().Top();
+ sal_Int32 nTop = aCell.GetSwFrame()->geFrameArea().Top();
+ nTop -= GetFrame()->geFrameArea().Top();
Int32Set_Impl::const_iterator aRow(
GetTableData().GetRows().lower_bound( nTop ) );
nRet = static_cast< sal_Int32 >( std::distance(
@@ -1308,8 +1308,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn(
SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
if ( aCell.GetSwFrame() )
{
- sal_Int32 nLeft = aCell.GetSwFrame()->getSwFrame().Left();
- nLeft -= GetFrame()->getSwFrame().Left();
+ sal_Int32 nLeft = aCell.GetSwFrame()->geFrameArea().Left();
+ nLeft -= GetFrame()->geFrameArea().Left();
Int32Set_Impl::const_iterator aCol(
GetTableData().GetColumns().lower_bound( nLeft ) );
nRet = static_cast< sal_Int32 >( std::distance(
@@ -1359,7 +1359,7 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
FireTableChangeEvent(*mpTableData);
}
if( HasTableData() )
- GetTableData().SetTablePos( GetFrame()->getSwFrame().Pos() );
+ GetTableData().SetTablePos( GetFrame()->geFrameArea().Pos() );
SwAccessibleContext::InvalidatePosOrSize( rOldBox );
}
@@ -1405,7 +1405,7 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil
if( HasTableData() )
{
SAL_WARN_IF( HasTableData() &&
- GetFrame()->getSwFrame().Pos() != GetTableData().GetTablePos(),
+ GetFrame()->geFrameArea().Pos() != GetTableData().GetTablePos(),
"sw.a11y", "table has invalid position" );
if( HasTableData() )
{
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index d8619067377a..0a5450771cb6 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -230,7 +230,7 @@ long SwCallLink::getLayoutFrame( const SwRootFrame* pRoot, SwTextNode const & rN
nCntPos >= pNext->GetOfst() )
pFrame = pNext;
- return pFrame->getSwFrame().Left();
+ return pFrame->geFrameArea().Left();
}
return 0;
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 27e6bbecf45a..32cf5a140a52 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -770,7 +770,7 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock )
{
if( pFrame )
{
- if( pFrame->getSwFrame().IsInside( rAktCursorPt ))
+ if( pFrame->geFrameArea().IsInside( rAktCursorPt ))
return bRet;
}
else if( aPos.nNode.GetNode().IsContentNode() )
@@ -789,7 +789,7 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock )
{
// SSelection over not allowed sections or if in header/footer -> different
if( !CheckNodesRange( aPos.nNode, pCursor->GetMark()->nNode, true )
- || ( pFrame && !pFrame->getSwFrame().IsInside( pCursor->GetMkPos() ) ))
+ || ( pFrame && !pFrame->geFrameArea().IsInside( pCursor->GetMkPos() ) ))
return bRet;
// is at same position but not in header/footer
@@ -1117,7 +1117,7 @@ sal_uInt16 SwCursorShell::GetNextPrevPageNum( bool bNext )
const SwPageFrame *pPg = Imp()->GetFirstVisPage(GetOut());
if( pPg )
{
- const SwTwips nPageTop = pPg->getSwFrame().Top();
+ const SwTwips nPageTop = pPg->geFrameArea().Top();
if( bNext )
{
@@ -1126,7 +1126,7 @@ sal_uInt16 SwCursorShell::GetNextPrevPageNum( bool bNext )
{
pPg = static_cast<const SwPageFrame *>(pPg->GetNext());
}
- while( pPg && pPg->getSwFrame().Top() == nPageTop );
+ while( pPg && pPg->geFrameArea().Top() == nPageTop );
while( pPg && pPg->IsEmptyPage() )
pPg = static_cast<const SwPageFrame *>(pPg->GetNext());
@@ -1138,7 +1138,7 @@ sal_uInt16 SwCursorShell::GetNextPrevPageNum( bool bNext )
{
pPg = static_cast<const SwPageFrame *>(pPg->GetPrev());
}
- while( pPg && pPg->getSwFrame().Top() == nPageTop );
+ while( pPg && pPg->geFrameArea().Top() == nPageTop );
while( pPg && pPg->IsEmptyPage() )
pPg = static_cast<const SwPageFrame *>(pPg->GetPrev());
@@ -1162,13 +1162,13 @@ OUString SwCursorShell::getPageRectangles()
OUStringBuffer aBuf;
for (const SwFrame* pFrame = pLayout->GetLower(); pFrame; pFrame = pFrame->GetNext())
{
- aBuf.append(pFrame->getSwFrame().Left());
+ aBuf.append(pFrame->geFrameArea().Left());
aBuf.append(", ");
- aBuf.append(pFrame->getSwFrame().Top());
+ aBuf.append(pFrame->geFrameArea().Top());
aBuf.append(", ");
- aBuf.append(pFrame->getSwFrame().Width());
+ aBuf.append(pFrame->geFrameArea().Width());
aBuf.append(", ");
- aBuf.append(pFrame->getSwFrame().Height());
+ aBuf.append(pFrame->geFrameArea().Height());
aBuf.append("; ");
}
if (!aBuf.isEmpty())
@@ -1561,8 +1561,8 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
SwFrame* pBoxFrame = pTableFrame;
while( pBoxFrame && !pBoxFrame->IsCellFrame() )
pBoxFrame = pBoxFrame->GetUpper();
- if( pBoxFrame && pBoxFrame->getSwFrame().HasArea() )
- MakeVisible( pBoxFrame->getSwFrame() );
+ if( pBoxFrame && pBoxFrame->geFrameArea().HasArea() )
+ MakeVisible( pBoxFrame->geFrameArea() );
else
MakeVisible( m_aCharRect );
}
@@ -1807,8 +1807,8 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
DisableCallbackAction a(*GetLayout());
pFrame->Calc(GetOut());
m_nUpDownX = pFrame->IsVertical() ?
- m_aCharRect.Top() - pFrame->getSwFrame().Top() :
- m_aCharRect.Left() - pFrame->getSwFrame().Left();
+ m_aCharRect.Top() - pFrame->geFrameArea().Top() :
+ m_aCharRect.Left() - pFrame->geFrameArea().Left();
}
// scroll Cursor to visible area
@@ -1893,9 +1893,9 @@ void SwCursorShell::RefreshBlockCursor()
if( pFrame )
{
if( pFrame->IsVertical() )
- aPt.setY(pFrame->getSwFrame().Top() + GetUpDownX());
+ aPt.setY(pFrame->geFrameArea().Top() + GetUpDownX());
else
- aPt.setX(pFrame->getSwFrame().Left() + GetUpDownX());
+ aPt.setX(pFrame->geFrameArea().Left() + GetUpDownX());
}
aMk = rBlock.GetMkPos();
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 01c3ac4c42e1..d0049e8ee952 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -90,12 +90,12 @@ void SwCursorShell::MoveCursorToNum()
if( pFrame->IsVertical() )
{
aPt.setX(m_aCharRect.Center().getX());
- aPt.setY(pFrame->getSwFrame().Top() + GetUpDownX());
+ aPt.setY(pFrame->geFrameArea().Top() + GetUpDownX());
}
else
{
aPt.setY(m_aCharRect.Center().getY());
- aPt.setX(pFrame->getSwFrame().Left() + GetUpDownX());
+ aPt.setX(pFrame->geFrameArea().Left() + GetUpDownX());
}
pFrame->GetCursorOfst( m_pCurrentCursor->GetPoint(), aPt );
if ( !m_pCurrentCursor->IsSelOvr( SwCursorSelOverFlags::Toggle |
@@ -142,7 +142,7 @@ bool SwCursorShell::GotoHeaderText()
SwCursor *pTmpCursor = getShellCursor( true );
SwCursorSaveState aSaveState( *pTmpCursor );
pFrame->Calc(GetOut());
- Point aPt( pFrame->getSwFrame().Pos() + pFrame->getSwPrint().Pos() );
+ Point aPt( pFrame->geFrameArea().Pos() + pFrame->getFramePrintArea().Pos() );
pFrame->GetCursorOfst( pTmpCursor->GetPoint(), aPt );
if( !pTmpCursor->IsSelOvr() )
UpdateCursor();
@@ -174,7 +174,7 @@ bool SwCursorShell::GotoFooterText()
SwCallLink aLk( *this ); // watch Cursor-Moves
SwCursorSaveState aSaveState( *pTmpCursor );
pLower->Calc(GetOut());
- Point aPt( pLower->getSwFrame().Pos() + pLower->getSwPrint().Pos() );
+ Point aPt( pLower->geFrameArea().Pos() + pLower->getFramePrintArea().Pos() );
pLower->GetCursorOfst( pTmpCursor->GetPoint(), aPt );
if( !pTmpCursor->IsSelOvr() )
UpdateCursor();
@@ -1443,8 +1443,8 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
pFrame->GetCharRect(aEnd, aEndPos, &aTmpState);
if (aStart.Top() != aEnd.Top() || aStart.Bottom() != aEnd.Bottom())
{
- aStart.Left(pFrame->getSwFrame().Left());
- aEnd.Right(pFrame->getSwFrame().Right());
+ aStart.Left(pFrame->geFrameArea().Left());
+ aEnd.Right(pFrame->geFrameArea().Right());
}
*pFieldRect = aStart.Union(aEnd);
}
@@ -1471,8 +1471,8 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
pFrame->GetCharRect(aEnd, *pRedl->End(), &aTmpState);
if (aStart.Top() != aEnd.Top() || aStart.Bottom() != aEnd.Bottom())
{
- aStart.Left(pFrame->getSwFrame().Left());
- aEnd.Right(pFrame->getSwFrame().Right());
+ aStart.Left(pFrame->geFrameArea().Left());
+ aEnd.Right(pFrame->geFrameArea().Right());
}
*pFieldRect = aStart.Union(aEnd);
}
@@ -1516,7 +1516,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
if( aTmpState.m_bPosCorr )
{
- if( pF && !pF->getSwFrame().IsInside( aPt ))
+ if( pF && !pF->geFrameArea().IsInside( aPt ))
pF = nullptr;
}
else if( !pF )
@@ -1551,8 +1551,8 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
{
if( pFieldRect )
{
- *pFieldRect = pF->getSwPrint();
- *pFieldRect += pF->getSwFrame().Pos();
+ *pFieldRect = pF->getFramePrintArea();
+ *pFieldRect += pF->geFrameArea().Pos();
}
rContentAtPos.pFndTextAttr = nullptr;
rContentAtPos.aFnd.pAttr = pItem;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index a3b08fcf80f1..e89a2ab36cf7 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -338,14 +338,15 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
{
const SwContentFrame* pFrame = static_cast<const SwContentNode*>(pNd)->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
if ( (SwCursorSelOverFlags::ChangePos & eFlags) //allowed to change position if it's a bad one
- && pFrame && pFrame->IsValid() && !pFrame->getSwFrame().Height() //a bad zero height position
+ && pFrame && pFrame->isFrameAreaDefinitionValid()
+ && !pFrame->geFrameArea().Height() //a bad zero height position
&& !InputFieldAtPos(GetPoint()) ) //unless it's a (vertical) input field
{
// skip to the next/prev valid paragraph with a layout
SwNodeIndex& rPtIdx = GetPoint()->nNode;
bool bGoNxt = m_pSavePos->nNode < rPtIdx.GetIndex();
while( nullptr != ( pFrame = ( bGoNxt ? pFrame->GetNextContentFrame() : pFrame->GetPrevContentFrame() ))
- && 0 == pFrame->getSwFrame().Height() )
+ && 0 == pFrame->geFrameArea().Height() )
;
// #i72394# skip to prev/next valid paragraph with a layout in case
@@ -354,7 +355,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
{
bGoNxt = !bGoNxt;
pFrame = static_cast<const SwContentNode*>(pNd)->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
- while ( pFrame && 0 == pFrame->getSwFrame().Height() )
+ while ( pFrame && 0 == pFrame->geFrameArea().Height() )
{
pFrame = bGoNxt ? pFrame->GetNextContentFrame()
: pFrame->GetPrevContentFrame();
@@ -1800,8 +1801,8 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
aPt = aTmpRect.Pos();
nUpDownX = pFrame->IsVertical() ?
- aPt.getY() - pFrame->getSwFrame().Top() :
- aPt.getX() - pFrame->getSwFrame().Left();
+ aPt.getY() - pFrame->geFrameArea().Top() :
+ aPt.getX() - pFrame->geFrameArea().Left();
}
// It is allowed to move footnotes in other footnotes but not sections
@@ -1853,13 +1854,13 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
{
aPt.setX(aTmpRect.Center().getX());
pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut());
- aPt.setY(pFrame->getSwFrame().Top() + nUpDownX);
+ aPt.setY(pFrame->geFrameArea().Top() + nUpDownX);
}
else
{
aPt.setY(aTmpRect.Center().getY());
pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut());
- aPt.setX(pFrame->getSwFrame().Left() + nUpDownX);
+ aPt.setX(pFrame->geFrameArea().Left() + nUpDownX);
}
pFrame->GetCursorOfst( GetPoint(), aPt, &eTmpState );
}
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index 9f5bfd1d1def..ca236a737ba9 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -81,11 +81,11 @@ bool SwCursorShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
pCnt->Calc(GetOut());
- Point aPt( pCnt->getSwFrame().Pos() + pCnt->getSwPrint().Pos() );
+ Point aPt( pCnt->geFrameArea().Pos() + pCnt->getFramePrintArea().Pos() );
if( fnPosCol == GetColumnEnd )
{
- aPt.setX(aPt.getX() + pCnt->getSwPrint().Width());
- aPt.setY(aPt.getY() + pCnt->getSwPrint().Height());
+ aPt.setX(aPt.getX() + pCnt->getFramePrintArea().Width());
+ aPt.setY(aPt.getY() + pCnt->getFramePrintArea().Height());
}
pCnt->GetCursorOfst( m_pCurrentCursor->GetPoint(), aPt );
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 828ed251f069..b6bf4f7dcde2 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -317,13 +317,13 @@ bool SwCursorShell::GotoFlyAnchor()
// jump in BodyFrame closest to FlyFrame
SwRect aTmpRect( m_aCharRect );
- if( !pFrame->getSwFrame().IsInside( aTmpRect ))
- aTmpRect = pFrame->getSwFrame();
+ if( !pFrame->geFrameArea().IsInside( aTmpRect ))
+ aTmpRect = pFrame->geFrameArea();
Point aPt( aTmpRect.Left(), aTmpRect.Top() +
( aTmpRect.Bottom() - aTmpRect.Top() ) / 2 );
- aPt.setX(aPt.getX() > (pFrame->getSwFrame().Left() + (pFrame->getSwFrame().SSize().Width() / 2 ))
- ? pFrame->getSwFrame().Right()
- : pFrame->getSwFrame().Left());
+ aPt.setX(aPt.getX() > (pFrame->geFrameArea().Left() + (pFrame->geFrameArea().SSize().Width() / 2 ))
+ ? pFrame->geFrameArea().Right()
+ : pFrame->geFrameArea().Left());
const SwPageFrame* pPageFrame = pFrame->FindPageFrame();
const SwContentFrame* pFndFrame = pPageFrame->GetContentPos( aPt, false, true );
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 941588c2982b..a850ebb381db 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -242,8 +242,8 @@ bool SwCursorShell::SelTableRowOrCol( bool bRow, bool bRowSimple )
// with the repeated headlines check in UpdateCursor():
if ( !bRow )
m_pTableCursor->GetPtPos() = pMasterTabFrame->IsVertical()
- ? pMasterTabFrame->getSwFrame().TopRight()
- : pMasterTabFrame->getSwFrame().TopLeft();
+ ? pMasterTabFrame->geFrameArea().TopRight()
+ : pMasterTabFrame->geFrameArea().TopLeft();
UpdateCursor();
return true;
@@ -275,7 +275,7 @@ bool SwCursorShell::SelTable()
m_pTableCursor->SetMark();
// set MkPos 'close' to the master table, otherwise we might get problems
// with the repeated headlines check in UpdateCursor():
- m_pTableCursor->GetMkPos() = pMasterTabFrame->IsVertical() ? pMasterTabFrame->getSwFrame().TopRight() : pMasterTabFrame->getSwFrame().TopLeft();
+ m_pTableCursor->GetMkPos() = pMasterTabFrame->IsVertical() ? pMasterTabFrame->geFrameArea().TopRight() : pMasterTabFrame->geFrameArea().TopLeft();
m_pTableCursor->GetPoint()->nNode = *pTableNd->EndOfSectionNode();
m_pTableCursor->Move( fnMoveBackward, GoInContent );
UpdateCursor();
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 52cd65acfd5d..9faced071b79 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -779,7 +779,7 @@ void SwShellTableCursor::FillRects()
bool bStart = true;
SwRegionRects aReg( GetShell()->VisArea() );
if (comphelper::LibreOfficeKit::isActive())
- aReg = GetShell()->getIDocumentLayoutAccess().GetCurrentLayout()->getSwFrame();
+ aReg = GetShell()->getIDocumentLayoutAccess().GetCurrentLayout()->geFrameArea();
SwNodes& rNds = GetDoc()->GetNodes();
SwFrame* pEndFrame = nullptr;
for (size_t n = 0; n < m_SelectedBoxes.size(); ++n)
@@ -812,13 +812,13 @@ void SwShellTableCursor::FillRects()
while ( pFrame )
{
- if( aReg.GetOrigin().IsOver( pFrame->getSwFrame() ) )
+ if( aReg.GetOrigin().IsOver( pFrame->geFrameArea() ) )
{
- aReg -= pFrame->getSwFrame();
+ aReg -= pFrame->geFrameArea();
if (bStart)
{
bStart = false;
- m_aStart = SwRect(pFrame->getSwFrame().Left(), pFrame->getSwFrame().Top(), 1, pFrame->getSwFrame().Height());
+ m_aStart = SwRect(pFrame->geFrameArea().Left(), pFrame->geFrameArea().Top(), 1, pFrame->geFrameArea().Height());
}
}
@@ -827,7 +827,7 @@ void SwShellTableCursor::FillRects()
}
}
if (pEndFrame)
- m_aEnd = SwRect(pEndFrame->getSwFrame().Right(), pEndFrame->getSwFrame().Top(), 1, pEndFrame->getSwFrame().Height());
+ m_aEnd = SwRect(pEndFrame->geFrameArea().Right(), pEndFrame->geFrameArea().Top(), 1, pEndFrame->geFrameArea().Height());
aReg.Invert();
insert( begin(), aReg.begin(), aReg.end() );
}
@@ -857,7 +857,7 @@ bool SwShellTableCursor::IsInside( const Point& rPt ) const
while( pFrame && !pFrame->IsCellFrame() )
pFrame = pFrame->GetUpper();
OSL_ENSURE( pFrame, "Node not in a table" );
- if( pFrame && pFrame->getSwFrame().IsInside( rPt ) )
+ if( pFrame && pFrame->geFrameArea().IsInside( rPt ) )
return true;
}
return false;
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index 7e54c5ac41ea..5832b8d5745f 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -145,7 +145,7 @@ void DocumentDrawModelManager::InitDrawModel()
// mpDrawModel->InsertPage( pDrawPage );
SdrPage* pDrawPage = pMasterPage;
pRoot->SetDrawPage( pDrawPage );
- pDrawPage->SetSize( pRoot->getSwFrame().SSize() );
+ pDrawPage->SetSize( pRoot->geFrameArea().SSize() );
}
}
}
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 78b5aadf2c6d..5e58d56468aa 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -668,7 +668,7 @@ void SwDoc::CalculatePagesForPrinting(
const bool bPrintThisPage =
( (bPrintRightPages && pStPage->OnRightPage()) ||
(bPrintLeftPages && !pStPage->OnRightPage()) ) &&
- ( bPrintEmptyPages || pStPage->getSwFrame().Height() );
+ ( bPrintEmptyPages || pStPage->geFrameArea().Height() );
if (bPrintThisPage)
{
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 064df47eae6f..37fd273afa43 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -223,7 +223,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
{
const SwFrame* pOld = static_cast<const SwFlyFrameFormat*>(pFlyFormat)->GetFrame( &aRet );
if( pOld )
- aRet = pOld->getSwFrame().Pos();
+ aRet = pOld->geFrameArea().Pos();
}
break;
@@ -235,7 +235,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
const SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode();
const SwFrame* pOld = pNd ? pNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &aRet, nullptr, false ) : nullptr;
if( pOld )
- aRet = pOld->getSwFrame().Pos();
+ aRet = pOld->geFrameArea().Pos();
}
break;
@@ -246,7 +246,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
nNode.GetNode().GetFlyFormat());
const SwFrame* pOld = pFormat ? pFormat->GetFrame( &aRet ) : nullptr;
if( pOld )
- aRet = pOld->getSwFrame().Pos();
+ aRet = pOld->geFrameArea().Pos();
}
break;
@@ -258,7 +258,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
pPage =static_cast<const SwPageFrame*>(pPage->GetNext()) )
if( i == nPgNum )
{
- aRet = pPage->getSwFrame().Pos();
+ aRet = pPage->geFrameArea().Pos();
break;
}
}
@@ -840,7 +840,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
case RndStdIds::FLY_AT_PAGE:
{
pNewAnchorFrame = getIDocumentLayoutAccess().GetCurrentLayout()->Lower();
- while ( pNewAnchorFrame && !pNewAnchorFrame->getSwFrame().IsInside( aPt ) )
+ while ( pNewAnchorFrame && !pNewAnchorFrame->geFrameArea().IsInside( aPt ) )
pNewAnchorFrame = pNewAnchorFrame->GetNext();
if ( !pNewAnchorFrame )
continue;
@@ -873,7 +873,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
aPoint.setX(aPoint.getX() - 1); // Do not load in the DrawObj!
aNewAnch.SetType( RndStdIds::FLY_AS_CHAR );
SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode() );
- if ( pNewAnchorFrame->getSwFrame().IsInside( aPoint ) )
+ if ( pNewAnchorFrame->geFrameArea().IsInside( aPoint ) )
{
// We need to find a TextNode, because only there we can anchor a
// content-bound DrawObject.
@@ -884,7 +884,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
{
SwContentNode &rCNd = const_cast<SwContentNode&>(
*static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode());
- if ( pNewAnchorFrame->getSwFrame().Bottom() < aPt.Y() )
+ if ( pNewAnchorFrame->geFrameArea().Bottom() < aPt.Y() )
rCNd.MakeStartIndex( &aPos.nContent );
else
rCNd.MakeEndIndex( &aPos.nContent );
@@ -1096,7 +1096,7 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest )
{
SwFlyFrame *pFly = SwIterator<SwFlyFrame,SwFormat>( rSource ).First();
if ( pFly )
- aSize.SetHeight( pFly->getSwFrame().Height() );
+ aSize.SetHeight( pFly->geFrameArea().Height() );
aSize.SetHeightSizeType( ATT_FIX_SIZE );
aSet.Put( aSize );
}
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 053446edff4c..05e51f8bc8b3 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -340,7 +340,7 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
{
const SwFrame *pPageFrame = pRootFrame->GetLower();
if( pPageFrame )
- return (sal_uInt16)pPageFrame->getSwPrint().Width();
+ return (sal_uInt16)pPageFrame->getFramePrintArea().Width();
}
// #i91658#
@@ -364,13 +364,13 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrame(
// For paragraph-bound frames we don't respect paragraph indents.
const SwFrame *pAnchor = static_cast<const SwFlyFrame *>(pUpper)->GetAnchorFrame();
if( pAnchor->IsTextFrame() )
- nWidth = pAnchor->getSwFrame().Width();
+ nWidth = pAnchor->geFrameArea().Width();
else
- nWidth = pAnchor->getSwPrint().Width();
+ nWidth = pAnchor->getFramePrintArea().Width();
}
else
{
- nWidth = pUpper->getSwPrint().Width();
+ nWidth = pUpper->getFramePrintArea().Width();
}
SwTwips nUpperDummy = 0;
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 18fa63ca2b99..4b6a4ac7b800 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -211,7 +211,7 @@ static void lcl_ClearArea( const SwFrame &rFrame,
void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
- if ( getSwFrame().IsEmpty() )
+ if ( geFrameArea().IsEmpty() )
return;
const SwViewShell* pSh = getRootFrame()->GetCurrShell();
@@ -227,7 +227,7 @@ void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec
GetRealURL( *static_cast<const SwGrfNode*>(pNd), aText );
if( aText.isEmpty() )
aText = FindFlyFrame()->GetFormat()->GetName();
- lcl_PaintReplacement( getSwFrame(), aText, *pSh, this, false );
+ lcl_PaintReplacement( geFrameArea(), aText, *pSh, this, false );
}
return;
}
@@ -263,10 +263,10 @@ void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec
SwRect aOrigPaint( rRect );
if ( HasAnimation() && pSh->GetWin() )
{
- aOrigPaint = getSwFrame(); aOrigPaint += getSwPrint().Pos();
+ aOrigPaint = geFrameArea(); aOrigPaint += getFramePrintArea().Pos();
}
- SwRect aGrfArea( getSwFrame() );
+ SwRect aGrfArea( geFrameArea() );
SwRect aPaintArea( aGrfArea );
// In case the picture fly frm was clipped, render it with the origin
@@ -286,13 +286,13 @@ void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec
}
if( bGetUnclippedFrame )
- aGrfArea = SwRect( getSwFrame().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) );
+ aGrfArea = SwRect( geFrameArea().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) );
}
}
aPaintArea.Intersection_( aOrigPaint );
- SwRect aNormal( getSwFrame().Pos() + getSwPrint().Pos(), getSwPrint().SSize() );
+ SwRect aNormal( geFrameArea().Pos() + getFramePrintArea().Pos(), getFramePrintArea().SSize() );
aNormal.Justify(); // Normalized rectangle for the comparisons
if( aPaintArea.IsOver( aNormal ) )
@@ -374,7 +374,7 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
Size aOrigSz( static_cast<const SwNoTextNode*>(GetNode())->GetTwipSize() );
if ( !aOrigSz.Width() )
{
- aOrigSz.Width() = getSwPrint().Width();
+ aOrigSz.Width() = getFramePrintArea().Width();
nLeftCrop = -rCrop.GetLeft();
nRightCrop = -rCrop.GetRight();
}
@@ -382,7 +382,7 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
{
nLeftCrop = std::max( aOrigSz.Width() -
(rCrop.GetRight() + rCrop.GetLeft()), long(1) );
- const double nScale = double(getSwPrint().Width()) / double(nLeftCrop);
+ const double nScale = double(getFramePrintArea().Width()) / double(nLeftCrop);
nLeftCrop = long(nScale * -rCrop.GetLeft() );
nRightCrop = long(nScale * -rCrop.GetRight() );
}
@@ -397,14 +397,14 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
if( !aOrigSz.Height() )
{
- aOrigSz.Height() = getSwPrint().Height();
+ aOrigSz.Height() = getFramePrintArea().Height();
nTopCrop = -rCrop.GetTop();
nBottomCrop= -rCrop.GetBottom();
}
else
{
nTopCrop = std::max( aOrigSz.Height() - (rCrop.GetTop() + rCrop.GetBottom()), long(1) );
- const double nScale = double(getSwPrint().Height()) / double(nTopCrop);
+ const double nScale = double(getFramePrintArea().Height()) / double(nTopCrop);
nTopCrop = long(nScale * -rCrop.GetTop() );
nBottomCrop= long(nScale * -rCrop.GetBottom() );
}
@@ -417,9 +417,9 @@ void SwNoTextFrame::GetGrfArea( SwRect &rRect, SwRect* pOrigRect ) const
nBottomCrop= nTmpCrop;
}
- Size aVisSz( getSwPrint().SSize() );
+ Size aVisSz( getFramePrintArea().SSize() );
Size aGrfSz( aVisSz );
- Point aVisPt( getSwFrame().Pos() + getSwPrint().Pos() );
+ Point aVisPt( geFrameArea().Pos() + getFramePrintArea().Pos() );
Point aGrfPt( aVisPt );
// Set the "visible" rectangle first
@@ -465,7 +465,7 @@ const Size& SwNoTextFrame::GetSize() const
const SwFrame *pFly = FindFlyFrame();
if( !pFly )
pFly = this;
- return pFly->getSwPrint().SSize();
+ return pFly->getFramePrintArea().SSize();
}
void SwNoTextFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
@@ -474,20 +474,21 @@ void SwNoTextFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
MakePos();
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
- aFrm.Width( GetUpper()->getSwPrint().Width() );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aFrm.Width( GetUpper()->getFramePrintArea().Width() );
}
MakePrtArea( rAttrs );
- if ( !mbValidSize )
- { mbValidSize = true;
+ if ( !isFrameAreaSizeValid() )
+ {
+ setFrameAreaSizeValid(true);
Format(getRootFrame()->GetCurrShell()->GetOut());
}
}
@@ -500,12 +501,12 @@ void SwNoTextFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBord
// Did the height change?
SwTwips nChgHght = IsVertical() ?
- (SwTwips)(aNewSize.Width() - getSwPrint().Width()) :
- (SwTwips)(aNewSize.Height() - getSwPrint().Height());
+ (SwTwips)(aNewSize.Width() - getFramePrintArea().Width()) :
+ (SwTwips)(aNewSize.Height() - getFramePrintArea().Height());
if( nChgHght > 0)
Grow( nChgHght );
else if( nChgHght < 0)
- Shrink( std::min(getSwPrint().Height(), -nChgHght) );
+ Shrink( std::min(getFramePrintArea().Height(), -nChgHght) );
}
bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos,
@@ -515,10 +516,10 @@ bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos,
return false;
Calc(getRootFrame()->GetCurrShell()->GetOut());
- SwRect aFrameRect( getSwFrame() );
+ SwRect aFrameRect( geFrameArea() );
rRect = aFrameRect;
- rRect.Pos( getSwFrame().Pos() + getSwPrint().Pos() );
- rRect.SSize( getSwPrint().SSize() );
+ rRect.Pos( geFrameArea().Pos() + getFramePrintArea().Pos() );
+ rRect.SSize( getFramePrintArea().SSize() );
rRect.Justify();
@@ -558,7 +559,7 @@ bool SwNoTextFrame::GetCursorOfst(SwPosition* pPos, Point& ,
if( pFly && pFly->GetFormat()->GetSurround().IsContour() )\
{\
ClrContourCache( pFly->GetVirtDrawObj() );\
- pFly->NotifyBackground( FindPageFrame(), getSwPrint(), PREP_FLY_ATTR_CHG );\
+ pFly->NotifyBackground( FindPageFrame(), getFramePrintArea(), PREP_FLY_ATTR_CHG );\
}\
}
@@ -594,7 +595,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
GraphicAttr aAttr;
if( pNd->GetGrfObj().IsCached( pVSh->GetOut(),
- getSwPrint().SSize(), &pNd->GetGraphicAttr( aAttr, this ) ))
+ getFramePrintArea().SSize(), &pNd->GetGraphicAttr( aAttr, this ) ))
{
for(SwViewShell& rShell : pVSh->GetRingContainer())
{
@@ -602,9 +603,9 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( rShell.GetWin() )
{
if( rShell.IsPreview() )
- ::RepaintPagePreview( &rShell, getSwFrame().SVRect() );
+ ::RepaintPagePreview( &rShell, geFrameArea().SVRect() );
else
- rShell.GetWin()->Invalidate( getSwFrame().SVRect() );
+ rShell.GetWin()->Invalidate( geFrameArea().SVRect() );
}
}
}
@@ -668,7 +669,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
CLEARCACHE
- SwRect aRect( getSwFrame() );
+ SwRect aRect( geFrameArea() );
SwViewShell *pVSh = pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
if( !pVSh )
@@ -1100,7 +1101,7 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr
{
const SwFlyFrame *pFly = FindFlyFrame();
assert( pFly != nullptr );
- static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->getSwPrint(), pFly->getSwFrame());
+ static_cast<SwFEShell*>(pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->getFramePrintArea(), pFly->geFrameArea());
}
}
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 7d6d9087c42d..d6cfc8106faa 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1060,7 +1060,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
const SwRowFrame* pRow = GetRowFrame( *pSelBox->GetUpper() );
OSL_ENSURE( pRow, "Where is the SwTableLine's Frame?" );
SwRectFnSet aRectFnSet(pRow);
- pRowHeights[ n ] = aRectFnSet.GetHeight(pRow->getSwFrame());
+ pRowHeights[ n ] = aRectFnSet.GetHeight(pRow->geFrameArea());
}
}
@@ -3549,9 +3549,9 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, TableChgWidthHeightType eType,
{
SwTabFrame* pTabFrame = SwIterator<SwTabFrame,SwFormat>( *GetFrameFormat() ).First();
if( pTabFrame &&
- pTabFrame->getSwPrint().Width() != rSz.GetWidth() )
+ pTabFrame->getFramePrintArea().Width() != rSz.GetWidth() )
{
- nFrameWidth = pTabFrame->getSwPrint().Width();
+ nFrameWidth = pTabFrame->getFramePrintArea().Width();
if( bBigger )
nFrameWidth += nAbsDiff;
else
@@ -3904,7 +3904,7 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
SwFrameFormat* pFormat = rLine.ClaimFrameFormat();
- SwTwips nMyNewH, nMyOldH = pLineFrame->getSwFrame().Height();
+ SwTwips nMyNewH, nMyOldH = pLineFrame->geFrameArea().Height();
if( !nOldHeight ) // the BaseLine and absolute
nMyNewH = nMyOldH + nNewHeight;
else
@@ -3967,7 +3967,7 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam
if( TableChgMode::FixedWidthChangeProp == rParam.nMode )
{
- nDist *= pLineFrame->getSwFrame().Height();
+ nDist *= pLineFrame->geFrameArea().Height();
nDist /= rParam.nMaxHeight;
}
bRet = nDist <= CalcRowRstHeight( pLineFrame );
@@ -3987,7 +3987,7 @@ static bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam
// via the max height.
if( (true) /*!rParam.bBigger*/ )
{
- nDist *= pLineFrame->getSwFrame().Height();
+ nDist *= pLineFrame->geFrameArea().Height();
nDist /= rParam.nMaxHeight;
}
else
@@ -4152,7 +4152,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, TableChgWidthHeightType eType,
{
if( bInsDel && !bBigger ) // By how much does it get higher?
{
- nAbsDiff = GetRowFrame( *pBaseLine )->getSwFrame().Height();
+ nAbsDiff = GetRowFrame( *pBaseLine )->geFrameArea().Height();
}
if( TableChgMode::VarWidthChangeAbs == m_eTableChgMode )
@@ -4220,7 +4220,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, TableChgWidthHeightType eType,
SwLayoutFrame* pLineFrame = GetRowFrame( *(*pLines)[ n ] );
OSL_ENSURE( pLineFrame, "Where is the Frame from the SwTableLine??" );
aParam.nMaxSpace += CalcRowRstHeight( pLineFrame );
- aParam.nMaxHeight += pLineFrame->getSwFrame().Height();
+ aParam.nMaxHeight += pLineFrame->geFrameArea().Height();
}
if( bBigger && aParam.nMaxSpace < nAbsDiff )
bRet = false;
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 5571ae35ae83..2b6175e29e25 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1043,8 +1043,8 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
aPosArr.push_back(
static_cast<sal_uInt16>(aFInfo.GetFrame()->IsVertical() ?
- aFInfo.GetFrame()->getSwPrint().Bottom() :
- aFInfo.GetFrame()->getSwPrint().Right()) );
+ aFInfo.GetFrame()->getFramePrintArea().Bottom() :
+ aFInfo.GetFrame()->getFramePrintArea().Right()) );
}
}
@@ -2511,14 +2511,14 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCellFrame* pBoxFrame )
// Set fixed points, LeftMin in Document coordinates, all others relative
SwRectFnSet aRectFnSet(pTab);
const SwPageFrame* pPage = pTab->FindPageFrame();
- const sal_uLong nLeftMin = aRectFnSet.GetLeft(pTab->getSwFrame()) -
- aRectFnSet.GetLeft(pPage->getSwFrame());
- const sal_uLong nRightMax = aRectFnSet.GetRight(pTab->getSwFrame()) -
- aRectFnSet.GetLeft(pPage->getSwFrame());
+ const sal_uLong nLeftMin = aRectFnSet.GetLeft(pTab->geFrameArea()) -
+ aRectFnSet.GetLeft(pPage->geFrameArea());
+ const sal_uLong nRightMax = aRectFnSet.GetRight(pTab->geFrameArea()) -
+ aRectFnSet.GetLeft(pPage->geFrameArea());
rFill.SetLeftMin ( nLeftMin );
- rFill.SetLeft ( aRectFnSet.GetLeft(pTab->getSwPrint()) );
- rFill.SetRight ( aRectFnSet.GetRight(pTab->getSwPrint()));
+ rFill.SetLeft ( aRectFnSet.GetLeft(pTab->getFramePrintArea()) );
+ rFill.SetRight ( aRectFnSet.GetRight(pTab->getFramePrintArea()));
rFill.SetRightMax( nRightMax - nLeftMin );
pTab->GetTable()->GetTabCols( rFill, pBox );
@@ -2590,10 +2590,10 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCellFrame* pBoxFrame )
SwRectFnSet aRectFnSet(pTab);
const SwPageFrame* pPage = pTab->FindPageFrame();
const long nLeftMin = ( aRectFnSet.IsVert() ?
- pTab->GetPrtLeft() - pPage->getSwFrame().Left() :
- pTab->GetPrtTop() - pPage->getSwFrame().Top() );
+ pTab->GetPrtLeft() - pPage->geFrameArea().Left() :
+ pTab->GetPrtTop() - pPage->geFrameArea().Top() );
const long nLeft = aRectFnSet.IsVert() ? LONG_MAX : 0;
- const long nRight = aRectFnSet.GetHeight(pTab->getSwPrint());
+ const long nRight = aRectFnSet.GetHeight(pTab->getFramePrintArea());
const long nRightMax = aRectFnSet.IsVert() ? nRight : LONG_MAX;
rFill.SetLeftMin( nLeftMin );
@@ -2615,8 +2615,8 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCellFrame* pBoxFrame )
if ( pFrame->IsCellFrame() && pFrame->FindTabFrame() == pTab )
{
// upper and lower borders of current cell frame:
- long nUpperBorder = aRectFnSet.GetTop(pFrame->getSwFrame());
- long nLowerBorder = aRectFnSet.GetBottom(pFrame->getSwFrame());
+ long nUpperBorder = aRectFnSet.GetTop(pFrame->geFrameArea());
+ long nLowerBorder = aRectFnSet.GetBottom(pFrame->geFrameArea());
// get boundaries for nUpperBorder:
aIter = aBoundaries.find( nUpperBorder );
@@ -2709,7 +2709,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
// #i17174# - With fix for #i9040# the shadow size is taken
// from the table width. Thus, add its left and right size to current table
// printing area width in order to get the correct table size attribute.
- SwTwips nPrtWidth = aRectFnSet.GetWidth(pTab->getSwPrint());
+ SwTwips nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
{
SvxShadowItem aShadow( rTab.GetFrameFormat()->GetShadow() );
nPrtWidth += aShadow.CalcShadowSpace( SvxShadowItemSide::LEFT ) +
@@ -2725,15 +2725,15 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
SwTabCols aOld( rNew.Count() );
const SwPageFrame* pPage = pTab->FindPageFrame();
- const sal_uLong nLeftMin = aRectFnSet.GetLeft(pTab->getSwFrame()) -
- aRectFnSet.GetLeft(pPage->getSwFrame());
- const sal_uLong nRightMax = aRectFnSet.GetRight(pTab->getSwFrame()) -
- aRectFnSet.GetLeft(pPage->getSwFrame());
+ const sal_uLong nLeftMin = aRectFnSet.GetLeft(pTab->geFrameArea()) -
+ aRectFnSet.GetLeft(pPage->geFrameArea());
+ const sal_uLong nRightMax = aRectFnSet.GetRight(pTab->geFrameArea()) -
+ aRectFnSet.GetLeft(pPage->geFrameArea());
// Set fixed points, LeftMin in Document coordinates, all others relative
aOld.SetLeftMin ( nLeftMin );
- aOld.SetLeft ( aRectFnSet.GetLeft(pTab->getSwPrint()) );
- aOld.SetRight ( aRectFnSet.GetRight(pTab->getSwPrint()));
+ aOld.SetLeft ( aRectFnSet.GetLeft(pTab->getFramePrintArea()) );
+ aOld.SetRight ( aRectFnSet.GetRight(pTab->getFramePrintArea()));
aOld.SetRightMax( nRightMax - nLeftMin );
rTab.GetTabCols( aOld, pBox );
@@ -2763,18 +2763,18 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
// Set fixed points, LeftMin in Document coordinates, all others relative
const SwPageFrame* pPage = pTab->FindPageFrame();
- aOld.SetRight( aRectFnSet.GetHeight(pTab->getSwPrint()) );
+ aOld.SetRight( aRectFnSet.GetHeight(pTab->getFramePrintArea()) );
long nLeftMin;
if ( aRectFnSet.IsVert() )
{
- nLeftMin = pTab->GetPrtLeft() - pPage->getSwFrame().Left();
+ nLeftMin = pTab->GetPrtLeft() - pPage->geFrameArea().Left();
aOld.SetLeft ( LONG_MAX );
aOld.SetRightMax( aOld.GetRight() );
}
else
{
- nLeftMin = pTab->GetPrtTop() - pPage->getSwFrame().Top();
+ nLeftMin = pTab->GetPrtTop() - pPage->geFrameArea().Top();
aOld.SetLeft ( 0 );
aOld.SetRightMax( LONG_MAX );
}
@@ -2819,7 +2819,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
{
if ( pFrame->IsCellFrame() && pFrame->FindTabFrame() == pTab )
{
- const long nLowerBorder = aRectFnSet.GetBottom(pFrame->getSwFrame());
+ const long nLowerBorder = aRectFnSet.GetBottom(pFrame->geFrameArea());
const sal_uLong nTabTop = aRectFnSet.GetPrtTop(*pTab);
if ( std::abs( aRectFnSet.YInc( nTabTop, nOldRowEnd ) - nLowerBorder ) <= ROWFUZZY )
{
@@ -2839,7 +2839,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
{
// The new row height must not to be calculated from a overlapping box
SwFormatFrameSize aNew( pLine->GetFrameFormat()->GetFrameSize() );
- const long nNewSize = aRectFnSet.GetHeight(pFrame->getSwFrame()) + nDiff;
+ const long nNewSize = aRectFnSet.GetHeight(pFrame->geFrameArea()) + nDiff;
if( nNewSize != aNew.GetHeight() )
{
aNew.SetHeight( nNewSize );
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 2fbfa06f7878..939bc9c0ecc1 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -441,7 +441,7 @@ bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly )
SwFrame* pFrame = aIter.First();
while ( pFrame )
{
- nHeight = std::max( nHeight, pFrame->getSwFrame().Height() );
+ nHeight = std::max( nHeight, pFrame->geFrameArea().Height() );
pFrame = aIter.Next();
}
}
@@ -536,7 +536,7 @@ static void lcl_CollectCells( std::vector<SwCellFrame*> &rArr, const SwRect &rUn
while ( !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
OSL_ENSURE( pCell, "Frame is not a Cell" );
- if ( rUnion.IsOver( pCell->getSwFrame() ) )
+ if ( rUnion.IsOver( pCell->geFrameArea() ) )
::InsertCell( rArr, static_cast<SwCellFrame*>(pCell) );
// Make sure the Cell is left (Areas)
@@ -643,17 +643,17 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
bool bTopOver, bLeftOver, bRightOver, bBottomOver;
if ( bVert )
{
- bTopOver = pCell->getSwFrame().Right() >= rUnion.Right();
- bLeftOver = pCell->getSwFrame().Top() <= rUnion.Top();
- bRightOver = pCell->getSwFrame().Bottom() >= rUnion.Bottom();
- bBottomOver = pCell->getSwFrame().Left() <= rUnion.Left();
+ bTopOver = pCell->geFrameArea().Right() >= rUnion.Right();
+ bLeftOver = pCell->geFrameArea().Top() <= rUnion.Top();
+ bRightOver = pCell->geFrameArea().Bottom() >= rUnion.Bottom();
+ bBottomOver = pCell->geFrameArea().Left() <= rUnion.Left();
}
else
{
- bTopOver = pCell->getSwFrame().Top() <= rUnion.Top();
- bLeftOver = pCell->getSwFrame().Left() <= rUnion.Left();
- bRightOver = pCell->getSwFrame().Right() >= rUnion.Right();
- bBottomOver = pCell->getSwFrame().Bottom() >= rUnion.Bottom();
+ bTopOver = pCell->geFrameArea().Top() <= rUnion.Top();
+ bLeftOver = pCell->geFrameArea().Left() <= rUnion.Left();
+ bRightOver = pCell->geFrameArea().Right() >= rUnion.Right();
+ bBottomOver = pCell->geFrameArea().Bottom() >= rUnion.Bottom();
}
if ( bRTL )
@@ -954,17 +954,17 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
bool bTopOver, bLeftOver, bRightOver, bBottomOver;
if ( bVert )
{
- bTopOver = pCell->getSwFrame().Right() >= rUnion.Right();
- bLeftOver = pCell->getSwFrame().Top() <= rUnion.Top();
- bRightOver = pCell->getSwFrame().Bottom() >= rUnion.Bottom();
- bBottomOver = pCell->getSwFrame().Left() <= rUnion.Left();
+ bTopOver = pCell->geFrameArea().Right() >= rUnion.Right();
+ bLeftOver = pCell->geFrameArea().Top() <= rUnion.Top();
+ bRightOver = pCell->geFrameArea().Bottom() >= rUnion.Bottom();
+ bBottomOver = pCell->geFrameArea().Left() <= rUnion.Left();
}
else
{
- bTopOver = pCell->getSwFrame().Top() <= rUnion.Top();
- bLeftOver = pCell->getSwFrame().Left() <= rUnion.Left();
- bRightOver = pCell->getSwFrame().Right() >= rUnion.Right();
- bBottomOver = pCell->getSwFrame().Bottom() >= rUnion.Bottom();
+ bTopOver = pCell->geFrameArea().Top() <= rUnion.Top();
+ bLeftOver = pCell->geFrameArea().Left() <= rUnion.Left();
+ bRightOver = pCell->geFrameArea().Right() >= rUnion.Right();
+ bBottomOver = pCell->geFrameArea().Bottom() >= rUnion.Bottom();
}
if ( bRTL )
@@ -1275,20 +1275,20 @@ static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrame *pCell )
SwRectFnSet aRectFnSet(pCell);
while ( pFrame )
{
- const SwTwips nAdd = aRectFnSet.GetWidth(pFrame->getSwFrame()) -
- aRectFnSet.GetWidth(pFrame->getSwPrint());
+ const SwTwips nAdd = aRectFnSet.GetWidth(pFrame->geFrameArea()) -
+ aRectFnSet.GetWidth(pFrame->getFramePrintArea());
// pFrame does not necessarily have to be a SwTextFrame!
const SwTwips nCalcFitToContent = pFrame->IsTextFrame() ?
const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->CalcFitToContent() :
- aRectFnSet.GetWidth(pFrame->getSwPrint());
+ aRectFnSet.GetWidth(pFrame->getFramePrintArea());
nRet = std::max( nRet, nCalcFitToContent + nAdd );
pFrame = pFrame->GetNext();
}
// Surrounding border as well as left and Right Border also need to be respected
- nRet += aRectFnSet.GetWidth(pCell->getSwFrame()) -
- aRectFnSet.GetWidth(pCell->getSwPrint());
+ nRet += aRectFnSet.GetWidth(pCell->geFrameArea()) -
+ aRectFnSet.GetWidth(pCell->getFramePrintArea());
// To compensate for the accuracy of calculation later on in SwTable::SetTabCols
// we keep adding up a little.
@@ -1315,7 +1315,7 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC
{
const sal_uInt16 nWish = bWishValues ?
::lcl_CalcCellFit( pCell ) :
- MINLAY + sal_uInt16(pCell->getSwFrame().Width() - pCell->getSwPrint().Width());
+ MINLAY + sal_uInt16(pCell->geFrameArea().Width() - pCell->getFramePrintArea().Width());
SwRectFnSet aRectFnSet(pTab);
@@ -1327,14 +1327,14 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC
nColRight += rCols.GetLeftMin();
// Adapt values to the proportions of the Table (Follows)
- if ( rCols.GetLeftMin() != aRectFnSet.GetLeft(pTab->getSwFrame()) )
+ if ( rCols.GetLeftMin() != aRectFnSet.GetLeft(pTab->geFrameArea()) )
{
- const long nDiff = aRectFnSet.GetLeft(pTab->getSwFrame()) - rCols.GetLeftMin();
+ const long nDiff = aRectFnSet.GetLeft(pTab->geFrameArea()) - rCols.GetLeftMin();
nColLeft += nDiff;
nColRight += nDiff;
}
- const long nCellLeft = aRectFnSet.GetLeft(pCell->getSwFrame());
- const long nCellRight = aRectFnSet.GetRight(pCell->getSwFrame());
+ const long nCellLeft = aRectFnSet.GetLeft(pCell->geFrameArea());
+ const long nCellRight = aRectFnSet.GetRight(pCell->geFrameArea());
// Calculate overlapping value
long nWidth = 0;
@@ -1344,9 +1344,9 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC
nWidth = nCellRight - nColLeft;
else if ( nColLeft >= nCellLeft && nColRight <= nCellRight )
nWidth = nColRight - nColLeft;
- if ( nWidth && pCell->getSwFrame().Width() )
+ if ( nWidth && pCell->geFrameArea().Width() )
{
- long nTmp = nWidth * nWish / pCell->getSwFrame().Width();
+ long nTmp = nWidth * nWish / pCell->geFrameArea().Width();
if ( sal_uInt16(nTmp) > rToFill[i] )
rToFill[i] = sal_uInt16(nTmp);
}
@@ -1394,8 +1394,8 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols
{
if ( pCell->IsCellFrame() && pCell->FindTabFrame() == pTab && ::IsFrameInTableSel( rUnion, pCell ) )
{
- const long nCLeft = aRectFnSet.GetLeft(pCell->getSwFrame());
- const long nCRight = aRectFnSet.GetRight(pCell->getSwFrame());
+ const long nCLeft = aRectFnSet.GetLeft(pCell->geFrameArea());
+ const long nCRight = aRectFnSet.GetRight(pCell->geFrameArea());
bool bNotInCols = true;
@@ -1418,9 +1418,9 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols
// Adapt values to the proportions of the Table (Follows)
long nLeftA = nColLeft;
long nRightA = nColRight;
- if ( rCols.GetLeftMin() != sal_uInt16(aRectFnSet.GetLeft(pTab->getSwFrame())) )
+ if ( rCols.GetLeftMin() != sal_uInt16(aRectFnSet.GetLeft(pTab->geFrameArea())) )
{
- const long nDiff = aRectFnSet.GetLeft(pTab->getSwFrame()) - rCols.GetLeftMin();
+ const long nDiff = aRectFnSet.GetLeft(pTab->geFrameArea()) - rCols.GetLeftMin();
nLeftA += nDiff;
nRightA += nDiff;
}
@@ -1436,8 +1436,8 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols
nFit = nWish;
}
else
- { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->getSwFrame().Width() -
- pCell->getSwPrint().Width());
+ { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->geFrameArea().Width() -
+ pCell->getFramePrintArea().Width());
if ( !nFit || nMin < nFit )
nFit = nMin;
}
@@ -1450,7 +1450,7 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols
}
do {
pCell = pCell->GetNextLayoutLeaf();
- } while( pCell && pCell->getSwFrame().Width() == 0 );
+ } while( pCell && pCell->geFrameArea().Width() == 0 );
} while ( pCell && pTab->IsAnLower( pCell ) );
}
}
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index c955dd321ac9..92a2519bfdd7 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -386,12 +386,16 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const
if ( pFrame->IsInTab() )
pFrame = pFrame->FindTabFrame();
- if( !pFrame->IsValid() )
+ if( !pFrame->isFrameAreaDefinitionValid() )
+ {
do
- { pFrame = pFrame->FindPrev();
- } while ( pFrame && !pFrame->IsValid() );
+ {
+ pFrame = pFrame->FindPrev();
+ }
+ while ( pFrame && !pFrame->isFrameAreaDefinitionValid() );
+ }
- if( !pFrame || pSh->VisArea().IsOver( pFrame->getSwFrame() ) )
+ if( !pFrame || pSh->VisArea().IsOver( pFrame->geFrameArea() ) )
bRet = true;
}
}
@@ -785,7 +789,7 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
* pMyFrame = pCNd ? pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr;
const SwPageFrame* pPgFrame = pFrame ? pFrame->FindPageFrame() : nullptr;
if( pPgFrame && pMyFrame &&
- pPgFrame->getSwFrame().Top() > pMyFrame->getSwFrame().Top() )
+ pPgFrame->geFrameArea().Top() > pMyFrame->geFrameArea().Top() )
{
// The one asking precedes the Page, thus its invalid
pRet = nullptr;
@@ -1122,7 +1126,7 @@ SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint )
SwContentFrame* pFrame = static_cast<SwContentFrame*>( ::GetFrameOfModify( nullptr, *this,
FRM_CNTNT, pPoint ) );
if( pFrame )
- aRet = bPrtArea ? pFrame->getSwPrint() : pFrame->getSwFrame();
+ aRet = bPrtArea ? pFrame->getFramePrintArea() : pFrame->geFrameArea();
return aRet;
}
@@ -1131,7 +1135,7 @@ SwRect SwContentNode::FindPageFrameRect() const
SwRect aRet;
SwFrame* pFrame = ::GetFrameOfModify( nullptr, *this, FRM_CNTNT );
if( pFrame && nullptr != ( pFrame = pFrame->FindPageFrame() ))
- aRet = pFrame->getSwFrame();
+ aRet = pFrame->geFrameArea();
return aRet;
}
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 2b2c486819b6..6efe0160ced3 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -318,7 +318,7 @@ basegfx::B2DRange SwVirtFlyDrawObj::getOuterBound() const
if(pFlyFrame)
{
- const tools::Rectangle aOuterRectangle(pFlyFrame->getSwFrame().Pos(), pFlyFrame->getSwFrame().SSize());
+ const tools::Rectangle aOuterRectangle(pFlyFrame->geFrameArea().Pos(), pFlyFrame->geFrameArea().SSize());
if(!aOuterRectangle.IsEmpty())
{
@@ -342,7 +342,7 @@ basegfx::B2DRange SwVirtFlyDrawObj::getInnerBound() const
if(pFlyFrame)
{
- const tools::Rectangle aInnerRectangle(pFlyFrame->getSwFrame().Pos() + pFlyFrame->getSwPrint().Pos(), pFlyFrame->getSwPrint().SSize());
+ const tools::Rectangle aInnerRectangle(pFlyFrame->geFrameArea().Pos() + pFlyFrame->getFramePrintArea().Pos(), pFlyFrame->getFramePrintArea().SSize());
if(!aInnerRectangle.IsEmpty())
{
@@ -525,7 +525,7 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject(
RestoreMapMode aRestoreMapModeIfNeeded( pShell );
// paint the FlyFrame (use standard VCL-Paint)
- m_pFlyFrame->Paint( *pShell->GetOut(), GetFlyFrame()->getSwFrame() );
+ m_pFlyFrame->Paint( *pShell->GetOut(), GetFlyFrame()->geFrameArea() );
}
}
}
@@ -549,8 +549,8 @@ void SwVirtFlyDrawObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const
void SwVirtFlyDrawObj::SetRect() const
{
- if ( GetFlyFrame()->getSwFrame().HasArea() )
- const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = GetFlyFrame()->getSwFrame().SVRect();
+ if ( GetFlyFrame()->geFrameArea().HasArea() )
+ const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = GetFlyFrame()->geFrameArea().SVRect();
else
const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = tools::Rectangle();
}
@@ -620,7 +620,7 @@ void SwVirtFlyDrawObj::NbcSetLogicRect(const tools::Rectangle& )
::basegfx::B2DPolyPolygon SwVirtFlyDrawObj::TakeXorPoly() const
{
- const tools::Rectangle aSourceRectangle(GetFlyFrame()->getSwFrame().SVRect());
+ const tools::Rectangle aSourceRectangle(GetFlyFrame()->geFrameArea().SVRect());
const ::basegfx::B2DRange aSourceRange(aSourceRectangle.Left(), aSourceRectangle.Top(), aSourceRectangle.Right(), aSourceRectangle.Bottom());
::basegfx::B2DPolyPolygon aRetval;
@@ -634,7 +634,7 @@ void SwVirtFlyDrawObj::NbcSetLogicRect(const tools::Rectangle& )
void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
{
MoveRect( aOutRect, rSiz );
- const Point aOldPos( GetFlyFrame()->getSwFrame().Pos() );
+ const Point aOldPos( GetFlyFrame()->geFrameArea().Pos() );
const Point aNewPos( aOutRect.TopLeft() );
const SwRect aFlyRect( aOutRect );
@@ -689,7 +689,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
if( GetFlyFrame()->GetAnchorFrame()->IsRightToLeft() &&
text::HoriOrientation::NONE != eHori )
- lXDiff = GetFlyFrame()->GetAnchorFrame()->getSwFrame().Width() -
+ lXDiff = GetFlyFrame()->GetAnchorFrame()->geFrameArea().Width() -
aFlyRect.Width() - lXDiff;
const Point aTmp( lXDiff, lYDiff );
@@ -722,9 +722,9 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
bNextLine = true;
//Horizontal Align:
const bool bLeftFrame =
- aFlyRect.Left() < pAnch->getSwFrame().Left() + pAnch->getSwPrint().Left(),
+ aFlyRect.Left() < pAnch->geFrameArea().Left() + pAnch->getFramePrintArea().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
- pAnch->getSwFrame().Left() + pAnch->getSwPrint().Width()/2;
+ pAnch->geFrameArea().Left() + pAnch->getFramePrintArea().Width()/2;
if ( bLeftFrame || bLeftPrt )
{
aHori.SetHoriOrient( text::HoriOrientation::LEFT );
@@ -733,7 +733,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
else
{
const bool bRightFrame = aFlyRect.Left() >
- pAnch->getSwFrame().Left() + pAnch->getSwPrint().Width();
+ pAnch->geFrameArea().Left() + pAnch->getFramePrintArea().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
}
@@ -879,7 +879,7 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
Size aSz( aOutRect.Right() - aOutRect.Left() + 1,
aOutRect.Bottom()- aOutRect.Top() + 1 );
- if( aSz != GetFlyFrame()->getSwFrame().SSize() )
+ if( aSz != GetFlyFrame()->geFrameArea().SSize() )
{
//The width of the columns should not be too narrow
if ( GetFlyFrame()->Lower() && GetFlyFrame()->Lower()->IsColumnFrame() )
@@ -921,8 +921,8 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
}
else
{
- nRelWidth = pRel->getSwPrint().Width();
- nRelHeight = pRel->getSwPrint().Height();
+ nRelWidth = pRel->getFramePrintArea().Width();
+ nRelHeight = pRel->getFramePrintArea().Height();
}
if ( aFrameSz.GetWidthPercent() && aFrameSz.GetWidthPercent() != SwFormatFrameSize::SYNCED &&
aOldFrameSz.GetWidth() != aFrameSz.GetWidth() )
@@ -936,8 +936,8 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
//Position can also be changed!
const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ?
- GetFlyFrame()->getSwFrame().TopRight() :
- GetFlyFrame()->getSwFrame().Pos() );
+ GetFlyFrame()->geFrameArea().TopRight() :
+ GetFlyFrame()->geFrameArea().Pos() );
if ( aNewPos != aOldPos )
{
//May have been altered by the ChgSize!
@@ -1034,9 +1034,9 @@ SdrObject* SwVirtFlyDrawObj::getFullDragClone() const
void SwVirtFlyDrawObj::addCropHandles(SdrHdlList& rTarget) const
{
// RotGrfFlyFrame: Adapt to possible rotated Graphic contained in FlyFrame
- if(GetFlyFrame()->getSwFrame().HasArea())
+ if(GetFlyFrame()->geFrameArea().HasArea())
{
- // Use InnerBound, OuterBound (same as GetFlyFrame()->getSwFrame().SVRect())
+ // Use InnerBound, OuterBound (same as GetFlyFrame()->geFrameArea().SVRect())
// may have a distance to InnerBound which needs to be taken into account.
// The Graphic is mapped to InnerBound, as is the rotated Graphic.
const basegfx::B2DRange aTargetRange(getInnerBound());
@@ -1095,11 +1095,11 @@ SdrObject* SwVirtFlyDrawObj::CheckMacroHit( const SdrObjMacroHitRec& rRec ) cons
SwRect aRect;
if ( m_pFlyFrame->Lower() && m_pFlyFrame->Lower()->IsNoTextFrame() )
{
- aRect = m_pFlyFrame->getSwPrint();
- aRect += m_pFlyFrame->getSwFrame().Pos();
+ aRect = m_pFlyFrame->getFramePrintArea();
+ aRect += m_pFlyFrame->geFrameArea().Pos();
}
else
- aRect = m_pFlyFrame->getSwFrame();
+ aRect = m_pFlyFrame->geFrameArea();
if( aRect.IsInside( rRec.aPos ) )
{
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index eb665d39040c..636aff025134 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -116,10 +116,10 @@ SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, size_t nObjNum )
void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrame *pPg )
{
- SwRect aPrt( pPg->getSwPrint() );
- aPrt += pPg->getSwFrame().Pos();
+ SwRect aPrt( pPg->getFramePrintArea() );
+ aPrt += pPg->geFrameArea().Pos();
const tools::Rectangle aUser( aPrt.SVRect() );
- const tools::Rectangle aPaper( pPg->getSwFrame().SVRect() );
+ const tools::Rectangle aPaper( pPg->geFrameArea().SVRect() );
pLst->Insert( SdrPageGridFrame( aPaper, aUser ) );
}
@@ -148,7 +148,7 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList(
const SwRect aRect( *pRect );
const SwFrame *pPg = pSh->GetLayout()->Lower();
do
- { if ( pPg->getSwFrame().IsOver( aRect ) )
+ { if ( pPg->geFrameArea().IsOver( aRect ) )
::InsertGridFrame( const_cast<SwDPage*>(this)->pGridLst.get(), pPg );
pPg = pPg->GetNext();
} while ( pPg );
@@ -161,7 +161,7 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList(
do
{ ::InsertGridFrame( const_cast<SwDPage*>(this)->pGridLst.get(), pPg );
pPg = pPg->GetNext();
- } while ( pPg && pPg->getSwFrame().IsOver( pSh->VisArea() ) );
+ } while ( pPg && pPg->geFrameArea().IsOver( pSh->VisArea() ) );
}
}
return pGridLst.get();
@@ -210,7 +210,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView,
{
// then append the relative pixel position!!
Point aPt( aPos );
- aPt -= pFly->getSwFrame().Pos();
+ aPt -= pFly->geFrameArea().Pos();
// without MapMode-Offset !!!!!
// without MapMode-Offset, without Offset, w ... !!!!!
aPt = pWindow->LogicToPixel(
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 1ef5184aa27e..84a6909496b4 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -680,7 +680,7 @@ const SwFrame* SwDrawView::CalcAnchor()
if ( bFly )
{
pAnch = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetAnchorFrame();
- aMyRect = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->getSwFrame().SVRect();
+ aMyRect = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->geFrameArea().SVRect();
}
else
{
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 4e9b12be7d14..1b2ea2122940 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -248,16 +248,21 @@ SwTextFrame* SwAutoFormat::GetFrame( const SwTextNode& rTextNd ) const
// get the Frame
const SwContentFrame *pFrame = rTextNd.getLayoutFrame( m_pEditShell->GetLayout() );
OSL_ENSURE( pFrame, "For Autoformat a Layout is needed" );
- if( m_aFlags.bAFormatByInput && !pFrame->IsValid() )
+
+ if( m_aFlags.bAFormatByInput && !pFrame->isFrameAreaDefinitionValid() )
{
DisableCallbackAction a(const_cast<SwRootFrame&>(*pFrame->getRootFrame()));
- SwRect aTmpFrame( pFrame->getSwFrame() );
- SwRect aTmpPrt( pFrame->getSwPrint() );
+ SwRect aTmpFrame( pFrame->geFrameArea() );
+ SwRect aTmpPrt( pFrame->getFramePrintArea() );
pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut());
- if( pFrame->getSwFrame() != aTmpFrame || pFrame->getSwPrint() != aTmpPrt ||
+
+ if( pFrame->geFrameArea() != aTmpFrame || pFrame->getFramePrintArea() != aTmpPrt ||
( pFrame->IsTextFrame() && !const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->Paint().IsEmpty() ) )
+ {
pFrame->SetCompletePaint();
+ }
}
+
return const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->GetFormatted();
}
@@ -652,7 +657,7 @@ bool SwAutoFormat::DoTable()
{
eHori = text::HoriOrientation::NONE;
// then - as last - we need to add the current frame width into the array
- aPosArr.push_back( static_cast<sal_uInt16>(m_pCurTextFrame->getSwFrame().Width()) );
+ aPosArr.push_back( static_cast<sal_uInt16>(m_pCurTextFrame->geFrameArea().Width()) );
}
else
eHori = text::HoriOrientation::LEFT;
@@ -1374,7 +1379,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
bool bBreak = true;
// first, determine current indentation and frame width
- SwTwips nFrameWidth = m_pCurTextFrame->getSwPrint().Width();
+ SwTwips nFrameWidth = m_pCurTextFrame->getFramePrintArea().Width();
SwTwips nLeftTextPos;
{
sal_Int32 nPos(0);
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 494caa87c150..0c7dbefc80cb 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -503,8 +503,8 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const
if ( pFrame )
{
const sal_uInt16 nFrameWidth = static_cast<sal_uInt16>( pFrame->IsVertical() ?
- pFrame->getSwFrame().Height() :
- pFrame->getSwFrame().Width() );
+ pFrame->geFrameArea().Height() :
+ pFrame->geFrameArea().Width() );
bRet = nFrameWidth > ( nNext + MM50 );
}
else
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 1ae8b8b29cc4..0aedac038c30 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -887,7 +887,7 @@ void SwEditShell::SetLineNumberInfo(const SwLineNumberInfo& rInfo)
StartAllAction();
SET_CURR_SHELL( this );
GetDoc()->SetLineNumberInfo(rInfo);
- AddPaintRect( GetLayout()->getSwFrame() );
+ AddPaintRect( GetLayout()->geFrameArea() );
EndAllAction();
}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 658bfb18e542..94e1185ad2dc 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -149,7 +149,7 @@ SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos,
OSL_ENSURE( pTextNode, "Where is the 1. TextNode?" );
rPos.nContent.Assign( pTextNode, 0 );
}
- else if ( !pCFrame->IsValid() )
+ else if ( !pCFrame->isFrameAreaDefinitionValid() )
{
pTextNode = const_cast<SwTextNode*>(static_cast<const SwTextNode*>(pCFrame->GetNode()));
rPos.nNode = *pTextNode;
@@ -206,7 +206,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
else
{
pLayout->FindPageFrame()->GetContentPosition(
- pLayout->getSwFrame().Pos(), rPos );
+ pLayout->geFrameArea().Pos(), rPos );
pTextNode = rPos.nNode.GetNode().GetTextNode();
}
}
@@ -246,7 +246,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
}
else
{
- Point aPt( pLayout->getSwFrame().Pos() );
+ Point aPt( pLayout->geFrameArea().Pos() );
aPt.Y()++; // get out of the header
pContentFrame = pPgFrame->GetContentPos( aPt, false, true );
pTextNode = GetFirstTextNode( rDoc, rPos, pContentFrame, aPt );
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 333cb740cf9a..e6db2a7db19a 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -74,8 +74,8 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
o_rInfo.mnStartNodeIdx = 0;
o_rInfo.mnStartContent = -1;
}
- o_rInfo.mPageFrame = pPage->getSwFrame();
- o_rInfo.mPagePrtArea = pPage->getSwPrint();
+ o_rInfo.mPageFrame = pPage->geFrameArea();
+ o_rInfo.mPagePrtArea = pPage->getFramePrintArea();
o_rInfo.mPagePrtArea.Pos() += o_rInfo.mPageFrame.Pos();
o_rInfo.mnPageNumber = pPage->GetPhyPageNum();
o_rInfo.meSidebarPosition = pPage->SidebarPosition();
@@ -105,7 +105,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
long SwPostItHelper::getLayoutHeight( const SwRootFrame* pRoot )
{
- long nRet = pRoot ? pRoot->getSwFrame().Height() : 0;
+ long nRet = pRoot ? pRoot->geFrameArea().Height() : 0;
return nRet;
}
@@ -126,7 +126,7 @@ unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrame, const SwRootFrame
if( pPage )
{
nRet = pPage->GetPhyPageNum();
- rPageFrame = pPage->getSwFrame();
+ rPageFrame = pPage->geFrameArea();
}
return nRet;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 182a7097fca4..e43f4e3206a5 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -146,22 +146,22 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos,
if( bVert )
{
if( bR2L )
- bRefIsLower = pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() ||
- ( pRefFrame->getSwFrame().Top() == pFieldFrame->getSwFrame().Top() &&
- pRefFrame->getSwFrame().Left() < pFieldFrame->getSwFrame().Left() );
+ bRefIsLower = pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() ||
+ ( pRefFrame->geFrameArea().Top() == pFieldFrame->geFrameArea().Top() &&
+ pRefFrame->geFrameArea().Left() < pFieldFrame->geFrameArea().Left() );
else
- bRefIsLower = pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() ||
- ( pRefFrame->getSwFrame().Top() == pFieldFrame->getSwFrame().Top() &&
- pRefFrame->getSwFrame().Left() > pFieldFrame->getSwFrame().Left() );
+ bRefIsLower = pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() ||
+ ( pRefFrame->geFrameArea().Top() == pFieldFrame->geFrameArea().Top() &&
+ pRefFrame->geFrameArea().Left() > pFieldFrame->geFrameArea().Left() );
}
else if( bR2L )
- bRefIsLower = pRefFrame->getSwFrame().Left() > pFieldFrame->getSwFrame().Left() ||
- ( pRefFrame->getSwFrame().Left() == pFieldFrame->getSwFrame().Left() &&
- pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() );
+ bRefIsLower = pRefFrame->geFrameArea().Left() > pFieldFrame->geFrameArea().Left() ||
+ ( pRefFrame->geFrameArea().Left() == pFieldFrame->geFrameArea().Left() &&
+ pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() );
else
- bRefIsLower = pRefFrame->getSwFrame().Left() < pFieldFrame->getSwFrame().Left() ||
- ( pRefFrame->getSwFrame().Left() == pFieldFrame->getSwFrame().Left() &&
- pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() );
+ bRefIsLower = pRefFrame->geFrameArea().Left() < pFieldFrame->geFrameArea().Left() ||
+ ( pRefFrame->geFrameArea().Left() == pFieldFrame->geFrameArea().Left() &&
+ pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() );
pRefFrame = nullptr;
}
else if( ( SwFrameType::Column | SwFrameType::Cell ) & pFieldFrame->GetType() )
@@ -175,22 +175,22 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos,
if( bVert )
{
if( bR2L )
- bRefIsLower = pRefFrame->getSwFrame().Left() < pFieldFrame->getSwFrame().Left() ||
- ( pRefFrame->getSwFrame().Left() == pFieldFrame->getSwFrame().Left() &&
- pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() );
+ bRefIsLower = pRefFrame->geFrameArea().Left() < pFieldFrame->geFrameArea().Left() ||
+ ( pRefFrame->geFrameArea().Left() == pFieldFrame->geFrameArea().Left() &&
+ pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() );
else
- bRefIsLower = pRefFrame->getSwFrame().Left() > pFieldFrame->getSwFrame().Left() ||
- ( pRefFrame->getSwFrame().Left() == pFieldFrame->getSwFrame().Left() &&
- pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() );
+ bRefIsLower = pRefFrame->geFrameArea().Left() > pFieldFrame->geFrameArea().Left() ||
+ ( pRefFrame->geFrameArea().Left() == pFieldFrame->geFrameArea().Left() &&
+ pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() );
}
else if( bR2L )
- bRefIsLower = pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() ||
- ( pRefFrame->getSwFrame().Top() == pFieldFrame->getSwFrame().Top() &&
- pRefFrame->getSwFrame().Left() > pFieldFrame->getSwFrame().Left() );
+ bRefIsLower = pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() ||
+ ( pRefFrame->geFrameArea().Top() == pFieldFrame->geFrameArea().Top() &&
+ pRefFrame->geFrameArea().Left() > pFieldFrame->geFrameArea().Left() );
else
- bRefIsLower = pRefFrame->getSwFrame().Top() < pFieldFrame->getSwFrame().Top() ||
- ( pRefFrame->getSwFrame().Top() == pFieldFrame->getSwFrame().Top() &&
- pRefFrame->getSwFrame().Left() < pFieldFrame->getSwFrame().Left() );
+ bRefIsLower = pRefFrame->geFrameArea().Top() < pFieldFrame->geFrameArea().Top() ||
+ ( pRefFrame->geFrameArea().Top() == pFieldFrame->geFrameArea().Top() &&
+ pRefFrame->geFrameArea().Left() < pFieldFrame->geFrameArea().Left() );
}
return bRefIsLower;
}
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index e2f3ffccd671..5ca52787b142 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -239,7 +239,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText )
static const Point &lcl_FindBasePos( const SwFrame *pFrame, const Point &rPt )
{
const SwFrame *pF = pFrame;
- while ( pF && !pF->getSwFrame().IsInside( rPt ) )
+ while ( pF && !pF->geFrameArea().IsInside( rPt ) )
{
if ( pF->IsContentFrame() )
pF = static_cast<const SwContentFrame*>(pF)->GetFollow();
@@ -247,9 +247,9 @@ static const Point &lcl_FindBasePos( const SwFrame *pFrame, const Point &rPt )
pF = nullptr;
}
if ( pF )
- return pF->getSwFrame().Pos();
+ return pF->geFrameArea().Pos();
else
- return pFrame->getSwFrame().Pos();
+ return pFrame->geFrameArea().Pos();
}
static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame const * pFly,
@@ -271,14 +271,14 @@ static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame
const SwNodeIndex& rIdx = *pTmpFly->GetFormat()->GetContent().GetContentIdx();
SwPosition aPos( rIdx );
rAnchor.SetAnchor( &aPos );
- rNewPos = pTmpFly->getSwFrame().Pos();
+ rNewPos = pTmpFly->geFrameArea().Pos();
}
else
{
rAnchor.SetType( RndStdIds::FLY_AT_PAGE );
rAnchor.SetPageNum( rDestShell.GetPageNumber( rInsPt ) );
const SwFrame *pPg = pTmpFrame->FindPageFrame();
- rNewPos = pPg->getSwFrame().Pos();
+ rNewPos = pPg->geFrameArea().Pos();
}
}
else
@@ -377,7 +377,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
const SwRootFrame* pTmpRoot = pDestShell->GetLayout();
const SwFrame* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true );
if ( pPg )
- aNewAnch = pPg->getSwFrame().Pos();
+ aNewAnch = pPg->geFrameArea().Pos();
}
if( bRet )
@@ -496,7 +496,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
// from the passed DocumentPosition
SwPosition aPos( *GetCursor()->GetPoint() );
Point aPt( rInsPt );
- aPt -= rSttPt - pFly->getSwFrame().Pos();
+ aPt -= rSttPt - pFly->geFrameArea().Pos();
SwCursorMoveState aState( MV_SETONLYTEXT );
GetLayout()->GetCursorOfst( &aPos, aPt, &aState );
const SwNode *pNd;
@@ -533,7 +533,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
const SwRootFrame* pTmpRoot = pDestShell->GetLayout();
const SwFrame* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true );
if ( pPg )
- aNewAnch = pPg->getSwFrame().Pos();
+ aNewAnch = pPg->geFrameArea().Pos();
}
else {
OSL_ENSURE( false, "what anchor is it?" );
@@ -548,7 +548,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
{
Point aPos( rInsPt );
aPos -= aNewAnch;
- aPos -= rSttPt - pFly->getSwFrame().Pos();
+ aPos -= rSttPt - pFly->geFrameArea().Pos();
pFlyFormat->SetFormatAttr( SwFormatHoriOrient( aPos.getX(),text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
pFlyFormat->SetFormatAttr( SwFormatVertOrient( aPos.getY(),text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
}
@@ -1244,7 +1244,7 @@ bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf )
// Not the original size, but the current one.
// Otherwise it could happen that for vector graphics
// many MB's of memory are allocated.
- const Size aSz( GetSelectedFlyFrame()->getSwPrint().SSize() );
+ const Size aSz( GetSelectedFlyFrame()->getFramePrintArea().SSize() );
ScopedVclPtrInstance< VirtualDevice > pVirtDev(*GetWin());
MapMode aTmp( MapUnit::MapTwip );
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index da44435f05ed..cd285af2c437 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -147,7 +147,7 @@ size_t SwFEShell::GetMousePageDesc( const Point &rPt ) const
static_cast<const SwPageFrame*>( GetLayout()->Lower() );
if( pPage )
{
- while( pPage->GetNext() && rPt.Y() > pPage->getSwFrame().Bottom() )
+ while( pPage->GetNext() && rPt.Y() > pPage->geFrameArea().Bottom() )
pPage = static_cast<const SwPageFrame*>( pPage->GetNext() );
SwDoc *pMyDoc = GetDoc();
size_t nPos;
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 139a1a2ba0dc..e75bd15806ed 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -142,7 +142,7 @@ static bool lcl_FindAnchorPos(
if( !pNewAnch->GetCursorOfst( &aPos, aTmpPnt, &aState ) )
{
SwContentNode* pCNd = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pNewAnch))->GetNode();
- if( pNewAnch->getSwFrame().Bottom() < aTmpPnt.Y() )
+ if( pNewAnch->geFrameArea().Bottom() < aTmpPnt.Y() )
pCNd->MakeStartIndex( &aPos.nContent );
else
pCNd->MakeEndIndex( &aPos.nContent );
@@ -220,7 +220,7 @@ bool sw_ChkAndSetNewAnchor(
"forbidden anchor change in Head/Foot." );
#endif
- return ::lcl_FindAnchorPos( *pDoc, rFly.getSwFrame().Pos(), rFly, rSet );
+ return ::lcl_FindAnchorPos( *pDoc, rFly.geFrameArea().Pos(), rFly, rSet );
}
void SwFEShell::SelectFlyFrame( SwFlyFrame& rFrame )
@@ -372,7 +372,7 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
else
{
const SwFrame *pAnch = pFly->GetAnchorFrame();
- Point aOrient( pAnch->getSwFrame().Pos() );
+ Point aOrient( pAnch->geFrameArea().Pos() );
if ( pFly->IsFlyInContentFrame() )
aOrient.setX(rAbsPos.getX());
@@ -894,8 +894,8 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj,
Point aTmpPt( rInsertPosition );
GetLayout()->GetCursorOfst( aPam.GetPoint(), aTmpPt, &aState );
const SwFrame* pFrame = aPam.GetContentNode()->getLayoutFrame( GetLayout(), nullptr, nullptr, false );
- const Point aRelPos( rInsertPosition.X() - pFrame->getSwFrame().Left(),
- rInsertPosition.Y() - pFrame->getSwFrame().Top() );
+ const Point aRelPos( rInsertPosition.X() - pFrame->geFrameArea().Left(),
+ rInsertPosition.Y() - pFrame->geFrameArea().Top() );
rDrawObj.SetRelativePos( aRelPos );
::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrame, rFlyAttrSet );
}
@@ -1036,7 +1036,7 @@ bool SwFEShell::SetFlyFrameAttr( SfxItemSet& rSet )
if (pFly)
{
StartAllAction();
- const Point aPt( pFly->getSwFrame().Pos() );
+ const Point aPt( pFly->geFrameArea().Pos() );
if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false ))
sw_ChkAndSetNewAnchor( *pFly, rSet );
@@ -1170,7 +1170,7 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi
SET_CURR_SHELL( this );
SwFlyFrameFormat* pFlyFormat = pFly->GetFormat();
- const Point aPt( pFly->getSwFrame().Pos() );
+ const Point aPt( pFly->geFrameArea().Pos() );
SfxItemSet* pSet = nullptr;
const SfxPoolItem* pItem;
@@ -1224,7 +1224,7 @@ SwRect SwFEShell::GetFlyRect() const
return aRect;
}
else
- return pFly->getSwFrame();
+ return pFly->geFrameArea();
}
SwRect SwFEShell::GetObjRect() const
@@ -1258,7 +1258,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
return aResult;
}
- aResult = pFly->getSwPrint().SSize();
+ aResult = pFly->getFramePrintArea().SSize();
bool bPosProt = pFly->GetFormat()->GetProtect().IsPosProtected();
bool bSizeProt = pFly->GetFormat()->GetProtect().IsSizeProtected();
@@ -1270,7 +1270,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
// Correct display is done by scaling.
// Scaling is done by SwNoTextFrame::Format by calling
// SwWrtShell::CalcAndSetScale()
- if ( rRect.SSize() != pFly->getSwPrint().SSize() && !bSizeProt )
+ if ( rRect.SSize() != pFly->getFramePrintArea().SSize() && !bSizeProt )
{
Size aSz( rRect.SSize() );
@@ -1301,17 +1301,17 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
SwFlyFrame* pChgFly = const_cast<SwFlyFrame*>(static_cast<const SwFlyFrame*>(pAnchor->GetUpper()));
// calculate the changed size:
// width must change, height can change
- Size aNewSz( aSz.Width() + pChgFly->getSwFrame().Width() -
- pFly->getSwPrint().Width(), aSz.Height() );
+ Size aNewSz( aSz.Width() + pChgFly->geFrameArea().Width() -
+ pFly->getFramePrintArea().Width(), aSz.Height() );
SwFrameFormat *pFormat = pChgFly->GetFormat();
SwFormatFrameSize aFrameSz( pFormat->GetFrameSize() );
aFrameSz.SetWidth( aNewSz.Width() );
if( ATT_MIN_SIZE != aFrameSz.GetHeightSizeType() )
{
- aNewSz.Height() += pChgFly->getSwFrame().Height() -
- pFly->getSwPrint().Height();
- if( std::abs( aNewSz.Height() - pChgFly->getSwFrame().Height()) > 1 )
+ aNewSz.Height() += pChgFly->geFrameArea().Height() -
+ pFly->getFramePrintArea().Height();
+ if( std::abs( aNewSz.Height() - pChgFly->geFrameArea().Height()) > 1 )
aFrameSz.SetHeight( aNewSz.Height() );
}
// via Doc for the Undo!
@@ -1322,10 +1322,10 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
}
// set the new Size at the fly themself
- if ( pFly->getSwPrint().Height() > 0 && pFly->getSwPrint().Width() > 0 )
+ if ( pFly->getFramePrintArea().Height() > 0 && pFly->getFramePrintArea().Width() > 0 )
{
- aSz.Width() += pFly->getSwFrame().Width() - pFly->getSwPrint().Width();
- aSz.Height()+= pFly->getSwFrame().Height()- pFly->getSwPrint().Height();
+ aSz.Width() += pFly->geFrameArea().Width() - pFly->getFramePrintArea().Width();
+ aSz.Height()+= pFly->geFrameArea().Height()- pFly->getFramePrintArea().Height();
}
aResult = pFly->ChgSize( aSz );
@@ -1339,13 +1339,13 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
// if only the size is to be adjusted, a position is transported with
// allocated values
- Point aPt( pFly->getSwPrint().Pos() );
- aPt += pFly->getSwFrame().Pos();
+ Point aPt( pFly->getFramePrintArea().Pos() );
+ aPt += pFly->geFrameArea().Pos();
if ( rRect.Top() != LONG_MIN && rRect.Pos() != aPt && !bPosProt )
{
aPt = rRect.Pos();
- aPt.setX(aPt.getX() - pFly->getSwPrint().Left());
- aPt.setY(aPt.getY() - pFly->getSwPrint().Top());
+ aPt.setX(aPt.getX() - pFly->getFramePrintArea().Left());
+ aPt.setY(aPt.getY() - pFly->getFramePrintArea().Top());
// in case of paragraph-bound Flys, starting from the new position,
// a new anchor is to be set. The anchor and the new RelPos are
@@ -1357,8 +1357,8 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
const SwFrameFormat *pFormat = pFly->GetFormat();
const SwFormatVertOrient &rVert = pFormat->GetVertOrient();
const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient();
- const long lXDiff = aPt.getX() - pFly->getSwFrame().Left();
- const long lYDiff = aPt.getY() - pFly->getSwFrame().Top();
+ const long lXDiff = aPt.getX() - pFly->geFrameArea().Left();
+ const long lYDiff = aPt.getY() - pFly->geFrameArea().Top();
const Point aTmp( rHori.GetPos() + lXDiff,
rVert.GetPos() + lYDiff );
pFly->ChgRelPos( aTmp );
@@ -1368,7 +1368,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
SwFlyFrameFormat *pFlyFrameFormat = pFly->GetFormat();
OSL_ENSURE( pFlyFrameFormat, "fly frame format missing!" );
if ( pFlyFrameFormat )
- pFlyFrameFormat->SetLastFlyFramePrtRectPos( pFly->getSwPrint().Pos() ); //stores the value of last Prt rect
+ pFlyFrameFormat->SetLastFlyFramePrtRectPos( pFly->getFramePrintArea().Pos() ); //stores the value of last Prt rect
EndAllAction();
@@ -1495,7 +1495,7 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL,
{
// append the relative pixel position !!
Point aPt( rPt );
- aPt -= pFly->getSwFrame().Pos();
+ aPt -= pFly->geFrameArea().Pos();
// without MapMode-Offset, without Offset, o ... !!!!!
aPt = GetOut()->LogicToPixel(
aPt, MapMode( MapUnit::MapTwip ) );
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 7918f5388c63..d21aba740385 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -211,7 +211,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
// Similar if a fly with protected content is deselected.
// For simplicity we put the cursor next to the upper-left
// corner.
- Point aPt( pOldSelFly->getSwFrame().Pos() );
+ Point aPt( pOldSelFly->geFrameArea().Pos() );
aPt.setX(aPt.getX() - 1);
bool bUnLockView = !IsViewLocked();
LockView( true );
@@ -222,7 +222,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
if ( nType & CNT_GRF &&
static_cast<SwNoTextFrame*>(pOldSelFly->Lower())->HasAnimation() )
{
- GetWin()->Invalidate( pOldSelFly->getSwFrame().SVRect() );
+ GetWin()->Invalidate( pOldSelFly->geFrameArea().SVRect() );
}
// Cancel crop mode
@@ -469,8 +469,8 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
if( pPage->GetSortedObjs() )
{
bool bOld = false;
- Point aCenter( pOld->getSwFrame().Left() + pOld->getSwFrame().Width()/2,
- pOld->getSwFrame().Top() + pOld->getSwFrame().Height()/2 );
+ Point aCenter( pOld->geFrameArea().Left() + pOld->geFrameArea().Width()/2,
+ pOld->geFrameArea().Top() + pOld->geFrameArea().Height()/2 );
Point aBest;
for(SwAnchoredObject* pAnchObj : *pPage->GetSortedObjs())
{
@@ -491,10 +491,10 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
}
if( pCheck || pTmp->IsProtected() )
continue;
- Point aNew( pTmp->getSwFrame().Left() +
- pTmp->getSwFrame().Width()/2,
- pTmp->getSwFrame().Top() +
- pTmp->getSwFrame().Height()/2 );
+ Point aNew( pTmp->geFrameArea().Left() +
+ pTmp->geFrameArea().Width()/2,
+ pTmp->geFrameArea().Top() +
+ pTmp->geFrameArea().Height()/2 );
bool bAccept = false;
switch( nDir ) {
case SwMove::RIGHT:
@@ -800,8 +800,8 @@ const SwFrameFormat* SwFEShell::SelFlyGrabCursor()
pCursor->GetPoint()->nContent.Assign( pCNode, 0 );
SwRect& rChrRect = const_cast<SwRect&>(GetCharRect());
- rChrRect = pFly->getSwPrint();
- rChrRect.Pos() += pFly->getSwFrame().Pos();
+ rChrRect = pFly->getFramePrintArea();
+ rChrRect.Pos() += pFly->geFrameArea().Pos();
GetCursorDocPos() = rChrRect.Pos();
}
return pFly->GetFormat();
@@ -836,12 +836,12 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst )
{
bCheckNeighbours = true;
pFly->InvalidatePos();
- SwFrameRect::FrameWriteAccess aFrm(*pFly);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFly);
aFrm.Pos().Y() += 1;
}
pPage = pFly->FindPageFrame();
- aRect = pFly->getSwFrame();
+ aRect = pFly->geFrameArea();
}
else
{
@@ -861,15 +861,15 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst )
continue;
SwFlyFrame* pAct = static_cast<SwFlyFrame*>(pAnchoredObj);
- SwRect aTmpCalcPnt( pAct->getSwPrint() );
- aTmpCalcPnt += pAct->getSwFrame().Pos();
+ SwRect aTmpCalcPnt( pAct->getFramePrintArea() );
+ aTmpCalcPnt += pAct->geFrameArea().Pos();
if ( aRect.IsOver( aTmpCalcPnt ) )
{
SwContentFrame *pCnt = pAct->ContainsContent();
while ( pCnt )
{
- aTmpCalcPnt = pCnt->getSwPrint();
- aTmpCalcPnt += pCnt->getSwFrame().Pos();
+ aTmpCalcPnt = pCnt->getFramePrintArea();
+ aTmpCalcPnt += pCnt->geFrameArea().Pos();
if ( aRect.IsOver( aTmpCalcPnt ) )
static_cast<SwFrame*>(pCnt)->Prepare( PREP_FLY_ATTR_CHG );
pCnt = pCnt->GetNextContentFrame();
@@ -879,11 +879,11 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst )
{
const SwFormatHoriOrient &rH = pAct->GetFormat()->GetHoriOrient();
if ( rH.GetHoriOrient() == aHori &&
- pAct->getSwFrame().Top() <= aRect.Bottom() &&
- pAct->getSwFrame().Bottom() >= aRect.Top() )
+ pAct->geFrameArea().Top() <= aRect.Bottom() &&
+ pAct->geFrameArea().Bottom() >= aRect.Top() )
{
pAct->InvalidatePos();
- SwFrameRect::FrameWriteAccess aFrm(*pAct);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pAct);
aFrm.Pos().Y() += 1;
}
}
@@ -1494,7 +1494,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
{
const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj();
if( dynamic_cast<const SwVirtFlyDrawObj*>( pStartObj) != nullptr )
- aPos = static_cast<const SwVirtFlyDrawObj*>(pStartObj)->GetFlyFrame()->getSwFrame().Pos();
+ aPos = static_cast<const SwVirtFlyDrawObj*>(pStartObj)->GetFlyFrame()->geFrameArea().Pos();
else
aPos = pStartObj->GetSnapRect().TopLeft();
@@ -1565,7 +1565,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
default: break;
}
}
- aCurPos = pFly->getSwFrame().Pos();
+ aCurPos = pFly->geFrameArea().Pos();
}
else
aCurPos = pObj->GetCurrentBoundRect().TopLeft();
@@ -1587,7 +1587,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
if( bFlyFrame )
{
SwVirtFlyDrawObj *pO = static_cast<SwVirtFlyDrawObj*>(pTmpObj);
- aCurPos = pO->GetFlyFrame()->getSwFrame().Pos();
+ aCurPos = pO->GetFlyFrame()->geFrameArea().Pos();
}
else
aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft();
@@ -1649,7 +1649,7 @@ bool SwFEShell::GotoObj( bool bNext, GotoObjFlags eType )
if( bFlyFrame )
{
const SwVirtFlyDrawObj *pO = static_cast<const SwVirtFlyDrawObj*>(pBest);
- const SwRect& rFrame = pO->GetFlyFrame()->getSwFrame();
+ const SwRect& rFrame = pO->GetFlyFrame()->geFrameArea();
SelectObj( rFrame.Pos(), 0, const_cast<SdrObject*>(pBest) );
if( !ActionPend() )
MakeVisible( rFrame );
@@ -1865,7 +1865,7 @@ bool SwFEShell::ImpEndCreate()
SwRect aBound( rBound );
while( pTmp )
{
- if( pTmp->getSwFrame().IsInside( aBound ) )
+ if( pTmp->geFrameArea().IsInside( aBound ) )
{
if( !bBodyOnly || !pTmp->FindFooterOrHeader() )
pPage = pTmpFrame;
@@ -1914,17 +1914,17 @@ bool SwFEShell::ImpEndCreate()
// OD 2004-03-30 #i26791# - determine relative object position
SwTwips nXOffset;
- SwTwips nYOffset = rBound.Top() - pAnch->getSwFrame().Top();
+ SwTwips nYOffset = rBound.Top() - pAnch->geFrameArea().Top();
{
if( pAnch->IsVertical() )
{
nXOffset = nYOffset;
- nYOffset = pAnch->getSwFrame().Left()+pAnch->getSwFrame().Width()-rBound.Right();
+ nYOffset = pAnch->geFrameArea().Left()+pAnch->geFrameArea().Width()-rBound.Right();
}
else if( pAnch->IsRightToLeft() )
- nXOffset = pAnch->getSwFrame().Left()+pAnch->getSwFrame().Width()-rBound.Right();
+ nXOffset = pAnch->geFrameArea().Left()+pAnch->geFrameArea().Width()-rBound.Right();
else
- nXOffset = rBound.Left() - pAnch->getSwFrame().Left();
+ nXOffset = rBound.Left() - pAnch->geFrameArea().Left();
if( pAnch->IsTextFrame() && static_cast<const SwTextFrame*>(pAnch)->IsFollow() )
{
const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnch);
@@ -1934,7 +1934,7 @@ bool SwFEShell::ImpEndCreate()
// OD 2004-03-30 #i26791# - correction: add frame area height
// of master frames.
nYOffset += pTmp->IsVertical() ?
- pTmp->getSwFrame().Width() : pTmp->getSwFrame().Height();
+ pTmp->geFrameArea().Width() : pTmp->geFrameArea().Height();
} while ( pTmp->IsFollow() );
}
}
@@ -1980,9 +1980,9 @@ bool SwFEShell::ImpEndCreate()
SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT>{} );
// horizontal orientation:
const bool bLeftFrame = aFlyRect.Left() <
- pAnch->getSwFrame().Left() + pAnch->getSwPrint().Left(),
+ pAnch->geFrameArea().Left() + pAnch->getFramePrintArea().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
- pAnch->getSwFrame().Left() + pAnch->getSwPrint().Width()/2;
+ pAnch->geFrameArea().Left() + pAnch->getFramePrintArea().Width()/2;
if( bLeftFrame || bLeftPrt )
{
aHori.SetHoriOrient( text::HoriOrientation::LEFT );
@@ -1991,7 +1991,7 @@ bool SwFEShell::ImpEndCreate()
else
{
const bool bRightFrame = aFlyRect.Left() >
- pAnch->getSwFrame().Left() + pAnch->getSwPrint().Width();
+ pAnch->geFrameArea().Left() + pAnch->getFramePrintArea().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
}
@@ -2024,7 +2024,7 @@ bool SwFEShell::ImpEndCreate()
pTmp = pTmp->FindMaster();
assert(pTmp && "Where's my Master?");
nYOffset += pTmp->IsVertical() ?
- pTmp->getSwPrint().Width() : pTmp->getSwPrint().Height();
+ pTmp->getFramePrintArea().Width() : pTmp->getFramePrintArea().Height();
} while ( pTmp->IsFollow() );
}
SwFormatVertOrient aVert( nYOffset, text::VertOrientation::NONE, text::RelOrientation::FRAME );
@@ -2288,7 +2288,7 @@ Point SwFEShell::GetAnchorObjDiff() const
if ( IsFrameSelected() )
{
SwFlyFrame *pFly = GetSelectedFlyFrame();
- aRet -= pFly->GetAnchorFrame()->getSwFrame().Pos();
+ aRet -= pFly->GetAnchorFrame()->geFrameArea().Pos();
}
else
{
@@ -2496,8 +2496,8 @@ bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame
{
// first make visible, to get a11y events in proper order
if (!ActionPend())
- MakeVisible( pFrame->getSwFrame() );
- SelectObj( pFrame->getSwFrame().Pos(), 0, pFrame->GetVirtDrawObj() );
+ MakeVisible( pFrame->geFrameArea() );
+ SelectObj( pFrame->geFrameArea().Pos(), 0, pFrame->GetVirtDrawObj() );
}
else
{
@@ -2512,8 +2512,8 @@ bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame
pCursor->GetPoint()->nContent.Assign( pCNode, 0 );
SwRect& rChrRect = const_cast<SwRect&>(GetCharRect());
- rChrRect = pFrame->getSwPrint();
- rChrRect.Pos() += pFrame->getSwFrame().Pos();
+ rChrRect = pFrame->getFramePrintArea();
+ rChrRect.Pos() += pFrame->geFrameArea().Pos();
GetCursorDocPos() = rChrRect.Pos();
}
}
@@ -2700,9 +2700,9 @@ void SwFEShell::CheckUnboundObjects()
const Point aPt( rBound.TopLeft() );
const SwFrame *pPage = GetLayout()->Lower();
const SwFrame *pLast = pPage;
- while ( pPage && !pPage->getSwFrame().IsInside( aPt ) )
+ while ( pPage && !pPage->geFrameArea().IsInside( aPt ) )
{
- if ( aPt.Y() > pPage->getSwFrame().Bottom() )
+ if ( aPt.Y() > pPage->geFrameArea().Bottom() )
pLast = pPage;
pPage = pPage->GetNext();
}
@@ -2782,7 +2782,7 @@ SwChainRet SwFEShell::Chainable( SwRect &rRect, const SwFrameFormat &rSource,
if (pDrawObj)
{
SwFlyFrame *pFly = pDrawObj->GetFlyFrame();
- rRect = pFly->getSwFrame();
+ rRect = pFly->geFrameArea();
// Target and source should not be equal and the list
// should not be cyclic
@@ -2848,8 +2848,8 @@ void SwFEShell::SetChainMarker()
bDelFrom = false;
const SwFrame *pPre = pFly->GetPrevLink();
- Point aStart( pPre->getSwFrame().Right(), pPre->getSwFrame().Bottom());
- Point aEnd(pFly->getSwFrame().Pos());
+ Point aStart( pPre->geFrameArea().Right(), pPre->geFrameArea().Bottom());
+ Point aEnd(pFly->geFrameArea().Pos());
if (!m_pChainFrom)
{
@@ -2862,8 +2862,8 @@ void SwFEShell::SetChainMarker()
bDelTo = false;
const SwFlyFrame *pNxt = pFly->GetNextLink();
- Point aStart( pFly->getSwFrame().Right(), pFly->getSwFrame().Bottom());
- Point aEnd(pNxt->getSwFrame().Pos());
+ Point aStart( pFly->geFrameArea().Right(), pFly->geFrameArea().Bottom());
+ Point aEnd(pNxt->geFrameArea().Pos());
if (!m_pChainTo)
{
@@ -2895,7 +2895,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
{
// Is it the right one?
if( pSect->KnowsFormat( rFormat ) )
- return pSect->getSwFrame().Width();
+ return pSect->geFrameArea().Width();
// for nested areas
pSect = pSect->GetUpper()->FindSctFrame();
}
@@ -2906,7 +2906,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
{
if( !pSct->IsFollow() )
{
- return pSct->getSwFrame().Width();
+ return pSct->geFrameArea().Width();
}
}
return 0;
@@ -3210,13 +3210,13 @@ Point SwFEShell::GetRelativePagePosition(const Point& rDocPos)
{
Point aRet(-1, -1);
const SwFrame *pPage = GetLayout()->Lower();
- while ( pPage && !pPage->getSwFrame().IsInside( rDocPos ) )
+ while ( pPage && !pPage->geFrameArea().IsInside( rDocPos ) )
{
pPage = pPage->GetNext();
}
if(pPage)
{
- aRet = rDocPos - pPage->getSwFrame().TopLeft();
+ aRet = rDocPos - pPage->geFrameArea().TopLeft();
}
return aRet;
}
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 14dbdff2706b..2f1e585c3234 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -532,18 +532,18 @@ void SwFEShell::GetTabCols_( SwTabCols &rToFill, const SwFrame *pBox )
SwRectFnSet aRectFnSet(pTab);
const SwPageFrame* pPage = pTab->FindPageFrame();
- const sal_uLong nLeftMin = aRectFnSet.GetLeft(pTab->getSwFrame()) -
- aRectFnSet.GetLeft(pPage->getSwFrame());
- const sal_uLong nRightMax = aRectFnSet.GetRight(pTab->getSwFrame()) -
- aRectFnSet.GetLeft(pPage->getSwFrame());
+ const sal_uLong nLeftMin = aRectFnSet.GetLeft(pTab->geFrameArea()) -
+ aRectFnSet.GetLeft(pPage->geFrameArea());
+ const sal_uLong nRightMax = aRectFnSet.GetRight(pTab->geFrameArea()) -
+ aRectFnSet.GetLeft(pPage->geFrameArea());
if (g_pColumnCacheLastTabFrame != pTab)
{
// if TabFrame was changed, we only shift a little bit
// as the width is the same
SwRectFnSet fnRectX(g_pColumnCacheLastTabFrame);
- if (fnRectX.GetWidth(g_pColumnCacheLastTabFrame->getSwFrame()) ==
- aRectFnSet.GetWidth(pTab->getSwFrame()) )
+ if (fnRectX.GetWidth(g_pColumnCacheLastTabFrame->geFrameArea()) ==
+ aRectFnSet.GetWidth(pTab->geFrameArea()) )
{
pLastCols->SetLeftMin( nLeftMin );
@@ -555,8 +555,8 @@ void SwFEShell::GetTabCols_( SwTabCols &rToFill, const SwFrame *pBox )
if ( !bDel &&
pLastCols->GetLeftMin () == (sal_uInt16)nLeftMin &&
- pLastCols->GetLeft () == (sal_uInt16)aRectFnSet.GetLeft(pTab->getSwPrint()) &&
- pLastCols->GetRight () == (sal_uInt16)aRectFnSet.GetRight(pTab->getSwPrint())&&
+ pLastCols->GetLeft () == (sal_uInt16)aRectFnSet.GetLeft(pTab->getFramePrintArea()) &&
+ pLastCols->GetRight () == (sal_uInt16)aRectFnSet.GetRight(pTab->getFramePrintArea())&&
pLastCols->GetRightMax() == (sal_uInt16)nRightMax - pLastCols->GetLeftMin() )
{
if (g_pColumnCacheLastCellFrame != pBox)
@@ -596,10 +596,10 @@ void SwFEShell::GetTabRows_( SwTabCols &rToFill, const SwFrame *pBox )
SwRectFnSet aRectFnSet(pTab);
const SwPageFrame* pPage = pTab->FindPageFrame();
const long nLeftMin = ( aRectFnSet.IsVert() ?
- pTab->GetPrtLeft() - pPage->getSwFrame().Left() :
- pTab->GetPrtTop() - pPage->getSwFrame().Top() );
+ pTab->GetPrtLeft() - pPage->geFrameArea().Left() :
+ pTab->GetPrtTop() - pPage->geFrameArea().Top() );
const long nLeft = aRectFnSet.IsVert() ? LONG_MAX : 0;
- const long nRight = aRectFnSet.GetHeight(pTab->getSwPrint());
+ const long nRight = aRectFnSet.GetHeight(pTab->getFramePrintArea());
const long nRightMax = aRectFnSet.IsVert() ? nRight : LONG_MAX;
if (g_pRowCacheLastTabFrame != pTab || g_pRowCacheLastCellFrame != pBox)
@@ -1361,7 +1361,7 @@ size_t SwFEShell::GetCurTabColNum() const
if( pFrame->FindTabFrame()->IsRightToLeft() )
{
- long nX = aRectFnSet.GetRight(pFrame->getSwFrame()) - aRectFnSet.GetLeft(pPage->getSwFrame());
+ long nX = aRectFnSet.GetRight(pFrame->geFrameArea()) - aRectFnSet.GetLeft(pPage->geFrameArea());
const long nRight = aTabCols.GetLeftMin() + aTabCols.GetRight();
@@ -1378,8 +1378,8 @@ size_t SwFEShell::GetCurTabColNum() const
}
else
{
- const long nX = aRectFnSet.GetLeft(pFrame->getSwFrame()) -
- aRectFnSet.GetLeft(pPage->getSwFrame());
+ const long nX = aRectFnSet.GetLeft(pFrame->geFrameArea()) -
+ aRectFnSet.GetLeft(pPage->geFrameArea());
const long nLeft = aTabCols.GetLeftMin();
@@ -1402,7 +1402,7 @@ static const SwFrame *lcl_FindFrameInTab( const SwLayoutFrame *pLay, const Point
while( pFrame && pLay->IsAnLower( pFrame ) )
{
- if ( pFrame->getSwFrame().IsNear( rPt, nFuzzy ) )
+ if ( pFrame->geFrameArea().IsNear( rPt, nFuzzy ) )
{
if ( pFrame->IsLayoutFrame() )
{
@@ -1463,8 +1463,8 @@ static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point
SwRectFnSet aRectFnSet(pFrame);
const bool bRTL = pFrame->IsRightToLeft();
- SwRect aTabRect = pFrame->getSwPrint();
- aTabRect.Pos() += pFrame->getSwFrame().Pos();
+ SwRect aTabRect = pFrame->getFramePrintArea();
+ aTabRect.Pos() += pFrame->geFrameArea().Pos();
const SwTwips nLeft = bRTL ?
aRectFnSet.GetRight(aTabRect) :
@@ -1485,8 +1485,8 @@ static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point
const SwFrame* pPrev = pFrame->GetPrev();
if ( pPrev )
{
- SwRect aPrevRect = pPrev->getSwPrint();
- aPrevRect.Pos() += pPrev->getSwFrame().Pos();
+ SwRect aPrevRect = pPrev->getFramePrintArea();
+ aPrevRect.Pos() += pPrev->geFrameArea().Pos();
if( aPrevRect.IsInside( rPt ) )
{
@@ -1571,8 +1571,8 @@ static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point
{
// used for mouse move of columns/rows
const SwTabFrame* pTabFrame = pFrame->FindTabFrame();
- SwRect aTabRect = pTabFrame->getSwPrint();
- aTabRect.Pos() += pTabFrame->getSwFrame().Pos();
+ SwRect aTabRect = pTabFrame->getFramePrintArea();
+ aTabRect.Pos() += pTabFrame->geFrameArea().Pos();
SwRectFnSet aRectFnSet(pTabFrame);
@@ -1582,15 +1582,15 @@ static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point
// Do not allow to drag upper table border:
if ( !::IsSame( nTabTop, nMouseTop ) )
{
- if ( ::IsSame( pFrame->getSwFrame().Left(), rPt.X() ) ||
- ::IsSame( pFrame->getSwFrame().Right(),rPt.X() ) )
+ if ( ::IsSame( pFrame->geFrameArea().Left(), rPt.X() ) ||
+ ::IsSame( pFrame->geFrameArea().Right(),rPt.X() ) )
{
if ( pbRow ) *pbRow = false;
pRet = pFrame;
break;
}
- if ( ::IsSame( pFrame->getSwFrame().Top(), rPt.Y() ) ||
- ::IsSame( pFrame->getSwFrame().Bottom(),rPt.Y() ) )
+ if ( ::IsSame( pFrame->geFrameArea().Top(), rPt.Y() ) ||
+ ::IsSame( pFrame->geFrameArea().Bottom(),rPt.Y() ) )
{
if ( pbRow ) *pbRow = true;
pRet = pFrame;
@@ -1628,7 +1628,7 @@ const SwFrame* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) c
nFuzzy = aTmp.Width();
}
- while ( pPage && !pPage->getSwFrame().IsNear( rPt, nFuzzy ) )
+ while ( pPage && !pPage->geFrameArea().IsNear( rPt, nFuzzy ) )
pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
const SwCellFrame *pFrame = nullptr;
@@ -1732,8 +1732,8 @@ static Point lcl_ProjectOntoClosestTableFrame( const SwTabFrame& rTab, const Poi
while ( pCurrentTab )
{
- SwRect aTabRect( pCurrentTab->getSwPrint() );
- aTabRect += pCurrentTab->getSwFrame().Pos();
+ SwRect aTabRect( pCurrentTab->getFramePrintArea() );
+ aTabRect += pCurrentTab->geFrameArea().Pos();
if ( bLeft )
{
@@ -1826,7 +1826,7 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr
// paPt[i] will not be used any longer, now we use it to store
// a position inside the content frame
- paPt[i] = pContent->getSwFrame().Center();
+ paPt[i] = pContent->geFrameArea().Center();
}
}
@@ -2076,7 +2076,7 @@ size_t SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
OSL_ENSURE( pFrame, "Table not found" );
if( pFrame )
{
- const long nX = pFrame->getSwFrame().Left();
+ const long nX = pFrame->geFrameArea().Left();
// get TabCols, only via these we get the position
SwTabCols aTabCols;
@@ -2179,21 +2179,21 @@ bool SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16
// then it should be recalculated to absolute values now
const SwFormatFrameSize& rTableFrameSz = pTab->GetFormat()->GetFrameSize();
SwRectFnSet aRectFnSet(pTab);
- long nPrtWidth = aRectFnSet.GetWidth(pTab->getSwPrint());
+ long nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
if( TableChgMode::VarWidthChangeAbs == pTab->GetTable()->GetTableChgMode() &&
( eType & TableChgWidthHeightType::ColLeft || eType & TableChgWidthHeightType::ColRight ) &&
text::HoriOrientation::NONE == pTab->GetFormat()->GetHoriOrient().GetHoriOrient() &&
nPrtWidth != rTableFrameSz.GetWidth() )
{
SwFormatFrameSize aSz( rTableFrameSz );
- aSz.SetWidth( pTab->getSwPrint().Width() );
+ aSz.SetWidth( pTab->getFramePrintArea().Width() );
pTab->GetFormat()->SetFormatAttr( aSz );
}
if( extractPosition(eType) == TableChgWidthHeightType::ColLeft &&
(eType & (TableChgWidthHeightType::BiggerMode | TableChgWidthHeightType::InsertDeleteMode)) )
{
- nDiff = sal_uInt16(aRectFnSet.GetWidth(pFrame->getSwFrame()));
+ nDiff = sal_uInt16(aRectFnSet.GetWidth(pFrame->geFrameArea()));
// we must move the cursor outside the current cell before
// deleting the cells.
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 0dff86a6012b..6c0b4045d1aa 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -106,7 +106,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
}
if( !pFrame )
- return GetLayout()->getSwFrame();
+ return GetLayout()->geFrameArea();
bool bFrame = true;
switch ( eType )
@@ -158,7 +158,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
case CurRectType::HeaderFooter:
if( nullptr == (pFrame = pFrame->FindFooterOrHeader()) )
- return GetLayout()->getSwFrame();
+ return GetLayout()->geFrameArea();
break;
case CurRectType::PagesArea:
@@ -166,13 +166,13 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
default: break;
}
- return bFrame ? pFrame->getSwFrame() : pFrame->getSwPrint();
+ return bFrame ? pFrame->geFrameArea() : pFrame->getFramePrintArea();
}
sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const
{
const SwFrame *pPage = GetLayout()->Lower();
- while ( pPage && !pPage->getSwFrame().IsInside( rPoint ) )
+ while ( pPage && !pPage->geFrameArea().IsInside( rPoint ) )
pPage = pPage->GetNext();
if ( pPage )
return static_cast<const SwPageFrame*>(pPage)->GetPhyPageNum();
@@ -193,8 +193,8 @@ bool SwFEShell::GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNu
else if ( nYPos > -1 ) // determine page via the position
{
pPage = GetLayout()->Lower();
- while( pPage && (pPage->getSwFrame().Bottom() < nYPos ||
- nYPos < pPage->getSwFrame().Top() ) )
+ while( pPage && (pPage->geFrameArea().Bottom() < nYPos ||
+ nYPos < pPage->geFrameArea().Top() ) )
pPage = pPage->GetNext();
}
else // first visible page
@@ -642,8 +642,8 @@ sal_uInt16 SwFEShell::GetCurColNum_( const SwFrame *pFrame,
if( ( SwFrameType::Page | SwFrameType::Fly | SwFrameType::Section ) & pFrame->GetType() )
{
pPara->pFrameFormat = static_cast<const SwLayoutFrame*>(pFrame)->GetFormat();
- pPara->pPrtRect = &pFrame->getSwPrint();
- pPara->pFrameRect = &pFrame->getSwFrame();
+ pPara->pPrtRect = &pFrame->getFramePrintArea();
+ pPara->pFrameRect = &pFrame->geFrameArea();
break;
}
pFrame = pFrame->GetUpper();
@@ -761,13 +761,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
if ( !pFrame )
pFrame = pTmp;
- _orRect = pFrame->getSwFrame();
+ _orRect = pFrame->geFrameArea();
SwRectFnSet aRectFnSet(pFrame);
bRTL = pFrame->IsRightToLeft();
if ( bRTL )
- aPos = pFrame->getSwFrame().TopRight();
+ aPos = pFrame->geFrameArea().TopRight();
else
- aPos = aRectFnSet.GetPos(pFrame->getSwFrame());
+ aPos = aRectFnSet.GetPos(pFrame->geFrameArea());
if( aRectFnSet.IsVert() || aRectFnSet.IsVertL2R() )
{
@@ -777,10 +777,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PAGE_RIGHT:
- case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrame->getSwPrint().Height();
+ case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrame->getFramePrintArea().Height();
SAL_FALLTHROUGH;
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrame->getSwPrint().Top(); break;
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrame->getFramePrintArea().Top(); break;
default: break;
}
}
@@ -789,11 +789,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getSwPrint().Width();
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getFramePrintArea().Width();
SAL_FALLTHROUGH;
case text::RelOrientation::PAGE_RIGHT:
- case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->getSwPrint().Left(); break;
- default: aPos.X() += pFrame->getSwFrame().Width();
+ case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->getFramePrintArea().Left(); break;
+ default: aPos.X() += pFrame->geFrameArea().Width();
}
}
else if ( bRTL )
@@ -801,11 +801,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getSwPrint().Width();
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getFramePrintArea().Width();
SAL_FALLTHROUGH;
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrame->getSwPrint().Left() -
- pFrame->getSwFrame().Width(); break;
+ case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrame->getFramePrintArea().Left() -
+ pFrame->geFrameArea().Width(); break;
default: break;
}
}
@@ -814,10 +814,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::PAGE_RIGHT:
- case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->getSwPrint().Width();
+ case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->getFramePrintArea().Width();
SAL_FALLTHROUGH;
case text::RelOrientation::PRINT_AREA:
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getSwPrint().Left(); break;
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->getFramePrintArea().Left(); break;
default:break;
}
}
@@ -860,14 +860,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
else
{
- aPos.Y() += pFrame->getSwPrint().Top();
+ aPos.Y() += pFrame->getFramePrintArea().Top();
}
}
break;
}
}
if ( _opPercent )
- *_opPercent = pFrame->getSwPrint().SSize();
+ *_opPercent = pFrame->getFramePrintArea().SSize();
}
else
{
@@ -878,22 +878,22 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
// If the size is relative from page, then full size should be counted from the page frame.
if (pFormatFrameSize && pFormatFrameSize->GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME)
- _opPercent->setWidth(pPage->getSwFrame().Width());
+ _opPercent->setWidth(pPage->geFrameArea().Width());
else
- _opPercent->setWidth(pUpper->getSwPrint().Width());
+ _opPercent->setWidth(pUpper->getFramePrintArea().Width());
if (pFormatFrameSize && pFormatFrameSize->GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME)
// If the size is relative from page, then full size should be counted from the page frame.
- _opPercent->setHeight(pPage->getSwFrame().Height());
+ _opPercent->setHeight(pPage->geFrameArea().Height());
else
- _opPercent->setHeight(pUpper->getSwPrint().Height());
+ _opPercent->setHeight(pUpper->getFramePrintArea().Height());
}
bRTL = pFrame->IsRightToLeft();
if ( bRTL )
- aPos = pFrame->getSwFrame().TopRight();
+ aPos = pFrame->geFrameArea().TopRight();
else
- aPos = aRectFnSet.GetPos(pFrame->getSwFrame());
+ aPos = aRectFnSet.GetPos(pFrame->geFrameArea());
// #i17567# - allow negative positions
// for fly frames anchor to paragraph/to character.
if ((_nAnchorId == RndStdIds::FLY_AT_PARA) || (_nAnchorId == RndStdIds::FLY_AT_CHAR))
@@ -910,12 +910,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aEnvOfObj.GetHoriEnvironmentLayoutFrame( *pFrame );
const SwLayoutFrame& rVertEnvironLayFrame =
aEnvOfObj.GetVertEnvironmentLayoutFrame( *pFrame );
- const SwRect& aHoriEnvironRect( rHoriEnvironLayFrame.getSwFrame() );
+ const SwRect& aHoriEnvironRect( rHoriEnvironLayFrame.geFrameArea() );
SwRect aVertEnvironRect;
if ( _bFollowTextFlow )
{
- aVertEnvironRect = rVertEnvironLayFrame.getSwPrint();
- aVertEnvironRect.Pos() += rVertEnvironLayFrame.getSwFrame().Pos();
+ aVertEnvironRect = rVertEnvironLayFrame.getFramePrintArea();
+ aVertEnvironRect.Pos() += rVertEnvironLayFrame.geFrameArea().Pos();
// #i18732# - adjust vertical 'virtual' anchor position
// (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned
// to page areas.
@@ -939,7 +939,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
OSL_ENSURE( rVertEnvironLayFrame.IsPageFrame(),
"<SwFEShell::CalcBoundRect(..)> - not following text flow, but vertical environment *not* page!" );
- aVertEnvironRect = rVertEnvironLayFrame.getSwFrame();
+ aVertEnvironRect = rVertEnvironLayFrame.geFrameArea();
// #i18732# - adjustment vertical 'virtual' anchor position
// (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned
// to page areas.
@@ -971,7 +971,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
const SwFrame* pTmpFrame = rVertEnvironLayFrame.Lower();
if ( pTmpFrame->IsHeaderFrame() )
{
- aPos.setY(aPos.getY() + pTmpFrame->getSwFrame().Height());
+ aPos.setY(aPos.getY() + pTmpFrame->geFrameArea().Height());
}
}
}
@@ -1078,11 +1078,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
if( _opRef && pFly && pFly->IsFlyInContentFrame() )
*_opRef = static_cast<const SwFlyInContentFrame*>( pFly )->GetRefPoint();
- _orRect = pUpper->getSwFrame();
+ _orRect = pUpper->geFrameArea();
if( !pUpper->IsBodyFrame() )
{
- _orRect += pUpper->getSwPrint().Pos();
- _orRect.SSize( pUpper->getSwPrint().SSize() );
+ _orRect += pUpper->getFramePrintArea().Pos();
+ _orRect.SSize( pUpper->getFramePrintArea().SSize() );
if ( pUpper->IsCellFrame() )//MA_FLY_HEIGHT
{
const SwFrame* pTab = pUpper->FindTabFrame();
@@ -1112,30 +1112,30 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
case text::RelOrientation::FRAME_RIGHT:
{
- aPos.setY(aPos.getY() + pFrame->getSwPrint().Height());
- aPos += aRectFnSet.GetPos(pFrame->getSwPrint());
+ aPos.setY(aPos.getY() + pFrame->getFramePrintArea().Height());
+ aPos += aRectFnSet.GetPos(pFrame->getFramePrintArea());
break;
}
case text::RelOrientation::PRINT_AREA:
{
- aPos += aRectFnSet.GetPos(pFrame->getSwPrint());
+ aPos += aRectFnSet.GetPos(pFrame->getFramePrintArea());
aPos.setY(aPos.getY() + nBaseOfstForFly);
break;
}
case text::RelOrientation::PAGE_RIGHT:
{
- aPos.setY(pPage->getSwFrame().Top() + pPage->getSwPrint().Bottom());
+ aPos.setY(pPage->geFrameArea().Top() + pPage->getFramePrintArea().Bottom());
break;
}
case text::RelOrientation::PAGE_PRINT_AREA:
{
- aPos.setY(pPage->getSwFrame().Top() + pPage->getSwPrint().Top());
+ aPos.setY(pPage->geFrameArea().Top() + pPage->getFramePrintArea().Top());
break;
}
case text::RelOrientation::PAGE_LEFT:
case text::RelOrientation::PAGE_FRAME:
{
- aPos.setY(pPage->getSwFrame().Top());
+ aPos.setY(pPage->geFrameArea().Top());
break;
}
case text::RelOrientation::FRAME:
@@ -1150,14 +1150,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
switch ( _eHoriRelOrient )
{
- case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrame->getSwPrint().Left()); break;
+ case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrame->getFramePrintArea().Left()); break;
case text::RelOrientation::FRAME:
- case text::RelOrientation::FRAME_LEFT: aPos.setX(aPos.getX() + pFrame->getSwFrame().Width()); break;
- case text::RelOrientation::PRINT_AREA: aPos.setX(aPos.getX() + pFrame->getSwPrint().Right()); break;
+ case text::RelOrientation::FRAME_LEFT: aPos.setX(aPos.getX() + pFrame->geFrameArea().Width()); break;
+ case text::RelOrientation::PRINT_AREA: aPos.setX(aPos.getX() + pFrame->getFramePrintArea().Right()); break;
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::PAGE_FRAME: aPos.setX(pPage->getSwFrame().Right()); break;
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.setX(pPage->getSwFrame().Left()
- + pPage->getSwPrint().Left()); break;
+ case text::RelOrientation::PAGE_FRAME: aPos.setX(pPage->geFrameArea().Right()); break;
+ case text::RelOrientation::PAGE_PRINT_AREA: aPos.setX(pPage->geFrameArea().Left()
+ + pPage->getFramePrintArea().Left()); break;
default: break;
}
}
@@ -1166,28 +1166,28 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::FRAME_LEFT:
- aPos.setX(pFrame->getSwFrame().Left() +
- pFrame->getSwPrint().Left());
+ aPos.setX(pFrame->geFrameArea().Left() +
+ pFrame->getFramePrintArea().Left());
break;
case text::RelOrientation::PRINT_AREA:
- aPos.setX(pFrame->getSwFrame().Left() + pFrame->getSwPrint().Left() +
- pFrame->getSwPrint().Width());
+ aPos.setX(pFrame->geFrameArea().Left() + pFrame->getFramePrintArea().Left() +
+ pFrame->getFramePrintArea().Width());
aPos.setX(aPos.getX() + nBaseOfstForFly);
break;
case text::RelOrientation::PAGE_LEFT:
- aPos.setX(pPage->getSwFrame().Left() + pPage->getSwPrint().Left());
+ aPos.setX(pPage->geFrameArea().Left() + pPage->getFramePrintArea().Left());
break;
case text::RelOrientation::PAGE_PRINT_AREA:
- aPos.setX(pPage->getSwFrame().Left() + pPage->getSwPrint().Left() +
- pPage->getSwPrint().Width());
+ aPos.setX(pPage->geFrameArea().Left() + pPage->getFramePrintArea().Left() +
+ pPage->getFramePrintArea().Width());
break;
case text::RelOrientation::PAGE_RIGHT:
case text::RelOrientation::PAGE_FRAME:
- aPos.setX(pPage->getSwFrame().Right());
+ aPos.setX(pPage->geFrameArea().Right());
break;
case text::RelOrientation::FRAME:
@@ -1201,22 +1201,22 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
switch ( _eHoriRelOrient )
{
case text::RelOrientation::FRAME_RIGHT:
- aPos.X() += pFrame->getSwPrint().Width();
- aPos += pFrame->getSwPrint().Pos();
+ aPos.X() += pFrame->getFramePrintArea().Width();
+ aPos += pFrame->getFramePrintArea().Pos();
break;
case text::RelOrientation::PRINT_AREA:
- aPos += pFrame->getSwPrint().Pos();
+ aPos += pFrame->getFramePrintArea().Pos();
aPos.setX(aPos.getX() + nBaseOfstForFly);
break;
case text::RelOrientation::PAGE_RIGHT:
- aPos.setX(pPage->getSwFrame().Left() + pPage->getSwPrint().Right());
+ aPos.setX(pPage->geFrameArea().Left() + pPage->getFramePrintArea().Right());
break;
case text::RelOrientation::PAGE_PRINT_AREA:
- aPos.setX(pPage->getSwFrame().Left() + pPage->getSwPrint().Left());
+ aPos.setX(pPage->geFrameArea().Left() + pPage->getFramePrintArea().Left());
break;
case text::RelOrientation::PAGE_LEFT:
case text::RelOrientation::PAGE_FRAME:
- aPos.setX(pPage->getSwFrame().Left());
+ aPos.setX(pPage->geFrameArea().Left());
break;
case text::RelOrientation::FRAME:
aPos.setX(aPos.getX() + nBaseOfstForFly);
@@ -1254,11 +1254,11 @@ Size SwFEShell::GetGraphicDefaultSize() const
// size is (0,0). If this is the case the printing area of the upper
// of the anchor frame is taken.
const SwFrame* pAnchorFrame = pFly->GetAnchorFrame();
- aRet = pAnchorFrame->getSwPrint().SSize();
+ aRet = pAnchorFrame->getFramePrintArea().SSize();
if ( aRet.Width() == 0 && aRet.Height() == 0 &&
pAnchorFrame->GetUpper() )
{
- aRet = pAnchorFrame->GetUpper()->getSwPrint().SSize();
+ aRet = pAnchorFrame->GetUpper()->getFramePrintArea().SSize();
}
SwRect aBound;
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index c4248c71c0d6..706c49673947 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -274,7 +274,8 @@ void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd,
{
SwSelUnion *pUnion = &aUnions[i];
const SwTabFrame *pTable = pUnion->GetTable();
- if( !pTable->IsValid() && nLoopMax )
+
+ if( !pTable->isFrameAreaDefinitionValid() && nLoopMax )
{
bTableIsValid = false;
break;
@@ -287,19 +288,19 @@ void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd,
while( pRow && bTableIsValid )
{
- if( !pRow->IsValid() && nLoopMax )
+ if( !pRow->isFrameAreaDefinitionValid() && nLoopMax )
{
bTableIsValid = false;
break;
}
- if ( pRow->getSwFrame().IsOver( pUnion->GetUnion() ) )
+ if ( pRow->geFrameArea().IsOver( pUnion->GetUnion() ) )
{
const SwLayoutFrame *pCell = pRow->FirstCell();
while( bTableIsValid && pCell && pRow->IsAnLower( pCell ) )
{
- if( !pCell->IsValid() && nLoopMax )
+ if( !pCell->isFrameAreaDefinitionValid() && nLoopMax )
{
bTableIsValid = false;
break;
@@ -317,10 +318,10 @@ void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd,
if ( pCells )
{
- const Point aTopLeft( pCell->getSwFrame().TopLeft() );
- const Point aTopRight( pCell->getSwFrame().TopRight() );
- const Point aBottomLeft( pCell->getSwFrame().BottomLeft() );
- const Point aBottomRight( pCell->getSwFrame().BottomRight() );
+ const Point aTopLeft( pCell->geFrameArea().TopLeft() );
+ const Point aTopRight( pCell->geFrameArea().TopRight() );
+ const Point aBottomLeft( pCell->geFrameArea().BottomLeft() );
+ const Point aBottomRight( pCell->geFrameArea().BottomRight() );
if ( aTopLeft.getY() < aCurrentTopLeft.getY() ||
( aTopLeft.getY() == aCurrentTopLeft.getY() &&
@@ -388,11 +389,15 @@ void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd,
SwTabFrame *pTable = aUnions.front().GetTable();
while( pTable )
{
- if( pTable->IsValid() )
+ if( pTable->isFrameAreaDefinitionValid() )
+ {
pTable->InvalidatePos();
+ }
+
pTable->SetONECalcLowers();
pTable->Calc(pTable->getRootFrame()->GetCurrShell()->GetOut());
pTable->SetCompletePaint();
+
if( nullptr == (pTable = pTable->GetFollow()) )
break;
}
@@ -476,7 +481,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
SwRectFnSet aRectFnSet(pTable);
bool bRTL = pTable->IsRightToLeft();
- if( !pTable->IsValid() && nLoopMax )
+ if( !pTable->isFrameAreaDefinitionValid() && nLoopMax )
{
bTableIsValid = false;
break;
@@ -491,20 +496,19 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
while( pRow && bTableIsValid && bValidChartSel )
{
- if( !pRow->IsValid() && nLoopMax )
+ if( !pRow->isFrameAreaDefinitionValid() && nLoopMax )
{
bTableIsValid = false;
break;
}
- if( pRow->getSwFrame().IsOver( pUnion->GetUnion() ) )
+ if( pRow->geFrameArea().IsOver( pUnion->GetUnion() ) )
{
const SwLayoutFrame *pCell = pRow->FirstCell();
- while( bValidChartSel && bTableIsValid && pCell &&
- pRow->IsAnLower( pCell ) )
+ while( bValidChartSel && bTableIsValid && pCell && pRow->IsAnLower( pCell ) )
{
- if( !pCell->IsValid() && nLoopMax )
+ if( !pCell->isFrameAreaDefinitionValid() && nLoopMax )
{
bTableIsValid = false;
break;
@@ -512,7 +516,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
OSL_ENSURE( pCell->IsCellFrame(), "Frame without Cell" );
const SwRect& rUnion = pUnion->GetUnion(),
- & rFrameRect = pCell->getSwFrame();
+ & rFrameRect = pCell->geFrameArea();
const long nUnionRight = rUnion.Right();
const long nUnionBottom = rUnion.Bottom();
@@ -576,7 +580,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
for( n = 0 ; n < aCellFrames.size(); ++n )
{
const Sort_CellFrame& rCF = aCellFrames[ n ];
- if( aRectFnSet.GetTop(rCF.pFrame->getSwFrame()) != nYPos )
+ if( aRectFnSet.GetTop(rCF.pFrame->geFrameArea()) != nYPos )
{
// new row
if( n )
@@ -590,20 +594,20 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
}
}
nCellCnt = 1;
- nYPos = aRectFnSet.GetTop(rCF.pFrame->getSwFrame());
- nHeight = aRectFnSet.GetHeight(rCF.pFrame->getSwFrame());
+ nYPos = aRectFnSet.GetTop(rCF.pFrame->geFrameArea());
+ nHeight = aRectFnSet.GetHeight(rCF.pFrame->geFrameArea());
nXPos = bRTL ?
- aRectFnSet.GetLeft(rCF.pFrame->getSwFrame()) :
- aRectFnSet.GetRight(rCF.pFrame->getSwFrame());
+ aRectFnSet.GetLeft(rCF.pFrame->geFrameArea()) :
+ aRectFnSet.GetRight(rCF.pFrame->geFrameArea());
}
else if( nXPos == ( bRTL ?
- aRectFnSet.GetRight(rCF.pFrame->getSwFrame()) :
- aRectFnSet.GetLeft(rCF.pFrame->getSwFrame()) ) &&
- nHeight == aRectFnSet.GetHeight(rCF.pFrame->getSwFrame()) )
+ aRectFnSet.GetRight(rCF.pFrame->geFrameArea()) :
+ aRectFnSet.GetLeft(rCF.pFrame->geFrameArea()) ) &&
+ nHeight == aRectFnSet.GetHeight(rCF.pFrame->geFrameArea()) )
{
nXPos += ( bRTL ? (-1) : 1 ) *
- aRectFnSet.GetWidth(rCF.pFrame->getSwFrame());
+ aRectFnSet.GetWidth(rCF.pFrame->geFrameArea());
++nCellCnt;
}
else
@@ -626,13 +630,18 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
// otherwise quickly "calculate" table layout and start over
SwTabFrame *pTable = aUnions.front().GetTable();
+
for( SwSelUnions::size_type i = 0; i < aUnions.size(); ++i )
{
- if( pTable->IsValid() )
+ if( pTable->isFrameAreaDefinitionValid() )
+ {
pTable->InvalidatePos();
+ }
+
pTable->SetONECalcLowers();
pTable->Calc(pTable->getRootFrame()->GetCurrShell()->GetOut());
pTable->SetCompletePaint();
+
if( nullptr == (pTable = pTable->GetFollow()) )
break;
}
@@ -649,22 +658,22 @@ bool IsFrameInTableSel( const SwRect& rUnion, const SwFrame* pCell )
OSL_ENSURE( pCell->IsCellFrame(), "Frame without Gazelle" );
if( pCell->FindTabFrame()->IsVertical() )
- return rUnion.Right() >= pCell->getSwFrame().Right() &&
- rUnion.Left() <= pCell->getSwFrame().Left() &&
- (( rUnion.Top() <= pCell->getSwFrame().Top()+20 &&
- rUnion.Bottom() > pCell->getSwFrame().Top() ) ||
- ( rUnion.Top() >= pCell->getSwFrame().Top() &&
- rUnion.Bottom() < pCell->getSwFrame().Bottom() ));
+ return rUnion.Right() >= pCell->geFrameArea().Right() &&
+ rUnion.Left() <= pCell->geFrameArea().Left() &&
+ (( rUnion.Top() <= pCell->geFrameArea().Top()+20 &&
+ rUnion.Bottom() > pCell->geFrameArea().Top() ) ||
+ ( rUnion.Top() >= pCell->geFrameArea().Top() &&
+ rUnion.Bottom() < pCell->geFrameArea().Bottom() ));
return
- rUnion.Top() <= pCell->getSwFrame().Top() &&
- rUnion.Bottom() >= pCell->getSwFrame().Bottom() &&
+ rUnion.Top() <= pCell->geFrameArea().Top() &&
+ rUnion.Bottom() >= pCell->geFrameArea().Bottom() &&
- (( rUnion.Left() <= pCell->getSwFrame().Left()+20 &&
- rUnion.Right() > pCell->getSwFrame().Left() ) ||
+ (( rUnion.Left() <= pCell->geFrameArea().Left()+20 &&
+ rUnion.Right() > pCell->geFrameArea().Left() ) ||
- ( rUnion.Left() >= pCell->getSwFrame().Left() &&
- rUnion.Right() < pCell->getSwFrame().Right() ));
+ ( rUnion.Left() >= pCell->geFrameArea().Left() &&
+ rUnion.Right() < pCell->geFrameArea().Right() ));
}
bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes )
@@ -703,7 +712,7 @@ bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes )
while( pRow )
{
- if( pRow->getSwFrame().IsOver( pUnion->GetUnion() ) )
+ if( pRow->geFrameArea().IsOver( pUnion->GetUnion() ) )
{
const SwCellFrame* pUpperCell = nullptr;
const SwLayoutFrame *pCell = pRow->FirstCell();
@@ -772,7 +781,7 @@ bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes )
while( pRow )
{
- if( pRow->getSwFrame().IsOver( pUnion->GetUnion() ) )
+ if( pRow->geFrameArea().IsOver( pUnion->GetUnion() ) )
{
const SwLayoutFrame *pCell = pRow->FirstCell();
@@ -946,7 +955,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
while ( pRow )
{
- if ( pRow->getSwFrame().IsOver( rUnion ) )
+ if ( pRow->geFrameArea().IsOver( rUnion ) )
{
const SwLayoutFrame *pCell = pRow->FirstCell();
@@ -954,25 +963,25 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" );
// overlap in full width?
- if( rUnion.Top() <= pCell->getSwFrame().Top() &&
- rUnion.Bottom() >= pCell->getSwFrame().Bottom() )
+ if( rUnion.Top() <= pCell->geFrameArea().Top() &&
+ rUnion.Bottom() >= pCell->geFrameArea().Bottom() )
{
SwTableBox* pBox = const_cast<SwTableBox*>(static_cast<const SwCellFrame*>(pCell)->GetTabBox());
// only overlap to the right?
- if( ( rUnion.Left() - COLFUZZY ) <= pCell->getSwFrame().Left() &&
- ( rUnion.Right() - COLFUZZY ) > pCell->getSwFrame().Left() )
+ if( ( rUnion.Left() - COLFUZZY ) <= pCell->geFrameArea().Left() &&
+ ( rUnion.Right() - COLFUZZY ) > pCell->geFrameArea().Left() )
{
- if( ( rUnion.Right() + COLFUZZY ) < pCell->getSwFrame().Right() )
+ if( ( rUnion.Right() + COLFUZZY ) < pCell->geFrameArea().Right() )
{
sal_uInt16 nInsPos = pBox->GetUpper()->GetBoxPos( pBox )+1;
lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos );
pBox->ClaimFrameFormat();
SwFormatFrameSize aNew(
pBox->GetFrameFormat()->GetFrameSize() );
- nWidth = rUnion.Right() - pCell->getSwFrame().Left();
+ nWidth = rUnion.Right() - pCell->geFrameArea().Left();
nWidth = nWidth * aNew.GetWidth() /
- pCell->getSwFrame().Width();
+ pCell->geFrameArea().Width();
long nTmpWidth = aNew.GetWidth() - nWidth;
aNew.SetWidth( nWidth );
pBox->GetFrameFormat()->SetFormatAttr( aNew );
@@ -980,7 +989,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
pLastBox = pBox;
rBoxes.insert( pBox );
aPosArr.insert(
- CmpLPt( aRectFnSet.GetPos(pCell->getSwFrame()),
+ CmpLPt( aRectFnSet.GetPos(pCell->geFrameArea()),
pBox, aRectFnSet.IsVert() ) );
pBox = pBox->GetUpper()->GetTabBoxes()[ nInsPos ];
@@ -997,25 +1006,25 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
pLastBox = pBox;
rBoxes.insert( pBox );
aPosArr.insert(
- CmpLPt( aRectFnSet.GetPos(pCell->getSwFrame()),
+ CmpLPt( aRectFnSet.GetPos(pCell->geFrameArea()),
pBox, aRectFnSet.IsVert() ) );
}
}
// overlapping on left- or right-side
- else if( ( rUnion.Left() - COLFUZZY ) >= pCell->getSwFrame().Left() &&
- ( rUnion.Right() + COLFUZZY ) < pCell->getSwFrame().Right() )
+ else if( ( rUnion.Left() - COLFUZZY ) >= pCell->geFrameArea().Left() &&
+ ( rUnion.Right() + COLFUZZY ) < pCell->geFrameArea().Right() )
{
sal_uInt16 nInsPos = pBox->GetUpper()->GetBoxPos( pBox )+1;
lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos, 2 );
pBox->ClaimFrameFormat();
SwFormatFrameSize aNew(
pBox->GetFrameFormat()->GetFrameSize() );
- long nLeft = rUnion.Left() - pCell->getSwFrame().Left();
+ long nLeft = rUnion.Left() - pCell->geFrameArea().Left();
nLeft = nLeft * aNew.GetWidth() /
- pCell->getSwFrame().Width();
- long nRight = pCell->getSwFrame().Right() - rUnion.Right();
+ pCell->geFrameArea().Width();
+ long nRight = pCell->geFrameArea().Right() - rUnion.Right();
nRight = nRight * aNew.GetWidth() /
- pCell->getSwFrame().Width();
+ pCell->geFrameArea().Width();
nWidth = aNew.GetWidth() - nLeft - nRight;
aNew.SetWidth( nLeft );
@@ -1044,7 +1053,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
pLastBox = pBox;
rBoxes.insert( pBox );
aPosArr.insert(
- CmpLPt( aRectFnSet.GetPos(pCell->getSwFrame()),
+ CmpLPt( aRectFnSet.GetPos(pCell->geFrameArea()),
pBox, aRectFnSet.IsVert() ) );
pBox = pBox->GetUpper()->GetTabBoxes()[ nInsPos+1 ];
@@ -1056,22 +1065,22 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
pUndo->AddNewBox( pBox->GetSttIdx() );
}
// is right side of box part of the selected area?
- else if( ( pCell->getSwFrame().Right() - COLFUZZY ) < rUnion.Right() &&
- ( pCell->getSwFrame().Right() - COLFUZZY ) > rUnion.Left() &&
- ( pCell->getSwFrame().Left() + COLFUZZY ) < rUnion.Left() )
+ else if( ( pCell->geFrameArea().Right() - COLFUZZY ) < rUnion.Right() &&
+ ( pCell->geFrameArea().Right() - COLFUZZY ) > rUnion.Left() &&
+ ( pCell->geFrameArea().Left() + COLFUZZY ) < rUnion.Left() )
{
// then we should insert a new box and adjust the widths
sal_uInt16 nInsPos = pBox->GetUpper()->GetBoxPos( pBox )+1;
lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos );
SwFormatFrameSize aNew(pBox->GetFrameFormat()->GetFrameSize() );
- long nLeft = rUnion.Left() - pCell->getSwFrame().Left(),
- nRight = pCell->getSwFrame().Right() - rUnion.Left();
+ long nLeft = rUnion.Left() - pCell->geFrameArea().Left(),
+ nRight = pCell->geFrameArea().Right() - rUnion.Left();
nLeft = nLeft * aNew.GetWidth() /
- pCell->getSwFrame().Width();
+ pCell->geFrameArea().Width();
nRight = nRight * aNew.GetWidth() /
- pCell->getSwFrame().Width();
+ pCell->geFrameArea().Width();
aNew.SetWidth( nLeft );
pBox->ClaimFrameFormat()->SetFormatAttr( aNew );
@@ -1085,7 +1094,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
pLastBox = pBox;
rBoxes.insert( pBox );
aPosArr.insert( CmpLPt( Point( rUnion.Left(),
- pCell->getSwFrame().Top()), pBox, aRectFnSet.IsVert() ));
+ pCell->geFrameArea().Top()), pBox, aRectFnSet.IsVert() ));
if( pUndo )
pUndo->AddNewBox( pBox->GetSttIdx() );
@@ -1490,7 +1499,7 @@ static SwTwips lcl_CalcWish( const SwLayoutFrame *pCell, long nWish,
const bool bRTL = pCell->IsRightToLeft();
SwTwips nRet = bRTL ?
- nAct - pCell->getSwFrame().Width() :
+ nAct - pCell->geFrameArea().Width() :
0;
while ( pTmp )
@@ -1608,12 +1617,12 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
if ( pTab->GetTable()->IsNewModel() )
{
- nSX = aRectFnSet.GetLeft(rpStart->getSwFrame());
- nSX2 = aRectFnSet.GetRight(rpStart->getSwFrame());
+ nSX = aRectFnSet.GetLeft(rpStart->geFrameArea());
+ nSX2 = aRectFnSet.GetRight(rpStart->geFrameArea());
}
else
{
- const SwTwips nPrtWidth = aRectFnSet.GetWidth(pTab->getSwPrint());
+ const SwTwips nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
nSX = ::lcl_CalcWish( rpStart, nWish, nPrtWidth ) + aRectFnSet.GetPrtLeft(*pTab);
nSX2 = nSX + (rpStart->GetFormat()->GetFrameSize().GetWidth() * nPrtWidth / nWish);
}
@@ -1622,10 +1631,10 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
while ( pTmp &&
(!pTmp->IsCellFrame() ||
- ( ( ! bRTL && aRectFnSet.GetLeft(pTmp->getSwFrame()) < nSX &&
- aRectFnSet.GetRight(pTmp->getSwFrame())< nSX2 ) ||
- ( bRTL && aRectFnSet.GetLeft(pTmp->getSwFrame()) > nSX &&
- aRectFnSet.GetRight(pTmp->getSwFrame())> nSX2 ) ) ) )
+ ( ( ! bRTL && aRectFnSet.GetLeft(pTmp->geFrameArea()) < nSX &&
+ aRectFnSet.GetRight(pTmp->geFrameArea())< nSX2 ) ||
+ ( bRTL && aRectFnSet.GetLeft(pTmp->geFrameArea()) > nSX &&
+ aRectFnSet.GetRight(pTmp->geFrameArea())> nSX2 ) ) ) )
pTmp = pTmp->GetNextLayoutLeaf();
if ( pTmp )
@@ -1657,11 +1666,11 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
if ( pTab->GetTable()->IsNewModel() )
{
- nEX = aRectFnSet.GetLeft(rpEnd->getSwFrame());
+ nEX = aRectFnSet.GetLeft(rpEnd->geFrameArea());
}
else
{
- const SwTwips nPrtWidth = aRectFnSet.GetWidth(pTab->getSwPrint());
+ const SwTwips nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
nEX = ::lcl_CalcWish( rpEnd, nWish, nPrtWidth ) + aRectFnSet.GetPrtLeft(*pTab);
}
@@ -1674,8 +1683,8 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
while( !rpEnd->IsCellFrame() )
rpEnd = rpEnd->GetUpper();
- while ( ( bRTL && aRectFnSet.GetLeft(rpEnd->getSwFrame()) < nEX ) ||
- ( ! bRTL && aRectFnSet.GetLeft(rpEnd->getSwFrame()) > nEX ) )
+ while ( ( bRTL && aRectFnSet.GetLeft(rpEnd->geFrameArea()) < nEX ) ||
+ ( ! bRTL && aRectFnSet.GetLeft(rpEnd->geFrameArea()) > nEX ) )
{
const SwLayoutFrame* pTmpLeaf = rpEnd->GetPrevLayoutLeaf();
if( !pTmpLeaf || !pTab->IsAnLower( pTmpLeaf ) )
@@ -1692,10 +1701,10 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
{
const SwLayoutFrame *pTmpLeaf = rpStart;
pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf();
- while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getSwFrame()) > nEX ) // first skip line
+ while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->geFrameArea()) > nEX ) // first skip line
pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf();
- while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getSwFrame()) < nSX &&
- aRectFnSet.GetRight(pTmpLeaf->getSwFrame())< nSX2 )
+ while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->geFrameArea()) < nSX &&
+ aRectFnSet.GetRight(pTmpLeaf->geFrameArea())< nSX2 )
pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf();
const SwTabFrame *pTmpTab = rpStart->FindTabFrame();
if ( !pTmpTab->IsAnLower( pTmpLeaf ) )
@@ -1703,8 +1712,8 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
pTmpTab = pTmpTab->GetFollow();
rpStart = pTmpTab->FirstCell();
while ( rpStart &&
- aRectFnSet.GetLeft(rpStart->getSwFrame()) < nSX &&
- aRectFnSet.GetRight(rpStart->getSwFrame())< nSX2 )
+ aRectFnSet.GetLeft(rpStart->geFrameArea()) < nSX &&
+ aRectFnSet.GetRight(rpStart->geFrameArea())< nSX2 )
rpStart = rpStart->GetNextLayoutLeaf();
}
else
@@ -1714,9 +1723,9 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
{
const SwLayoutFrame *pTmpLeaf = rpEnd;
pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf();
- while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getSwFrame()) < nEX ) // skip the line for now
+ while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->geFrameArea()) < nEX ) // skip the line for now
pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf();
- while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getSwFrame()) > nEX )
+ while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->geFrameArea()) > nEX )
pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf();
const SwTabFrame *pTmpTab = rpEnd->FindTabFrame();
if ( !pTmpLeaf || !pTmpTab->IsAnLower( pTmpLeaf ) )
@@ -1726,7 +1735,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart,
rpEnd = pTmpTab->FindLastContent()->GetUpper();
while( !rpEnd->IsCellFrame() )
rpEnd = rpEnd->GetUpper();
- while ( aRectFnSet.GetLeft(rpEnd->getSwFrame()) > nEX )
+ while ( aRectFnSet.GetLeft(rpEnd->geFrameArea()) > nEX )
rpEnd = rpEnd->GetPrevLayoutLeaf();
}
else
@@ -1765,12 +1774,12 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart,
else
{
SwRectFnSet aRectFnSet(pTable);
- long nSttTop = aRectFnSet.GetTop(pStart->getSwFrame());
- long nEndTop = aRectFnSet.GetTop(pEnd->getSwFrame());
+ long nSttTop = aRectFnSet.GetTop(pStart->geFrameArea());
+ long nEndTop = aRectFnSet.GetTop(pEnd->geFrameArea());
if( nSttTop == nEndTop )
{
- if( aRectFnSet.GetLeft(pStart->getSwFrame()) >
- aRectFnSet.GetLeft(pEnd->getSwFrame()) )
+ if( aRectFnSet.GetLeft(pStart->geFrameArea()) >
+ aRectFnSet.GetLeft(pEnd->geFrameArea()) )
bExchange = true;
}
else if( aRectFnSet.IsVert() == ( nSttTop < nEndTop ) )
@@ -1805,7 +1814,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart,
{
SwRectFnSet aRectFnSet(pTable);
const long nOfst = aRectFnSet.GetPrtLeft(*pTable);
- const long nPrtWidth = aRectFnSet.GetWidth(pTable->getSwPrint());
+ const long nPrtWidth = aRectFnSet.GetWidth(pTable->getFramePrintArea());
long nSt1 = ::lcl_CalcWish( pStart, nWish, nPrtWidth ) + nOfst;
long nEd1 = ::lcl_CalcWish( pEnd, nWish, nPrtWidth ) + nOfst;
@@ -1817,13 +1826,13 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart,
long nSt2;
long nEd2;
if( pTable->IsAnLower( pStart ) )
- nSt2 = aRectFnSet.GetTop(pStart->getSwFrame());
+ nSt2 = aRectFnSet.GetTop(pStart->geFrameArea());
else
- nSt2 = aRectFnSet.GetTop(pTable->getSwFrame());
+ nSt2 = aRectFnSet.GetTop(pTable->geFrameArea());
if( pTable->IsAnLower( pEnd ) )
- nEd2 = aRectFnSet.GetBottom(pEnd->getSwFrame());
+ nEd2 = aRectFnSet.GetBottom(pEnd->geFrameArea());
else
- nEd2 = aRectFnSet.GetBottom(pTable->getSwFrame());
+ nEd2 = aRectFnSet.GetBottom(pTable->geFrameArea());
Point aSt, aEd;
if( nSt1 > nEd1 )
{
@@ -1862,7 +1871,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart,
pTable->GetFirstNonHeadlineRow() :
static_cast<const SwLayoutFrame*>(pTable->Lower());
- while ( pRow && !pRow->getSwFrame().IsOver( aUnion ) )
+ while ( pRow && !pRow->geFrameArea().IsOver( aUnion ) )
pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext());
// #i31976#
@@ -1908,8 +1917,8 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart,
if ( pFirst && pLast ) //Robust
{
- aUnion = pFirst->getSwFrame();
- aUnion.Union( pLast->getSwFrame() );
+ aUnion = pFirst->geFrameArea();
+ aUnion.Union( pLast->geFrameArea() );
}
else
aUnion.Width( 0 );
@@ -1978,7 +1987,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv,
while ( pRow )
{
- if ( pRow->getSwFrame().IsOver( rSelUnion.GetUnion() ) )
+ if ( pRow->geFrameArea().IsOver( rSelUnion.GetUnion() ) )
{
const SwLayoutFrame *pCell = pRow->FirstCell();
@@ -1987,7 +1996,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv,
OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" );
if( ::IsFrameInTableSel( rSelUnion.GetUnion(), pCell ) )
{
- if( aRectFnSet.GetWidth(pCell->getSwFrame()) < nMinValue )
+ if( aRectFnSet.GetWidth(pCell->geFrameArea()) < nMinValue )
return false;
}
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 2fab06c595d8..a2d5307feabd 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -104,7 +104,7 @@ public:
if ( maUnclippedFrame.HasArea( ) )
return maUnclippedFrame;
else
- return getSwFrame();
+ return geFrameArea();
}
/** method to determine, if a format on the Writer fly frame is possible
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index a4c6b284cb0f..2f472ad8fad3 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -118,52 +118,81 @@ namespace drawinglayer { namespace attribute {
/// Helper class to isolate geometry-defining members of SwFrame
/// and to control their accesses. Moved to own class to have no
-/// hidden accesses to 'private' members anymore
-class SW_DLLPUBLIC SwFrameRect
+/// hidden accesses to 'private' members anymore.
+///
+/// Added most important flags about the state of this geometric
+/// information and if it is valid or not
+class SW_DLLPUBLIC SwFrameAreaDefinition
{
private:
- SwRect maFrameRect; // absolute position in document and size of the Frame
- SwRect maPrintRect; // position relatively to Frame and size of PrtArea
+ // The absolute position and size of the SwFrame in the document.
+ // This values are set by the layouter implementations
+ SwRect maFrameArea;
+
+ // The 'inner' Frame Area defined by a SwRect relative to FrameArea:
+ // When identical to FrameArea, Pos() will be (0, 0) and Size identical.
+ SwRect maFramePrintArea; // position relatively to Frame and size of PrtArea
+
+ // bitfield
+ bool mbFrameAreaPositionValid : 1;
+ bool mbFrameAreaSizeValid : 1;
+ bool mbFramePrintAreaValid : 1;
+
+protected:
+ // write access to mbFrameAreaPositionValid/mbFrameAreaSizeValid
+ void setFrameAreaPositionValid(bool bNew);
+ void setFrameAreaSizeValid(bool bNew);
+ void setFramePrintAreaValid(bool bNew);
public:
- SwFrameRect();
+ SwFrameAreaDefinition();
+
+ // read access to mbFrameAreaPositionValid/mbFrameAreaSizeValid
+ bool isFrameAreaPositionValid() const { return mbFrameAreaPositionValid; }
+ bool isFrameAreaSizeValid() const { return mbFrameAreaSizeValid; }
+ bool isFramePrintAreaValid() const { return mbFramePrintAreaValid; }
- // read accesses - only const access allowed. Do *not* const_cast results,
- // it is necessary to track changes. use The 'set' methods instead
- const SwRect& getSwFrame() const { return maFrameRect; }
- const SwRect& getSwPrint() const { return maPrintRect; }
+ // syntactic sugar: test whole FrameAreaDefinition
+ // bool IsValid() const { return isFrameAreaPositionValid() && isFrameAreaSizeValid() && isFramePrintAreaValid(); }
+ bool isFrameAreaDefinitionValid() const { return isFrameAreaPositionValid() && isFrameAreaSizeValid() && isFramePrintAreaValid(); }
- // helper class(es) for FrameRect/PrintRect manipulation. These
+ // read accesses to FrameArea definitions - only const access allowed.
+ // Do *not* const_cast results, it is necessary to track changes. use
+ // the below offered WriteAccess helper classes instead
+ const SwRect& geFrameArea() const { return maFrameArea; }
+ const SwRect& getFramePrintArea() const { return maFramePrintArea; }
+
+ // helper class(es) for FrameArea manipulation. These
// have to be used to apply changes. They hold a copy of the SwRect
// for manipulation, it gets written back at destruction. Thus this
// mechanism depends on scope usage, take care. It prevents errors using
// different instances of SwFrame in get/set methods which is more safe
- class FrameWriteAccess : public SwRect
+ class FrameAreaWriteAccess : public SwRect
{
private:
- SwFrameRect& mrTarget;
+ SwFrameAreaDefinition& mrTarget;
- FrameWriteAccess(const FrameWriteAccess&) = delete;
- FrameWriteAccess& operator=(const FrameWriteAccess&) = delete;
+ FrameAreaWriteAccess(const FrameAreaWriteAccess&) = delete;
+ FrameAreaWriteAccess& operator=(const FrameAreaWriteAccess&) = delete;
public:
- FrameWriteAccess(SwFrameRect& rTarget) : SwRect(rTarget.getSwFrame()), mrTarget(rTarget) {}
- ~FrameWriteAccess();
+ FrameAreaWriteAccess(SwFrameAreaDefinition& rTarget) : SwRect(rTarget.geFrameArea()), mrTarget(rTarget) {}
+ ~FrameAreaWriteAccess();
void setSwRect(const SwRect& rNew) { *reinterpret_cast< SwRect* >(this) = rNew; }
};
// same for print
- class PrintWriteAccess : public SwRect
+ class FramePrintAreaWriteAccess : public SwRect
{
private:
- SwFrameRect& mrTarget;
+ SwFrameAreaDefinition& mrTarget;
- PrintWriteAccess(const PrintWriteAccess&) = delete;
- PrintWriteAccess& operator=(const PrintWriteAccess&) = delete;
+ FramePrintAreaWriteAccess(const FramePrintAreaWriteAccess&) = delete;
+ FramePrintAreaWriteAccess& operator=(const FramePrintAreaWriteAccess&) = delete;
public:
- PrintWriteAccess(SwFrameRect& rTarget) : SwRect(rTarget.getSwPrint()), mrTarget(rTarget) {}
- ~PrintWriteAccess();
+ FramePrintAreaWriteAccess(SwFrameAreaDefinition& rTarget) : SwRect(rTarget.getFramePrintArea()), mrTarget(rTarget) {}
+ ~FramePrintAreaWriteAccess();
void setSwRect(const SwRect& rNew) { *reinterpret_cast< SwRect* >(this) = rNew; }
};
};
@@ -175,7 +204,7 @@ public:
* level: pages, headers, footers, etc. (Inside a paragraph SwLinePortion
* instances are used.)
*/
-class SW_DLLPUBLIC SwFrame : public SwFrameRect, public SwClient, public SfxBroadcaster
+class SW_DLLPUBLIC SwFrame : public SwFrameAreaDefinition, public SwClient, public SfxBroadcaster
{
// the hidden Frame
friend class SwFlowFrame;
@@ -289,15 +318,14 @@ protected:
bool mbVertLR : 1;
- bool mbValidPos : 1;
- bool mbValidPrtArea : 1;
- bool mbValidSize : 1;
bool mbValidLineNum : 1;
bool mbFixSize : 1;
+
// if true, frame will be painted completely even content was changed
// only partially. For ContentFrames a border (from Action) will exclusively
// painted if <mbCompletePaint> is true.
bool mbCompletePaint : 1;
+
bool mbRetouche : 1; // frame is responsible for retouching
bool mbInfInvalid : 1; // InfoFlags are invalid
@@ -611,11 +639,7 @@ public:
void ValidateLineNum() { mbValidLineNum = true; }
- bool GetValidPosFlag() const { return mbValidPos; }
- bool GetValidPrtAreaFlag()const { return mbValidPrtArea; }
- bool GetValidSizeFlag() const { return mbValidSize; }
bool GetValidLineNumFlag()const { return mbValidLineNum; }
- bool IsValid() const { return mbValidPos && mbValidSize && mbValidPrtArea; }
// Only invalidate Frame
// #i28701# - add call to method <ActionOnInvalidation(..)>
@@ -626,25 +650,25 @@ public:
// invalidate.
void InvalidateSize_()
{
- if ( mbValidSize && InvalidationAllowed( INVALID_SIZE ) )
+ if ( isFrameAreaSizeValid() && InvalidationAllowed( INVALID_SIZE ) )
{
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
ActionOnInvalidation( INVALID_SIZE );
}
}
void InvalidatePrt_()
{
- if ( mbValidPrtArea && InvalidationAllowed( INVALID_PRTAREA ) )
+ if ( isFramePrintAreaValid() && InvalidationAllowed( INVALID_PRTAREA ) )
{
- mbValidPrtArea = false;
+ setFramePrintAreaValid(false);
ActionOnInvalidation( INVALID_PRTAREA );
}
}
void InvalidatePos_()
{
- if ( mbValidPos && InvalidationAllowed( INVALID_POS ) )
+ if ( isFrameAreaPositionValid() && InvalidationAllowed( INVALID_POS ) )
{
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
ActionOnInvalidation( INVALID_POS );
}
}
@@ -658,10 +682,11 @@ public:
}
void InvalidateAll_()
{
- if ( ( mbValidSize || mbValidPrtArea || mbValidPos ) &&
- InvalidationAllowed( INVALID_ALL ) )
+ if ( ( isFrameAreaSizeValid() || isFramePrintAreaValid() || isFrameAreaPositionValid() ) && InvalidationAllowed( INVALID_ALL ) )
{
- mbValidSize = mbValidPrtArea = mbValidPos = false;
+ setFrameAreaSizeValid(false);
+ setFrameAreaPositionValid(false);
+ setFramePrintAreaValid(false);
ActionOnInvalidation( INVALID_ALL );
}
}
@@ -882,18 +907,24 @@ inline const SwLayoutFrame *SwFrame::GetPrevLayoutLeaf() const
inline void SwFrame::InvalidateSize()
{
- if ( mbValidSize )
+ if ( isFrameAreaSizeValid() )
+ {
ImplInvalidateSize();
+ }
}
inline void SwFrame::InvalidatePrt()
{
- if ( mbValidPrtArea )
+ if ( isFramePrintAreaValid() )
+ {
ImplInvalidatePrt();
+ }
}
inline void SwFrame::InvalidatePos()
{
- if ( mbValidPos )
+ if ( isFrameAreaPositionValid() )
+ {
ImplInvalidatePos();
+ }
}
inline void SwFrame::InvalidateLineNum()
{
@@ -904,9 +935,14 @@ inline void SwFrame::InvalidateAll()
{
if ( InvalidationAllowed( INVALID_ALL ) )
{
- if ( mbValidPrtArea && mbValidSize && mbValidPos )
+ if ( isFramePrintAreaValid() && isFrameAreaSizeValid() && isFrameAreaPositionValid() )
+ {
ImplInvalidatePos();
- mbValidPrtArea = mbValidSize = mbValidPos = false;
+ }
+
+ setFrameAreaSizeValid(false);
+ setFrameAreaPositionValid(false);
+ setFramePrintAreaValid(false);
// #i28701#
ActionOnInvalidation( INVALID_ALL );
@@ -922,8 +958,10 @@ inline void SwFrame::InvalidateNextPos( bool bNoFootnote )
inline void SwFrame::OptCalc() const
{
- if ( !mbValidPos || !mbValidPrtArea || !mbValidSize )
+ if ( !isFrameAreaPositionValid() || !isFramePrintAreaValid() || !isFrameAreaSizeValid() )
+ {
const_cast<SwFrame*>(this)->OptPrepareMake();
+ }
}
inline const SwPageFrame *SwFrame::FindPageFrame() const
{
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index d2e276a598f6..003fbba8c713 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -187,7 +187,7 @@ public:
SwFrameNotify( SwFrame *pFrame );
~SwFrameNotify() COVERITY_NOEXCEPT_FALSE;
- const SwRect &getSwFrame() const { return maFrame; }
+ const SwRect &geFrameArea() const { return maFrame; }
void SetInvaKeep() { mbInvaKeep = true; }
};
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 104716e14133..ef0216fbe3de 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()->getSwFrame() ) != GetObjRect() );
+ ( aTmpRect.Intersection( GetPageFrame()->geFrameArea() ) != GetObjRect() );
}
return bOutsidePage;
@@ -341,7 +341,7 @@ void SwAnchoredDrawObject::MakeObjPos()
// the anchor frame is valid.
if ( dynamic_cast< const SwDrawVirtObj* >(GetDrawObj()) == nullptr &&
!pDrawContact->ObjAnchoredAsChar() &&
- GetAnchorFrame()->IsValid() )
+ GetAnchorFrame()->isFrameAreaDefinitionValid() )
{
pDrawContact->ChkPage();
}
@@ -351,7 +351,7 @@ void SwAnchoredDrawObject::MakeObjPos()
if ( mbCaptureAfterLayoutDirChange &&
GetPageFrame() )
{
- SwRect aPageRect( GetPageFrame()->getSwFrame() );
+ SwRect aPageRect( GetPageFrame()->geFrameArea() );
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->getSwFrame()) );
+ const Point aAnchPos( aRectFnSet.GetPos(pAnchorFrame->geFrameArea()) );
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()->getSwPrint().SVRect();
+ aPageRect = GetPageFrame()->getFramePrintArea().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()->getSwPrint().SVRect();
+ aPageRect = GetPageFrame()->getFramePrintArea().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 159dcd6e22b2..3352af2cd7e0 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->getSwFrame().Left();
+ return maLastCharRect.Left() - pFrame->geFrameArea().Left();
}
SwTwips SwAnchoredObject::GetRelCharY( const SwFrame* pFrame ) const
{
- return maLastCharRect.Bottom() - pFrame->getSwFrame().Top();
+ return maLastCharRect.Bottom() - pFrame->geFrameArea().Top();
}
void SwAnchoredObject::AddLastCharY( long nDiff )
@@ -783,7 +783,7 @@ bool SwAnchoredObject::OverlapsPrevColumn() const
SwRect aChkRect;
while ( pTmpColFrame )
{
- aChkRect.Union( pTmpColFrame->getSwFrame() );
+ aChkRect.Union( pTmpColFrame->geFrameArea() );
pTmpColFrame = pTmpColFrame->GetPrev();
}
bOverlapsPrevColumn = GetObjRect().IsOver( aChkRect );
@@ -805,7 +805,7 @@ Point SwAnchoredObject::GetRelPosToAnchorFrame() const
assert(GetAnchorFrame());
aRelPos = GetObjRect().Pos();
- aRelPos -= GetAnchorFrame()->getSwFrame().Pos();
+ aRelPos -= GetAnchorFrame()->geFrameArea().Pos();
return aRelPos;
}
@@ -848,12 +848,12 @@ Point SwAnchoredObject::GetRelPosToPageFrame( const bool _bFollowTextFlow,
}
if ( pFrame->IsCellFrame() )
{
- aRelPos -= ( pFrame->getSwFrame().Pos() + pFrame->getSwPrint().Pos() );
+ aRelPos -= ( pFrame->geFrameArea().Pos() + pFrame->getFramePrintArea().Pos() );
_obRelToTableCell = true;
}
else
{
- aRelPos -= pFrame->getSwFrame().Pos();
+ aRelPos -= pFrame->geFrameArea().Pos();
}
return aRelPos;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index ea6c830da0a0..308794c5efc6 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->getSwPrint();
+ aRet = pFrame->getFramePrintArea();
else
{
- aRet = pFrame->getSwFrame();
+ aRet = pFrame->geFrameArea();
--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->getSwPrint();
+ aRet = pFrame->getFramePrintArea();
else
- aRet = pFrame->getSwFrame();
+ aRet = pFrame->geFrameArea();
}
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->getSwFrame().SSize() : pRef->getSwPrint().SSize() );
+ Size aActSz ( pRef == pFly ? pFly->geFrameArea().SSize() : pRef->getFramePrintArea().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->getSwFrame().Pos();
- aPos -= pRef->getSwPrint().Pos();
+ aPos -= pRef->geFrameArea().Pos();
+ aPos -= pRef->getFramePrintArea().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 09b6a56793ac..bc7eecd1e606 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->getSwPrint()) -
- aRectFnSet.GetWidth(GetUpper()->getSwPrint()) ) > 1 ) {
+ if( std::abs( fnRectX.GetWidth(pNewUpper->getFramePrintArea()) -
+ aRectFnSet.GetWidth(GetUpper()->getFramePrintArea()) ) > 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, getSwFrame() );
+ nMoveAnyway |= BwdMoveNecessary( pOldPage, geFrameArea() );
{
const IDocumentSettingAccess& rIDSA = pNewPage->GetFormat()->getIDocumentSettingAccess();
SwTwips nSpace = 0;
- SwRect aRect( pNewUpper->getSwPrint() );
- aRect.Pos() += pNewUpper->getSwFrame().Pos();
+ SwRect aRect( pNewUpper->getFramePrintArea() );
+ aRect.Pos() += pNewUpper->geFrameArea().Pos();
const SwFrame *pPrevFrame = pNewUpper->Lower();
while ( pPrevFrame )
{
- SwTwips nNewTop = fnRectX.GetBottom(pPrevFrame->getSwFrame());
+ SwTwips nNewTop = fnRectX.GetBottom(pPrevFrame->geFrameArea());
// 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->getSwPrint()) &&
+ !fnRectX.GetWidth(pNewUpper->getFramePrintArea()) &&
( pNewUpper->GetUpper()->GetPrev() ||
pNewUpper->GetUpper()->GetNext() );
}
@@ -299,7 +299,7 @@ void SwFrame::PrepareMake(vcl::RenderContext* pRenderContext)
if ( !pFrame )
return; //Oioioioi ...
- if ( !pFrame->IsValid() )
+ if ( !pFrame->isFrameAreaDefinitionValid() )
{
// A small interference that hopefully improves on the stability:
// If I'm Follow AND neighbor of a Frame before me, it would delete
@@ -360,8 +360,10 @@ void SwFrame::OptPrepareMake()
if ( !GetUpper() )
return;
}
- if ( GetPrev() && !GetPrev()->IsValid() )
+ if ( GetPrev() && !GetPrev()->isFrameAreaDefinitionValid() )
+ {
PrepareMake(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr);
+ }
else
{
StackHack aHack;
@@ -408,7 +410,7 @@ void SwFrame::PrepareCursor()
if ( !pFrame )
return; //Oioioioi ...
- if ( !pFrame->IsValid() )
+ if ( !pFrame->isFrameAreaDefinitionValid() )
{
// A small interference that hopefully improves on the stability:
// If I'm Follow AND neighbor of a Frame before me, it would delete
@@ -471,9 +473,9 @@ static SwFrame* lcl_NotHiddenPrev( SwFrame* pFrame )
void SwFrame::MakePos()
{
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
{
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
bool bUseUpper = false;
SwFrame* pPrv = lcl_Prev( this );
if ( pPrv &&
@@ -489,7 +491,7 @@ void SwFrame::MakePos()
{
pPrv->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); // This may cause Prev to vanish!
}
- else if ( pPrv->getSwFrame().Top() == 0 )
+ else if ( pPrv->geFrameArea().Top() == 0 )
{
bUseUpper = true;
}
@@ -500,8 +502,8 @@ void SwFrame::MakePos()
SwRectFnSet aRectFnSet((IsCellFrame() && GetUpper() ? GetUpper() : this));
if ( !bUseUpper && pPrv )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
- aFrm.Pos( pPrv->getSwFrame().Pos() );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aFrm.Pos( pPrv->geFrameArea().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
@@ -513,26 +515,26 @@ void SwFrame::MakePos()
}
else
{
- aRectFnSet.SetPosX( aFrm, aRectFnSet.GetLeft(aFrm) + aRectFnSet.GetWidth(pPrv->getSwFrame()) );
+ aRectFnSet.SetPosX( aFrm, aRectFnSet.GetLeft(aFrm) + aRectFnSet.GetWidth(pPrv->geFrameArea()) );
}
// cells may now leave their uppers
if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType && !mbReverse )
{
- aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + pPrv->getSwFrame().Width());
+ aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + pPrv->geFrameArea().Width());
}
}
else if( aRectFnSet.IsVert() && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
{
- aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->getSwFrame().Width());
+ aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->geFrameArea().Width());
}
else
{
if ( aRectFnSet.IsVertL2R() )
{
- aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->getSwFrame().Width());
+ aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->geFrameArea().Width());
}
else
{
@@ -542,7 +544,7 @@ void SwFrame::MakePos()
}
else
{
- aFrm.Pos().setY(aFrm.Pos().getY() + pPrv->getSwFrame().Height());
+ aFrm.Pos().setY(aFrm.Pos().getY() + pPrv->geFrameArea().Height());
}
}
else if ( GetUpper() )
@@ -569,8 +571,8 @@ void SwFrame::MakePos()
pPrv = lcl_Prev( this, false );
if ( !bUseUpper && pPrv )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
- aFrm.Pos( pPrv->getSwFrame().Pos() );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aFrm.Pos( pPrv->geFrameArea().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
@@ -582,20 +584,20 @@ void SwFrame::MakePos()
}
else
{
- aRectFnSet.SetPosX( aFrm, aRectFnSet.GetLeft(aFrm) + aRectFnSet.GetWidth(pPrv->getSwFrame()) );
+ aRectFnSet.SetPosX( aFrm, aRectFnSet.GetLeft(aFrm) + aRectFnSet.GetWidth(pPrv->geFrameArea()) );
}
// cells may now leave their uppers
if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType && !mbReverse )
{
- aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + pPrv->getSwFrame().Width());
+ aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + pPrv->geFrameArea().Width());
}
}
else if( aRectFnSet.IsVert() && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
{
- aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->getSwFrame().Width());
+ aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->geFrameArea().Width());
}
else
{
@@ -604,13 +606,13 @@ void SwFrame::MakePos()
}
else
{
- aFrm.Pos().setY(aFrm.Pos().getY() + pPrv->getSwFrame().Height());
+ aFrm.Pos().setY(aFrm.Pos().getY() + pPrv->geFrameArea().Height());
}
}
else
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
- aFrm.Pos( GetUpper()->getSwFrame().Pos() );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aFrm.Pos( GetUpper()->geFrameArea().Pos() );
if( GetUpper()->IsFlyFrame() )
{
@@ -618,40 +620,40 @@ void SwFrame::MakePos()
}
else
{
- aFrm.Pos() += GetUpper()->getSwPrint().Pos();
+ aFrm.Pos() += GetUpper()->getFramePrintArea().Pos();
}
if( FRM_NEIGHBOUR & nMyType && IsRightToLeft() )
{
if( aRectFnSet.IsVert() )
{
- aFrm.Pos().setY(aFrm.Pos().getY() + GetUpper()->getSwPrint().Height() - aFrm.Height());
+ aFrm.Pos().setY(aFrm.Pos().getY() + GetUpper()->getFramePrintArea().Height() - aFrm.Height());
}
else
{
- aFrm.Pos().setX(aFrm.Pos().getX() + GetUpper()->getSwPrint().Width() - aFrm.Width());
+ aFrm.Pos().setX(aFrm.Pos().getX() + GetUpper()->getFramePrintArea().Width() - aFrm.Width());
}
}
else if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && FRM_NOTE_VERT & nMyType && !mbReverse )
{
- aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + GetUpper()->getSwPrint().Width());
+ aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + GetUpper()->getFramePrintArea().Width());
}
}
}
else
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().setX(0);
aFrm.Pos().setY(0);
}
if( IsBodyFrame() && aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && !mbReverse && GetUpper() )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
- aFrm.Pos().setX(aFrm.Pos().getX() + GetUpper()->getSwPrint().Width() - aFrm.Width());
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aFrm.Pos().setX(aFrm.Pos().getX() + GetUpper()->getFramePrintArea().Width() - aFrm.Width());
}
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
}
}
@@ -668,13 +670,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->getSwFrame().Top() != FAR_AWAY &&
+ if( pFly->geFrameArea().Top() != FAR_AWAY &&
( pFrame->IsPageFrame() ? pFly->IsFlyLayFrame() :
( pFly->IsFlyAtContentFrame() &&
( pFrame->IsBodyFrame() ? pFly->GetAnchorFrame()->IsInDocBody() :
pFly->GetAnchorFrame()->IsInFootnote() ) ) ) )
{
- nTmp = pFly->getSwFrame().Bottom();
+ nTmp = pFly->geFrameArea().Bottom();
}
}
else
@@ -691,7 +693,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 = getSwFrame().Top() + nTop;
+ long nBot = geFrameArea().Top() + nTop;
const SwFrame *pFrame = Lower();
while (pFrame)
{
@@ -700,13 +702,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->getSwFrame().Height();
+ nTmp += pCnt->geFrameArea().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->getSwPrint().Height();
+ - pCnt->getFramePrintArea().Height();
}
else if (pCnt->IsSctFrame())
{
@@ -720,22 +722,22 @@ size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const
}
// OD 29.10.2002 #97265# - consider invalid body frame properties
if (pFrame->IsBodyFrame() &&
- (!pFrame->GetValidSizeFlag() ||
- !pFrame->GetValidPrtAreaFlag()) &&
- (pFrame->getSwFrame().Height() < pFrame->getSwPrint().Height())
+ (!pFrame->isFrameAreaSizeValid() ||
+ !pFrame->isFramePrintAreaValid()) &&
+ (pFrame->geFrameArea().Height() < pFrame->getFramePrintArea().Height())
)
{
- nTmp = std::min(nTmp, pFrame->getSwFrame().Height());
+ nTmp = std::min(nTmp, pFrame->geFrameArea().Height());
}
else
{
// OD 30.10.2002 #97265# - assert invalid lower property
- OSL_ENSURE(!(pFrame->getSwFrame().Height() < pFrame->getSwPrint().Height()),
+ OSL_ENSURE(!(pFrame->geFrameArea().Height() < pFrame->getFramePrintArea().Height()),
"SwPageFrame::GetContentHeight(): Lower with frame height < printing height");
- nTmp += pFrame->getSwFrame().Height() - pFrame->getSwPrint().Height();
+ nTmp += pFrame->geFrameArea().Height() - pFrame->getFramePrintArea().Height();
}
if (!pFrame->IsBodyFrame())
- nTmp = std::min(nTmp, pFrame->getSwFrame().Height());
+ nTmp = std::min(nTmp, pFrame->geFrameArea().Height());
nBot += nTmp;
// Here we check whether paragraph anchored objects
// protrude outside the Body/FootnoteCont.
@@ -748,7 +750,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 -= getSwFrame().Top();
+ nBot -= geFrameArea().Top();
return nBot;
}
@@ -757,33 +759,34 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
PROTOCOL_ENTER( this, PROT::MakeAll, DbgAction::NONE, nullptr )
- const SwRect aOldRect( getSwFrame() ); // Adjust root size
+ const SwRect aOldRect( geFrameArea() ); // Adjust root size
const SwLayNotify aNotify( this ); // takes care of the notification in the dtor
std::unique_ptr<SwBorderAttrAccess> pAccess;
const SwBorderAttrs*pAttrs = nullptr;
- while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
{
- mbValidPos = true; // positioning of the pages is taken care of by the root frame
+ setFrameAreaPositionValid(true); // positioning of the pages is taken care of by the root frame
}
- if ( !mbValidSize || !mbValidPrtArea )
+ if ( !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
if ( IsEmptyPage() )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Width( 0 );
aFrm.Width( 0 );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Height( 0 );
aPrt.Height( 0 );
aPrt.Left( 0 );
aPrt.Top( 0 );
- mbValidSize = mbValidPrtArea = true;
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
}
else
{
@@ -811,7 +814,7 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
nWidth = std::max( nWidth, 2L * aBorder.Width() + 4*MM50 );
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Width( nWidth );
SwLayoutFrame *pBody = FindBodyCont();
@@ -839,14 +842,15 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left ( pAttrs->CalcLeftLine() + aBorder.Width() );
aPrt.Top ( nTop );
- aPrt.Width( getSwFrame().Width() - ( aPrt.Left() + pAttrs->CalcRightLine() + aBorder.Width() ) );
- aPrt.Height( getSwFrame().Height() - (nTop + nBottom) );
+ aPrt.Width( geFrameArea().Width() - ( aPrt.Left() + pAttrs->CalcRightLine() + aBorder.Width() ) );
+ aPrt.Height( geFrameArea().Height() - (nTop + nBottom) );
}
- mbValidSize = mbValidPrtArea = true;
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
continue;
}
else if (pSh && pSh->GetViewOptions()->IsWhitespaceHidden() && pRootFrame->GetLastPage() != this)
@@ -866,11 +870,12 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
if (height > 0)
{
- ChgSize(Size(getSwFrame().Width(), height));
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ ChgSize(Size(geFrameArea().Width(), height));
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Top(0);
aPrt.Height(height);
- mbValidSize = mbValidPrtArea = true;
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
continue;
}
@@ -881,20 +886,20 @@ 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).
+ //FIXME: This resets the size when (isFrameAreaSizeValid() && !isFramePrintAreaValid()).
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.SSize( pAttrs->GetSize() );
}
Format( pRenderContext, pAttrs );
}
}
- } //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ } //while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
- if ( getSwFrame() != aOldRect && GetUpper() )
+ if ( geFrameArea() != aOldRect && GetUpper() )
static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
- OSL_ENSURE( !GetUpper() || GetUpper()->getSwPrint().Width() >= getSwFrame().Width(),
+ OSL_ENSURE( !GetUpper() || GetUpper()->getFramePrintArea().Width() >= geFrameArea().Width(),
"Upper (Root) must be wide enough to contain the widest page");
}
@@ -911,9 +916,9 @@ void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
std::unique_ptr<SwBorderAttrAccess> pAccess;
const SwBorderAttrs*pAttrs = nullptr;
- while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
MakePos();
if ( GetUpper() )
@@ -921,33 +926,35 @@ void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// NEW TABLES
if ( IsLeaveUpperAllowed() )
{
- if ( !mbValidSize )
- mbValidPrtArea = false;
+ if ( !isFrameAreaSizeValid() )
+ {
+ setFramePrintAreaValid(false);
+ }
}
else
{
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
// Set FixSize; VarSize is set by Format() after calculating the PrtArea
- mbValidPrtArea = false;
+ setFramePrintAreaValid(false);
- SwTwips nPrtWidth = (GetUpper()->getSwPrint().*fnRect->fnGetWidth)();
+ SwTwips nPrtWidth = (GetUpper()->getFramePrintArea().*fnRect->fnGetWidth)();
if( bVert && ( IsBodyFrame() || IsFootnoteContFrame() ) )
{
SwFrame* pNxt = GetPrev();
while( pNxt && !pNxt->IsHeaderFrame() )
pNxt = pNxt->GetPrev();
if( pNxt )
- nPrtWidth -= pNxt->getSwFrame().Height();
+ nPrtWidth -= pNxt->geFrameArea().Height();
pNxt = GetNext();
while( pNxt && !pNxt->IsFooterFrame() )
pNxt = pNxt->GetNext();
if( pNxt )
- nPrtWidth -= pNxt->getSwFrame().Height();
+ nPrtWidth -= pNxt->geFrameArea().Height();
}
- const long nDiff = nPrtWidth - (getSwFrame().*fnRect->fnGetWidth)();
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ const long nDiff = nPrtWidth - (geFrameArea().*fnRect->fnGetWidth)();
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
if( IsNeighbourFrame() && IsRightToLeft() )
{
@@ -962,13 +969,15 @@ void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
// Don't leave your upper
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
- if( (getSwFrame().*fnRect->fnOverStep)( nDeadLine ) )
- mbValidSize = false;
+ if( (geFrameArea().*fnRect->fnOverStep)( nDeadLine ) )
+ {
+ setFrameAreaSizeValid(false);
+ }
}
}
}
- if ( !mbValidSize || !mbValidPrtArea )
+ if ( !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
if ( !pAccess )
{
@@ -977,7 +986,7 @@ void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
}
- } //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ } //while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
}
bool SwTextNode::IsCollapse() const
@@ -1015,10 +1024,9 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
{
bool bSizeChgd = false;
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
- mbValidPrtArea = true;
-
+ setFramePrintAreaValid(true);
SwRectFnSet aRectFnSet(this);
const bool bTextFrame = IsTextFrame();
SwTwips nUpper = 0;
@@ -1027,20 +1035,20 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
if ( static_cast<SwTextFrame*>(this)->HasFollow() )
static_cast<SwTextFrame*>(this)->JoinFrame();
- if( aRectFnSet.GetHeight(getSwPrint()) )
+ if( aRectFnSet.GetHeight(getFramePrintArea()) )
{
static_cast<SwTextFrame*>(this)->HideHidden();
}
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Pos().setX(0);
aPrt.Pos().setY(0);
- aRectFnSet.SetWidth( aPrt, aRectFnSet.GetWidth(getSwFrame()) );
+ aRectFnSet.SetWidth( aPrt, aRectFnSet.GetWidth(geFrameArea()) );
aRectFnSet.SetHeight( aPrt, 0 );
}
- nUpper = -( aRectFnSet.GetHeight(getSwFrame()) );
+ nUpper = -( aRectFnSet.GetHeight(geFrameArea()) );
}
else
{
@@ -1086,21 +1094,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(getSwPrint());
+ nWidth -= aRectFnSet.GetLeft(getFramePrintArea());
nWidth -= rAttrs.CalcRightLine();
nWidth = std::max( nMinWidth, nWidth );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetWidth( aPrt, std::min( nWidth, aRectFnSet.GetWidth(aPrt) ) );
}
- if ( aRectFnSet.GetWidth(getSwPrint()) <= MINLAY )
+ if ( aRectFnSet.GetWidth(getFramePrintArea()) <= MINLAY )
{
// The PrtArea should already be at least MINLAY wide, matching the
// minimal values of the UI
- SwFrameRect::PrintWriteAccess aPrt(*this);
- aRectFnSet.SetWidth( aPrt, std::min( long(MINLAY), aRectFnSet.GetWidth(getSwFrame()) ) );
- SwTwips nTmp = aRectFnSet.GetWidth(getSwFrame()) - aRectFnSet.GetWidth(aPrt);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
+ aRectFnSet.SetWidth( aPrt, std::min( long(MINLAY), aRectFnSet.GetWidth(geFrameArea()) ) );
+ SwTwips nTmp = aRectFnSet.GetWidth(geFrameArea()) - aRectFnSet.GetWidth(aPrt);
if( aRectFnSet.GetLeft(aPrt) > nTmp )
{
@@ -1129,12 +1137,12 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
}
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetPosY( aPrt, (!aRectFnSet.IsVert() || mbReverse) ? nUpper : nLower);
}
nUpper += nLower;
- nUpper -= aRectFnSet.GetHeight(getSwFrame()) - aRectFnSet.GetHeight(getSwPrint());
+ nUpper -= aRectFnSet.GetHeight(geFrameArea()) - aRectFnSet.GetHeight(getFramePrintArea());
}
// If there's a difference between old and new size, call Grow() or
// Shrink() respectively.
@@ -1158,8 +1166,8 @@ inline void ValidateSz( SwFrame *pFrame )
{
if ( pFrame )
{
- pFrame->mbValidSize = true;
- pFrame->mbValidPrtArea = true;
+ pFrame->setFrameAreaSizeValid(true);
+ pFrame->setFramePrintAreaValid(true);
}
}
@@ -1295,11 +1303,12 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// OD 08.11.2002 #104840# - check footnote content for forward move.
// If a content of a footnote is on a prior page/column as its invalid
// reference, it can be moved forward.
- if ( bFootnote && !mbValidPos )
+ if ( bFootnote && !isFrameAreaPositionValid() )
{
SwFootnoteFrame* pFootnote = FindFootnoteFrame();
SwContentFrame* pRefCnt = pFootnote ? pFootnote->GetRef() : nullptr;
- if ( pRefCnt && !pRefCnt->IsValid() )
+
+ if ( pRefCnt && !pRefCnt->isFrameAreaDefinitionValid() )
{
SwFootnoteBossFrame* pFootnoteBossOfFootnote = pFootnote->FindFootnoteBossFrame();
SwFootnoteBossFrame* pFootnoteBossOfRef = pRefCnt->FindFootnoteBossFrame();
@@ -1319,11 +1328,11 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
SwFrame const* pMoveBwdPre(nullptr);
bool isMoveBwdPreValid(false);
- while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
// - loop prevention
- SwRect aOldFrame_StopFormat( getSwFrame() );
- SwRect aOldPrt_StopFormat( getSwPrint() );
+ SwRect aOldFrame_StopFormat( geFrameArea() );
+ SwRect aOldPrt_StopFormat( getFramePrintArea() );
bool bMoveable = IsMoveable();
if (bMoveable)
{
@@ -1347,14 +1356,14 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
}
- aOldFramePos = aRectFnSet.GetPos(getSwFrame());
- aOldPrtPos = aRectFnSet.GetPos(getSwPrint());
+ aOldFramePos = aRectFnSet.GetPos(geFrameArea());
+ aOldPrtPos = aRectFnSet.GetPos(getFramePrintArea());
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
MakePos();
//Set FixSize. VarSize is being adjusted by Format().
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
// invalidate printing area flag, if the following conditions are hold:
// - current frame width is 0.
@@ -1367,16 +1376,18 @@ 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()->getSwPrint());
- if ( mbValidPrtArea && nNewFrameWidth > 0 &&
- aRectFnSet.GetWidth(getSwFrame()) == 0 &&
- aRectFnSet.GetWidth(getSwPrint()) == 0 )
+ const SwTwips nNewFrameWidth = aRectFnSet.GetWidth(GetUpper()->getFramePrintArea());
+
+ if ( isFramePrintAreaValid() &&
+ nNewFrameWidth > 0 &&
+ aRectFnSet.GetWidth(geFrameArea()) == 0 &&
+ aRectFnSet.GetWidth(getFramePrintArea()) == 0 )
{
- mbValidPrtArea = false;
+ setFramePrintAreaValid(false);
}
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetWidth( aFrm, nNewFrameWidth );
}
@@ -1388,13 +1399,13 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
GetUpper()->SetCompletePaint();
}
}
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
- const long nOldW = aRectFnSet.GetWidth(getSwPrint());
+ const long nOldW = aRectFnSet.GetWidth(getFramePrintArea());
// #i34730# - keep current frame height
- const SwTwips nOldH = aRectFnSet.GetHeight(getSwFrame());
+ const SwTwips nOldH = aRectFnSet.GetHeight(geFrameArea());
MakePrtArea( rAttrs );
- if ( nOldW != aRectFnSet.GetWidth(getSwPrint()) )
+ if ( nOldW != aRectFnSet.GetWidth(getFramePrintArea()) )
Prepare( PREP_FIXSIZE_CHG );
// #i34730# - check, if frame height has changed.
// If yes, send a PREP_ADJUST_FRM and invalidate the size flag to
@@ -1402,22 +1413,21 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// <SwTextFrame::CalcPreps()>, if the already formatted lines still
// fit and if not, performs necessary actions.
// #i40150# - no check, if frame is undersized.
- if ( mbValidSize && !IsUndersized() &&
- nOldH != aRectFnSet.GetHeight(getSwFrame()) )
+ if ( isFrameAreaSizeValid() && !IsUndersized() && nOldH != aRectFnSet.GetHeight(geFrameArea()) )
{
// #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(getSwFrame());
+ const SwTwips nHDiff = nOldH - aRectFnSet.GetHeight(geFrameArea());
const bool bNoPrepAdjustFrame =
nHDiff > 0 && IsInTab() && GetFollow() &&
- ( 1 == static_cast<SwTextFrame*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || aRectFnSet.GetWidth(static_cast<SwTextFrame*>(GetFollow())->getSwFrame()) < 0 ) &&
+ ( 1 == static_cast<SwTextFrame*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || aRectFnSet.GetWidth(static_cast<SwTextFrame*>(GetFollow())->geFrameArea()) < 0 ) &&
GetFollow()->CalcAddLowerSpaceAsLastInTableCell() == nHDiff;
if ( !bNoPrepAdjustFrame )
{
Prepare( PREP_ADJUST_FRM );
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
}
}
}
@@ -1431,27 +1441,28 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bool bWidow = true;
const SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*GetUpper());
if( bMoveable && !bFormatted &&
- ( GetFollow() || aRectFnSet.OverStep( getSwFrame(), nDeadLine ) ) )
+ ( GetFollow() || aRectFnSet.OverStep( geFrameArea(), nDeadLine ) ) )
{
Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
- mbValidSize = bWidow = false;
+ setFrameAreaSizeValid(false);
+ bWidow = false;
}
- if( aRectFnSet.GetPos(getSwFrame()) != aOldFramePos ||
- aRectFnSet.GetPos(getSwPrint()) != aOldPrtPos )
+ if( aRectFnSet.GetPos(geFrameArea()) != aOldFramePos ||
+ aRectFnSet.GetPos(getFramePrintArea()) != aOldPrtPos )
{
// In this Prepare, an InvalidateSize_() might happen.
- // mbValidSize becomes false and Format() gets called.
+ // isFrameAreaSizeValid() becomes false and Format() gets called.
Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false );
if ( bWidow && GetFollow() )
{
Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
}
}
}
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
bFormatted = true;
++nFormatCount;
if( nFormatCount > STOP_FLY_FORMAT )
@@ -1477,8 +1488,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// flowed forwards.
bool bDummy;
auto const pTemp(GetIndPrev());
- auto const bTemp(pTemp && pTemp->GetValidSizeFlag()
- && pTemp->GetValidPrtAreaFlag());
+ auto const bTemp(pTemp && pTemp->isFrameAreaSizeValid()
+ && pTemp->isFramePrintAreaValid());
if ( !lcl_Prev( this ) &&
!bMovedFwd &&
( bMoveable || ( bFly && !bTab ) ) &&
@@ -1498,28 +1509,31 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bMoveable = IsMoveable();
aRectFnSet.Refresh(this);
}
- Point aOldPos = aRectFnSet.GetPos(getSwFrame());
+ Point aOldPos = aRectFnSet.GetPos(geFrameArea());
MakePos();
- if( aOldPos != aRectFnSet.GetPos(getSwFrame()) )
+ if( aOldPos != aRectFnSet.GetPos(geFrameArea()) )
{
Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false );
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
- aRectFnSet.SetWidth( aFrm, aRectFnSet.GetWidth(GetUpper()->getSwPrint()) );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aRectFnSet.SetWidth( aFrm, aRectFnSet.GetWidth(GetUpper()->getFramePrintArea()) );
}
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
- const long nOldW = aRectFnSet.GetWidth(getSwPrint());
+ const long nOldW = aRectFnSet.GetWidth(getFramePrintArea());
MakePrtArea( rAttrs );
- if( nOldW != aRectFnSet.GetWidth(getSwPrint()) )
+ if( nOldW != aRectFnSet.GetWidth(getFramePrintArea()) )
Prepare( PREP_FIXSIZE_CHG, nullptr, false );
}
if( GetFollow() )
+ {
Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
- mbValidSize = true;
+ }
+
+ setFrameAreaSizeValid(true);
bFormatted = true;
Format(getRootFrame()->GetCurrShell()->GetOut());
}
@@ -1541,17 +1555,21 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( pNxt )
{
pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut());
- if( mbValidPos && !GetIndNext() )
+ if( isFrameAreaPositionValid() && !GetIndNext() )
{
SwSectionFrame *pSct = FindSctFrame();
- if( pSct && !pSct->GetValidSizeFlag() )
+ if( pSct && !pSct->isFrameAreaSizeValid() )
{
SwSectionFrame* pNxtSct = pNxt->FindSctFrame();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
- mbValidPos = false;
+ {
+ setFrameAreaPositionValid(false);
+ }
}
else
- mbValidPos = false;
+ {
+ setFrameAreaPositionValid(false);
+ }
}
}
}
@@ -1559,7 +1577,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// In footnotes, the TextFrame may validate itself, which can lead to the
// situation that it's position is wrong despite being "valid".
- if ( mbValidPos )
+ if ( isFrameAreaPositionValid() )
{
// #i59341#
// Workaround for inadequate layout algorithm:
@@ -1572,17 +1590,17 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
nFormatCount <= STOP_FLY_FORMAT &&
!GetDrawObjs() )
{
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
MakePos();
- aOldFramePos = aRectFnSet.GetPos(getSwFrame());
- aOldPrtPos = aRectFnSet.GetPos(getSwPrint());
+ aOldFramePos = aRectFnSet.GetPos(geFrameArea());
+ aOldPrtPos = aRectFnSet.GetPos(getFramePrintArea());
}
}
// - loop prevention
{
- if ( aOldFrame_StopFormat == getSwFrame() &&
- aOldPrt_StopFormat == getSwPrint() )
+ if ( aOldFrame_StopFormat == geFrameArea() &&
+ aOldPrt_StopFormat == getFramePrintArea() )
{
++nConsecutiveFormatsWithoutChange;
}
@@ -1593,7 +1611,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
// Yet again an invalid value? Repeat from the start...
- if ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ if ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
continue;
// Done?
@@ -1601,7 +1619,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(getSwFrame(), nPrtBottom);
+ long nBottomDist = aRectFnSet.BottomDist(geFrameArea(), nPrtBottom);
// Hide whitespace may require not to insert a new page.
SwPageFrame* pPageFrame = FindPageFrame();
@@ -1640,7 +1658,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
const bool bMoveFwdInvalid = nullptr != GetIndNext();
const bool bNxtNew =
- ( 0 == aRectFnSet.GetHeight(pNxt->getSwPrint()) ) &&
+ ( 0 == aRectFnSet.GetHeight(pNxt->getFramePrintArea()) ) &&
(!pNxt->IsTextFrame() ||!static_cast<SwTextFrame*>(pNxt)->IsHiddenNow());
pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut());
@@ -1668,7 +1686,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if( !bMoveable && IsInTab() )
{
- long nDiff = -aRectFnSet.BottomDist( getSwFrame(), aRectFnSet.GetPrtBottom(*GetUpper()) );
+ long nDiff = -aRectFnSet.BottomDist( geFrameArea(), aRectFnSet.GetPrtBottom(*GetUpper()) );
long nReal = GetUpper()->Grow( nDiff );
if( nReal )
continue;
@@ -1700,18 +1718,18 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
nullptr != GetNextCellLeaf() )
bDontMoveMe = false;
- if ( bDontMoveMe && aRectFnSet.GetHeight(getSwFrame()) >
- aRectFnSet.GetHeight(GetUpper()->getSwPrint()) )
+ if ( bDontMoveMe && aRectFnSet.GetHeight(geFrameArea()) >
+ aRectFnSet.GetHeight(GetUpper()->getFramePrintArea()) )
{
if ( !bFitPromise )
{
- SwTwips nTmp = aRectFnSet.GetHeight(GetUpper()->getSwPrint()) -
- aRectFnSet.GetTop(getSwPrint());
+ SwTwips nTmp = aRectFnSet.GetHeight(GetUpper()->getFramePrintArea()) -
+ aRectFnSet.GetTop(getFramePrintArea());
bool bSplit = !IsFwdMoveAllowed();
if ( nTmp > 0 && WouldFit( nTmp, bSplit, false ) )
{
Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
bFitPromise = true;
continue;
}
@@ -1756,7 +1774,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
const bool bCheckForGrownBody = pOldUp->IsBodyFrame();
- const long nOldBodyHeight = aRectFnSet.GetHeight(pOldUp->getSwFrame());
+ const long nOldBodyHeight = aRectFnSet.GetHeight(pOldUp->geFrameArea());
if ( !bMovedFwd && !MoveFwd( bMakePage, false ) )
bMakePage = false;
@@ -1790,7 +1808,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->getSwFrame()) <= nOldBodyHeight;
+ aRectFnSet.GetHeight(pOldUp->geFrameArea()) <= nOldBodyHeight;
bFormatted = false;
if ( bMoveOrFit && GetUpper() == pOldUp )
@@ -1799,7 +1817,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( nConsecutiveFormatsWithoutChange <= cnStopFormat )
{
Prepare( PREP_MUST_FIT, nullptr, false );
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
bMustFit = true;
continue;
}
@@ -1815,7 +1833,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
::ValidateSz( pPre );
}
- } //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ } //while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
// NEW: Looping Louie (Light). Should not be applied in balanced sections.
// Should only be applied if there is no better solution!
@@ -1853,10 +1871,12 @@ void MakeNxt( SwFrame *pFrame, SwFrame *pNxt )
// fix(25455): Validate, otherwise this leads to a recursion.
// The first try, cancelling with pFrame = 0 if !Valid, leads to a problem, as
// the Keep may not be considered properly anymore (27417).
- const bool bOldPos = pFrame->GetValidPosFlag();
- const bool bOldSz = pFrame->GetValidSizeFlag();
- const bool bOldPrt = pFrame->GetValidPrtAreaFlag();
- pFrame->mbValidPos = pFrame->mbValidPrtArea = pFrame->mbValidSize = true;
+ const bool bOldPos = pFrame->isFrameAreaPositionValid();
+ const bool bOldSz = pFrame->isFrameAreaSizeValid();
+ const bool bOldPrt = pFrame->isFramePrintAreaValid();
+ pFrame->setFrameAreaPositionValid(true);
+ pFrame->setFrameAreaSizeValid(true);
+ pFrame->setFramePrintAreaValid(true);
// fix(29272): Don't call MakeAll - there, pFrame might be invalidated again, and
// we recursively end up in here again.
@@ -1865,17 +1885,17 @@ void MakeNxt( SwFrame *pFrame, SwFrame *pNxt )
SwContentNotify aNotify( static_cast<SwContentFrame*>(pNxt) );
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNxt );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- if ( !pNxt->GetValidSizeFlag() )
+ if ( !pNxt->isFrameAreaSizeValid() )
{
- SwFrameRect::FrameWriteAccess aFrm(*pNxt);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pNxt);
if( pNxt->IsVertical() )
{
- aFrm.Height( pNxt->GetUpper()->getSwPrint().Height() );
+ aFrm.Height( pNxt->GetUpper()->getFramePrintArea().Height() );
}
else
{
- aFrm.Width( pNxt->GetUpper()->getSwPrint().Width() );
+ aFrm.Width( pNxt->GetUpper()->getFramePrintArea().Width() );
}
}
static_cast<SwContentFrame*>(pNxt)->MakePrtArea( rAttrs );
@@ -1886,25 +1906,25 @@ void MakeNxt( SwFrame *pFrame, SwFrame *pNxt )
SwLayNotify aNotify( static_cast<SwLayoutFrame*>(pNxt) );
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNxt );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- if ( !pNxt->GetValidSizeFlag() )
+ if ( !pNxt->isFrameAreaSizeValid() )
{
- SwFrameRect::FrameWriteAccess aFrm(*pNxt);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pNxt);
if( pNxt->IsVertical() )
{
- aFrm.Height( pNxt->GetUpper()->getSwPrint().Height() );
+ aFrm.Height( pNxt->GetUpper()->getFramePrintArea().Height() );
}
else
{
- aFrm.Width( pNxt->GetUpper()->getSwPrint().Width() );
+ aFrm.Width( pNxt->GetUpper()->getFramePrintArea().Width() );
}
}
pNxt->Format( pNxt->getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
}
- pFrame->mbValidPos = bOldPos;
- pFrame->mbValidSize = bOldSz;
- pFrame->mbValidPrtArea = bOldPrt;
+ pFrame->setFrameAreaPositionValid(bOldPos);
+ pFrame->setFrameAreaSizeValid(bOldSz);
+ pFrame->setFramePrintAreaValid(bOldPrt);
}
/// This routine checks whether there are no other FootnoteBosses
@@ -2047,9 +2067,9 @@ bool SwContentFrame::WouldFit_( SwTwips nSpace,
nSecondCheck = 0;
if( pFrame->IsVertical() )
- nUpper = pFrame->getSwFrame().Width() - pFrame->getSwPrint().Width();
+ nUpper = pFrame->geFrameArea().Width() - pFrame->getFramePrintArea().Width();
else
- nUpper = pFrame->getSwFrame().Height() - pFrame->getSwPrint().Height();
+ nUpper = pFrame->geFrameArea().Height() - pFrame->getFramePrintArea().Height();
}
nSpace -= nUpper;
@@ -2102,7 +2122,7 @@ bool SwContentFrame::WouldFit_( SwTwips nSpace,
// OD 11.04.2003 #108824# - If last follow frame of <this> text
// frame isn't valid, a formatting of the next content frame
// doesn't makes sense. Thus, return true.
- if ( IsAnFollow( pFrame ) && !pFrame->IsValid() )
+ if ( IsAnFollow( pFrame ) && !pFrame->isFrameAreaDefinitionValid() )
{
OSL_FAIL( "Only a warning for task 108824:/n<SwContentFrame::WouldFit_(..) - follow not valid!" );
return true;
@@ -2123,8 +2143,10 @@ bool SwContentFrame::WouldFit_( SwTwips nSpace,
return true;
}
- if ( !pNxt->IsValid() )
+ if ( !pNxt->isFrameAreaDefinitionValid() )
+ {
MakeNxt( pFrame, pNxt );
+ }
// Little trick: if the next has a predecessor, then the paragraph
// spacing has been calculated already, and we don't need to re-calculate
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 49c7cc35b279..723d133a5171 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( getSwPrint().SSize() );
+ Lower()->ChgSize( getFramePrintArea().SSize() );
return;
}
@@ -309,11 +309,11 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
pAttr = &GetFormat()->GetCol();
if ( !bAdjustAttributes )
{
- long nAvail = (getSwPrint().*fnRect->fnGetWidth)();
+ long nAvail = (getFramePrintArea().*fnRect->fnGetWidth)();
for ( SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(Lower());
pCol;
pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()) )
- nAvail -= (pCol->getSwFrame().*fnRect->fnGetWidth)();
+ nAvail -= (pCol->geFrameArea().*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 = (getSwPrint().*fnRect->fnGetWidth)();
+ SwTwips nAvail = (getFramePrintArea().*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( (getSwPrint().*fnRect->fnGetWidth)() ) );
+ pAttr->CalcColWidth( i, sal_uInt16( (getFramePrintArea().*fnRect->fnGetWidth)() ) );
const Size aColSz = bVert ?
- Size( getSwPrint().Width(), nWidth ) :
- Size( nWidth, getSwPrint().Height() );
+ Size( getFramePrintArea().Width(), nWidth ) :
+ Size( nWidth, getFramePrintArea().Height() );
pCol->ChgSize( aColSz );
@@ -425,8 +425,8 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
nWidth = 0;
const Size aColSz = bVert ?
- Size( getSwPrint().Width(), nWidth ) :
- Size( nWidth, getSwPrint().Height() );
+ Size( getFramePrintArea().Width(), nWidth ) :
+ Size( nWidth, getFramePrintArea().Height() );
pCol->ChgSize( aColSz );
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index af7ac968694e..cd0bc9342ae3 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->getSwFrame().Height() ) {}
+ : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameHeight( pF->geFrameArea().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->getSwFrame() ) {}
+ : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrame( pF->geFrameArea() ) {}
virtual void Enter() override; // no message
virtual void Leave() override; // message when resizing the Frame area
@@ -440,11 +440,11 @@ static void lcl_Start(OStringBuffer& rOut, OStringBuffer& rLay, DbgAction nActio
static void lcl_Flags(OStringBuffer& rOut, const SwFrame* pFrame)
{
rOut.append(" ValidSize");
- rOut.append(pFrame->GetValidSizeFlag() ? '+' : '-');
+ rOut.append(pFrame->isFrameAreaSizeValid() ? '+' : '-');
rOut.append(" ValidPos");
- rOut.append(pFrame->GetValidPosFlag() ? '+' : '-');
+ rOut.append(pFrame->isFrameAreaPositionValid() ? '+' : '-');
rOut.append(" ValidPrtArea");
- rOut.append(pFrame->GetValidPrtAreaFlag() ? '+' : '-');
+ rOut.append(pFrame->isFramePrintAreaValid() ? '+' : '-');
}
/// output the type of the frame as plain text.
@@ -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->getSwFrame().Height()));
+ aOut.append(static_cast<sal_Int64>(pFrame->geFrameArea().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->getSwFrame().Pos() != rFrame.Pos() )
+ if( pFrame->geFrameArea().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->getSwFrame().Left()));
+ aOut.append(static_cast<sal_Int64>(pFrame->geFrameArea().Left()));
aOut.append(", ");
- aOut.append(static_cast<sal_Int64>(pFrame->getSwFrame().Top()));
+ aOut.append(static_cast<sal_Int64>(pFrame->geFrameArea().Top()));
aOut.append(") ");
}
- if( pFrame->getSwFrame().Height() != rFrame.Height() )
+ if( pFrame->geFrameArea().Height() != rFrame.Height() )
{
aOut.append("Height: ");
aOut.append(static_cast<sal_Int64>(rFrame.Height()));
aOut.append(" -> ");
- aOut.append(static_cast<sal_Int64>(pFrame->getSwFrame().Height()));
+ aOut.append(static_cast<sal_Int64>(pFrame->geFrameArea().Height()));
aOut.append(" ");
}
- if( pFrame->getSwFrame().Width() != rFrame.Width() )
+ if( pFrame->geFrameArea().Width() != rFrame.Width() )
{
aOut.append("Width: ");
aOut.append(static_cast<sal_Int64>(rFrame.Width()));
aOut.append(" -> ");
- aOut.append(static_cast<sal_Int64>(pFrame->getSwFrame().Width()));
+ aOut.append(static_cast<sal_Int64>(pFrame->geFrameArea().Width()));
aOut.append(' ');
}
break;
@@ -768,7 +768,7 @@ void SwImplEnterLeave::Leave()
void SwSizeEnterLeave::Leave()
{
- nFrameHeight = pFrame->getSwFrame().Height() - nFrameHeight;
+ nFrameHeight = pFrame->geFrameArea().Height() - nFrameHeight;
SwProtocol::Record( pFrame, nFunction, DbgAction::End, &nFrameHeight );
}
@@ -790,7 +790,7 @@ void SwFrameChangesLeave::Enter()
void SwFrameChangesLeave::Leave()
{
- if( pFrame->getSwFrame() != aFrame )
+ if( pFrame->geFrameArea() != 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 d465d29965b7..0c4208a3b9a8 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( !getSwFrame().IsInside( rPt ) )
+ if( !geFrameArea().IsInside( rPt ) )
return nullptr;
// skip pages above point:
- while( pPage && rPt.Y() > pPage->getSwFrame().Bottom() )
+ while( pPage && rPt.Y() > pPage->geFrameArea().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->getSwFrame();
+ const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->geFrameArea();
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 (!getSwFrame().IsInside(rPt))
+ if (!geFrameArea().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->getSwFrame().Bottom())
+ while (pPage && rPt.Y() > pPage->geFrameArea().Bottom())
pPage = pPage->GetNext();
if (pPage &&
- rPt.X() >= pPage->getSwFrame().Left() &&
- rPt.X() <= pPage->getSwFrame().Right())
+ rPt.X() >= pPage->geFrameArea().Left() &&
+ rPt.X() <= pPage->geFrameArea().Right())
{
// Trivial case when we're right in between.
- if (!pPage->getSwFrame().IsInside(rPt))
+ if (!pPage->geFrameArea().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->getSwFrame().Top() - rPt.Y()),
- std::abs(pPage->getSwFrame().Bottom() - rPt.Y()));
+ const auto toEdge = std::min(std::abs(pPage->geFrameArea().Top() - rPt.Y()),
+ std::abs(pPage->geFrameArea().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 b0e85e4db50b..e4710979e861 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->getSwFrame());
+ nGrowVal += aRectFnSet.GetHeight(pFloat->geFrameArea());
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.getSwFrame()),
+ aRectFnSet.YInc( aRectFnSet.GetTop(m_rThis.geFrameArea()),
_nUpperSpaceWithoutGrid );
const SwTwips nSpaceAbovePrtTop =
@@ -1571,7 +1571,7 @@ SwTwips SwFlowFrame::GetUpperSpaceAmountConsideredForPageGrid_(
const SwTwips nNewUpperSpace =
aRectFnSet.YDiff( nNewPrtTop,
- aRectFnSet.GetTop(m_rThis.getSwFrame()) );
+ aRectFnSet.GetTop(m_rThis.geFrameArea()) );
nUpperSpaceAmountConsideredForPageGrid =
nNewUpperSpace - _nUpperSpaceWithoutGrid;
@@ -1743,11 +1743,11 @@ bool SwFlowFrame::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool bIgnoreMyOwnK
if( pTmp )
pNxt = pTmp; // the content of the next notempty sectionfrm
}
- if( pNxt && pNxt->GetValidPosFlag() )
+ if( pNxt && pNxt->isFrameAreaPositionValid() )
{
bool bMove = false;
const SwSectionFrame *pSct = m_rThis.FindSctFrame();
- if( pSct && !pSct->GetValidSizeFlag() )
+ if( pSct && !pSct->isFrameAreaSizeValid() )
{
const SwSectionFrame* pNxtSct = pNxt->FindSctFrame();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
@@ -1915,7 +1915,7 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
// silly things...
SwRectFnSet aRectFnSet(pOldBoss);
SwSaveFootnoteHeight aHeight( pOldBoss,
- aRectFnSet.GetBottom(pOldBoss->getSwFrame()) );
+ aRectFnSet.GetBottom(pOldBoss->geFrameArea()) );
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() ),
@@ -2356,7 +2356,7 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat )
{
pSectFrame->DelEmpty( true );
SwFrame::DestroyFrame(pSectFrame);
- m_rThis.mbValidPos = true;
+ m_rThis.setFrameAreaPositionValid(true);
}
}
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 8e425948d0c6..20fbdc358097 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -130,7 +130,7 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
}
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Width( rFrameSize.GetWidth() );
aFrm.Height( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrameSize.GetHeight() );
}
@@ -154,7 +154,7 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
InsertCnt();
// Put it somewhere outside so that out document is not formatted unnecessarily often
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().setX(FAR_AWAY);
aFrm.Pos().setY(FAR_AWAY);
}
@@ -229,9 +229,9 @@ 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.
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
- aPrt.Width( getSwFrame().Width() );
- aPrt.Height( getSwFrame().Height() );
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
+ aPrt.Width( geFrameArea().Width() );
+ aPrt.Height( geFrameArea().Height() );
}
const SwFormatCol aOld; // ChgColumns() also needs an old value passed
@@ -394,7 +394,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
const long nBottom = aRectFnSet.GetPrtBottom(*pMaster);
while ( pInva )
{
- if( aRectFnSet.BottomDist( pInva->getSwFrame(), nBottom ) <= 0 )
+ if( aRectFnSet.BottomDist( pInva->geFrameArea(), nBottom ) <= 0 )
{
pInva->InvalidateSize();
pInva->Prepare();
@@ -533,7 +533,7 @@ SwFrame *SwFlyFrame::FindLastLower()
bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize )
{
bool bRet = false;
- SwTwips nDiffHeight = getSwFrame().Height();
+ SwTwips nDiffHeight = geFrameArea().Height();
if ( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE )
mbFixSize = m_bMinHeight = false;
else
@@ -557,11 +557,11 @@ bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize )
if ( Lower()->IsColumnFrame() )
{
const SwRect aOld( GetObjRectWithSpaces() );
- const Size aOldSz( getSwPrint().SSize() );
- const SwTwips nDiffWidth = getSwFrame().Width() - rFrameSize.GetWidth();
+ const Size aOldSz( getFramePrintArea().SSize() );
+ const SwTwips nDiffWidth = geFrameArea().Width() - rFrameSize.GetWidth();
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Height( aFrm.Height() - nDiffHeight );
aFrm.Width ( aFrm.Width() - nDiffWidth );
}
@@ -570,14 +570,14 @@ bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize )
InvalidateObjRectWithSpaces();
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Height( aPrt.Height() - nDiffHeight );
aPrt.Width ( aPrt.Width() - nDiffWidth );
}
ChgLowersProp( aOldSz );
::Notify( this, FindPageFrame(), aOld );
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
bRet = true;
}
else if ( Lower()->IsNoTextFrame() )
@@ -758,7 +758,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( RES_FMT_CHG == nWhich )
{
SwRect aNew( GetObjRectWithSpaces() );
- SwRect aOld( getSwFrame() );
+ SwRect aOld( geFrameArea() );
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();
@@ -818,7 +818,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
GetVirtDrawObj()->SetResizeProtect( rP.IsSizeProtected() );
if ( pSh )
- pSh->InvalidateWindows( getSwFrame() );
+ pSh->InvalidateWindows( geFrameArea() );
const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess();
const SdrLayerID nId = GetFormat()->GetOpaque().GetValue() ?
rIDDMA.GetHeavenId() :
@@ -856,7 +856,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
getRootFrame()->InvalidateBrowseWidth();
SwRect aNew( GetObjRectWithSpaces() );
- SwRect aOld( getSwFrame() );
+ SwRect aOld( geFrameArea() );
if (pNew)
{
if ( RES_UL_SPACE == nWhich )
@@ -898,7 +898,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
case RES_OPAQUE:
{
if ( pSh )
- pSh->InvalidateWindows( getSwFrame() );
+ pSh->InvalidateWindows( geFrameArea() );
const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess();
const SdrLayerID nId = static_cast<const SvxOpaqueItem*>(pNew)->GetValue() ?
@@ -927,12 +927,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() != getSwFrame().Height() ||
- rSz.GetWidth() != getSwFrame().Width() )
+ if ( rSz.GetHeight() != geFrameArea().Height() ||
+ rSz.GetWidth() != geFrameArea().Width() )
{
SwFormatURL aURL( GetFormat()->GetURL() );
- Fraction aScaleX( getSwFrame().Width(), rSz.GetWidth() );
- Fraction aScaleY( getSwFrame().Height(), rSz.GetHeight() );
+ Fraction aScaleX( geFrameArea().Width(), rSz.GetWidth() );
+ Fraction aScaleY( geFrameArea().Height(), rSz.GetHeight() );
aURL.GetMap()->Scale( aScaleX, aScaleY );
SwFrameFormat *pFormat = GetFormat();
pFormat->LockModify();
@@ -1086,7 +1086,7 @@ void SwFlyFrame::ChgRelPos( const Point &rNewPos )
{
if( pAutoFrame == GetAnchorFrame() )
nTmpY += pAutoFrame->GetRelPos().Y();
- nTmpY -= pAutoFrame->GetUpper()->getSwPrint().Height();
+ nTmpY -= pAutoFrame->GetUpper()->getFramePrintArea().Height();
pAutoFrame = pAutoFrame->GetFollow();
}
nTmpY = static_cast<SwFlyAtContentFrame*>(this)->GetRelCharY(pAutoFrame)-nTmpY;
@@ -1166,13 +1166,13 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
ColLock();
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- if ( getSwFrame().Top() == FAR_AWAY && getSwFrame().Left() == FAR_AWAY )
+ if ( geFrameArea().Top() == FAR_AWAY && geFrameArea().Left() == FAR_AWAY )
{
// Remove safety switch (see SwFrame::CTor)
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().setX(0);
aFrm.Pos().setY(0);
}
@@ -1185,7 +1185,7 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
if ( Lower() && Lower()->IsColumnFrame() )
AdjustColumns( nullptr, false );
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
const SwTwips nUL = pAttrs->CalcTopLine() + pAttrs->CalcBottomLine();
const SwTwips nLR = pAttrs->CalcLeftLine() + pAttrs->CalcRightLine();
@@ -1216,14 +1216,14 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
nRemaining = MINFLY;
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, nRemaining );
}
- nRemaining -= aRectFnSet.GetHeight(getSwFrame());
+ nRemaining -= aRectFnSet.GetHeight(geFrameArea());
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, nRemaining + nUL );
}
@@ -1232,7 +1232,8 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
{
InvalidateObjRectWithSpaces();
}
- mbValidSize = true;
+
+ setFrameAreaSizeValid(true);
if (SwFrameFormat* pShapeFormat = SwTextBoxHelper::getOtherTextBoxFormat(GetFormat(), RES_FLYFRMFMT))
{
@@ -1241,7 +1242,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(getSwFrame()), aRectFnSet.GetHeight(getSwFrame()));
+ Size aSize(aRectFnSet.GetWidth(geFrameArea()), aRectFnSet.GetHeight(geFrameArea()));
pCustomShape->SuggestTextFrameSize(aSize);
// Do the calculations normally done after touching editeng text of the shape.
pCustomShape->NbcSetOutlinerParaObjectForText(nullptr, nullptr);
@@ -1250,7 +1251,9 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
}
else
{
- mbValidSize = true; // Fixed Frames do not Format itself
+ // Fixed Frames do not Format itself
+ setFrameAreaSizeValid(true);
+
// Flys set their size using the attr
SwTwips nNewSize = aRectFnSet.IsVert() ? aRelSize.Width() : aRelSize.Height();
nNewSize -= nUL;
@@ -1258,14 +1261,14 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
nNewSize = MINFLY;
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, nNewSize );
}
- nNewSize += nUL - aRectFnSet.GetHeight(getSwFrame());
+ nNewSize += nUL - aRectFnSet.GetHeight(geFrameArea());
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, nNewSize );
}
@@ -1300,14 +1303,14 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
nNewSize = MINFLY;
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetWidth( aPrt, nNewSize );
}
- nNewSize += nLR - aRectFnSet.GetWidth(getSwFrame());
+ nNewSize += nLR - aRectFnSet.GetWidth(geFrameArea());
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddRight( aFrm, nNewSize );
}
@@ -1393,8 +1396,8 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
{
pLast = pFrame;
if( pFrame->IsVertical() ?
- ( pFrame->GetUpper()->getSwPrint().Height() != pFrame->getSwFrame().Height() )
- : ( pFrame->GetUpper()->getSwPrint().Width() != pFrame->getSwFrame().Width() ) )
+ ( pFrame->GetUpper()->getFramePrintArea().Height() != pFrame->geFrameArea().Height() )
+ : ( pFrame->GetUpper()->getFramePrintArea().Width() != pFrame->geFrameArea().Width() ) )
{
pFrame->Prepare( PREP_FIXSIZE_CHG );
pFrame->InvalidateSize_();
@@ -1440,7 +1443,7 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
!pTmpFlowFrame->IsFollow() &&
!StackHack::IsLocked() && // #i76382#
!pTmpFlowFrame->IsJoinLocked() &&
- !pTmpPrev->GetValidPosFlag() &&
+ !pTmpPrev->isFrameAreaPositionValid() &&
pLay->IsAnLower( pTmpPrev ) &&
pTmpPrevFlowFrame->IsKeep( *pTmpPrev->GetAttrSet() ) &&
pTmpPrevFlowFrame->IsKeepFwdMoveAllowed();
@@ -1640,10 +1643,10 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
// OD 2004-03-23 #i26791#
void SwFlyFrame::MakeObjPos()
{
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
{
vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
// OD 29.10.2003 #113049# - use new class to position object
GetAnchorFrame()->Calc(pRenderContext);
@@ -1657,9 +1660,9 @@ void SwFlyFrame::MakeObjPos()
{
SwRectFnSet aRectFnSet(GetAnchorFrame());
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos( aObjPositioning.GetRelPos() );
- aFrm.Pos() += aRectFnSet.GetPos(GetAnchorFrame()->getSwFrame());
+ aFrm.Pos() += aRectFnSet.GetPos(GetAnchorFrame()->geFrameArea());
}
// #i69335#
@@ -1669,9 +1672,9 @@ void SwFlyFrame::MakeObjPos()
void SwFlyFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
{
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
- mbValidPrtArea = true;
+ setFramePrintAreaValid(true);
// OD 31.07.2003 #110978# - consider vertical layout
SwRectFnSet aRectFnSet(this);
@@ -1697,7 +1700,7 @@ void SwFlyFrame::MakeContentPos( const SwBorderAttrs &rAttrs )
nMinHeight = aRectFnSet.IsVert() ? aRelSize.Width() : aRelSize.Height();
Point aNewContentPos;
- aNewContentPos = getSwPrint().Pos();
+ aNewContentPos = getFramePrintArea().Pos();
const SdrTextVertAdjust nAdjust = GetFormat()->GetTextVertAdjust().GetValue();
if( nAdjust != SDRTEXTVERTADJUST_TOP )
@@ -1706,7 +1709,7 @@ void SwFlyFrame::MakeContentPos( const SwBorderAttrs &rAttrs )
SwTwips nDiff = 0;
if( nContentHeight != 0)
- nDiff = aRectFnSet.GetHeight(getSwPrint()) - nContentHeight;
+ nDiff = aRectFnSet.GetHeight(getFramePrintArea()) - nContentHeight;
if( nDiff > 0 )
{
@@ -1752,7 +1755,7 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
SwRectFnSet aRectFnSet(this);
if ( Lower() && !IsColLocked() && !HasFixSize() )
{
- SwTwips nSize = aRectFnSet.GetHeight(getSwFrame());
+ SwTwips nSize = aRectFnSet.GetHeight(geFrameArea());
if( nSize > 0 && nDist > ( LONG_MAX - nSize ) )
nDist = LONG_MAX - nSize;
@@ -1786,7 +1789,8 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
// Writer fly frames - inner Writer fly frames format its
// anchor, which grows/shrinks the outer Writer fly frame.
// Note: position will be invalidated below.
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
+
// #i55416#
// Suppress format of width for autowidth frame, because the
// format of the width would call <SwTextFrame::CalcFitToContent()>
@@ -1831,7 +1835,7 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
if( Lower() && !IsColLocked() && !HasFixSize() )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nHeight = aRectFnSet.GetHeight(getSwFrame());
+ SwTwips nHeight = aRectFnSet.GetHeight(geFrameArea());
if ( nDist > nHeight )
nDist = nHeight;
@@ -1855,7 +1859,7 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
SwRect aOld( GetObjRectWithSpaces() );
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetHeight( aFrm, nHeight - nVal );
}
@@ -1865,10 +1869,10 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
InvalidateObjRectWithSpaces();
}
- nHeight = aRectFnSet.GetHeight(getSwPrint());
+ nHeight = aRectFnSet.GetHeight(getFramePrintArea());
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, nHeight - nVal );
}
@@ -1896,7 +1900,8 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
// Writer fly frames - inner Writer fly frames format its
// anchor, which grows/shrinks the outer Writer fly frame.
// Note: position will be invalidated below.
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
+
// #i55416#
// Suppress format of width for autowidth frame, because the
// format of the width would call <SwTextFrame::CalcFitToContent()>
@@ -1961,7 +1966,7 @@ Size SwFlyFrame::ChgSize( const Size& aNewSize )
}
}
}
- if ( aAdjustedNewSize != getSwFrame().SSize() )
+ if ( aAdjustedNewSize != geFrameArea().SSize() )
{
SwFrameFormat *pFormat = GetFormat();
SwFormatFrameSize aSz( pFormat->GetFrameSize() );
@@ -1972,7 +1977,7 @@ Size SwFlyFrame::ChgSize( const Size& aNewSize )
return aSz.GetSize();
}
else
- return getSwFrame().SSize();
+ return geFrameArea().SSize();
}
bool SwFlyFrame::IsLowerOf( const SwLayoutFrame* pUpperFrame ) const
@@ -2240,7 +2245,7 @@ void SwLayoutFrame::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
{
SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj);
- if ( pFly->getSwFrame().Left() == FAR_AWAY )
+ if ( pFly->geFrameArea().Left() == FAR_AWAY )
continue;
if ( pFly->IsAnLower( this ) )
@@ -2315,11 +2320,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->getSwPrint().Width();
+ long nDiff = nRelWidth - pRel->getFramePrintArea().Width();
if ( nDiff > 0 )
nRelWidth -= nDiff;
nRelHeight -= 2*aBorder.Height();
- nDiff = nRelHeight - pRel->getSwPrint().Height();
+ nDiff = nRelHeight - pRel->getFramePrintArea().Height();
if ( nDiff > 0 )
nRelHeight -= nDiff;
}
@@ -2327,9 +2332,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->getSwPrint().Width() );
+ nRelWidth = std::min( nRelWidth, pRel->getFramePrintArea().Width() );
if (rSz.GetHeightPercentRelation() != text::RelOrientation::PAGE_FRAME)
- nRelHeight = std::min( nRelHeight, pRel->getSwPrint().Height() );
+ nRelHeight = std::min( nRelHeight, pRel->getFramePrintArea().Height() );
if( !pRel->IsPageFrame() )
{
const SwPageFrame* pPage = FindPageFrame();
@@ -2337,14 +2342,14 @@ Size SwFlyFrame::CalcRel( const SwFormatFrameSize &rSz ) const
{
if (rSz.GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME)
// Ignore margins of pPage.
- nRelWidth = std::min( nRelWidth, pPage->getSwFrame().Width() );
+ nRelWidth = std::min( nRelWidth, pPage->geFrameArea().Width() );
else
- nRelWidth = std::min( nRelWidth, pPage->getSwPrint().Width() );
+ nRelWidth = std::min( nRelWidth, pPage->getFramePrintArea().Width() );
if (rSz.GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME)
// Ignore margins of pPage.
- nRelHeight = std::min( nRelHeight, pPage->getSwFrame().Height() );
+ nRelHeight = std::min( nRelHeight, pPage->geFrameArea().Height() );
else
- nRelHeight = std::min( nRelHeight, pPage->getSwPrint().Height() );
+ nRelHeight = std::min( nRelHeight, pPage->getFramePrintArea().Height() );
}
}
@@ -2400,8 +2405,8 @@ static SwTwips lcl_CalcAutoWidth( const SwLayoutFrame& rFrame )
const SwPageFrame* pPage = rFrame.FindPageFrame();
// auto width table
nMin = pFrame->GetUpper()->IsVertical() ?
- pPage->getSwPrint().Height() :
- pPage->getSwPrint().Width();
+ pPage->getFramePrintArea().Height() :
+ pPage->getFramePrintArea().Width();
}
else
{
@@ -2556,7 +2561,7 @@ const SwFrameFormat& SwFlyFrame::GetFrameFormat() const
const SwRect SwFlyFrame::GetObjRect() const
{
- return getSwFrame();
+ return geFrameArea();
}
// #i70122#
@@ -2569,16 +2574,16 @@ const SwRect SwFlyFrame::GetObjBoundRect() const
// #i68520#
bool SwFlyFrame::SetObjTop_( const SwTwips _nTop )
{
- const bool bChanged( getSwFrame().Pos().getY() != _nTop );
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ const bool bChanged( geFrameArea().Pos().getY() != _nTop );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().setY(_nTop);
return bChanged;
}
bool SwFlyFrame::SetObjLeft_( const SwTwips _nLeft )
{
- const bool bChanged( getSwFrame().Pos().getX() != _nLeft );
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ const bool bChanged( geFrameArea().Pos().getX() != _nLeft );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().setX(_nLeft);
return bChanged;
@@ -2638,18 +2643,18 @@ SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips
if ( Lower()->IsColumnFrame() )
{
FormatWidthCols( *pAttrs, nUL, nMinHeight );
- nHeight = aRectFnSet.GetHeight(Lower()->getSwFrame());
+ nHeight = aRectFnSet.GetHeight(Lower()->geFrameArea());
}
else
{
SwFrame *pFrame = Lower();
while ( pFrame )
{
- nHeight += aRectFnSet.GetHeight(pFrame->getSwFrame());
+ nHeight += aRectFnSet.GetHeight(pFrame->geFrameArea());
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->getSwPrint());
+ - aRectFnSet.GetHeight(pFrame->getFramePrintArea());
else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
nHeight += static_cast<SwSectionFrame*>(pFrame)->Undersize();
pFrame = pFrame->GetNext();
@@ -2658,9 +2663,9 @@ SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips
if ( GetDrawObjs() )
{
const size_t nCnt = GetDrawObjs()->size();
- SwTwips nTop = aRectFnSet.GetTop(getSwFrame());
- SwTwips nBorder = aRectFnSet.GetHeight(getSwFrame()) -
- aRectFnSet.GetHeight(getSwPrint());
+ SwTwips nTop = aRectFnSet.GetTop(geFrameArea());
+ SwTwips nBorder = aRectFnSet.GetHeight(geFrameArea()) -
+ aRectFnSet.GetHeight(getFramePrintArea());
for ( size_t i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
@@ -2670,10 +2675,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->getSwFrame().Top() != FAR_AWAY &&
+ pFly->geFrameArea().Top() != FAR_AWAY &&
pFly->GetFormat()->GetFollowTextFlow().GetValue() )
{
- SwTwips nDist = -aRectFnSet.BottomDist( pFly->getSwFrame(), nTop );
+ SwTwips nDist = -aRectFnSet.BottomDist( pFly->geFrameArea(), 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 ed1b139b48ba..54eed9fa5d9a 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->getSwFrame().Left();
+ SwTwips aResult = pCnt->geFrameArea().Left();
if ( bVertL2R )
aResult += pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
else
- aResult += pCnt->getSwFrame().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
+ aResult += pCnt->geFrameArea().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
return aResult;
}
else
- return pCnt->getSwFrame().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
+ return pCnt->geFrameArea().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->getSwFrame().Pos(), nullptr, false );
+ pContent = pNode->getLayoutFrame( getRootFrame(), &pOldAnchor->geFrameArea().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(getSwFrame()) );
+ Point aOldPos( aRectFnSet.GetPos(geFrameArea()) );
SwFlyFreeFrame::MakeAll(pRenderContext);
const bool bPosChgDueToOwnFormat =
- aOldPos != aRectFnSet.GetPos(getSwFrame());
+ aOldPos != aRectFnSet.GetPos(geFrameArea());
// #i3317#
if ( !ConsiderObjWrapInfluenceOnObjPos() &&
OverlapsPrevColumn() )
@@ -446,8 +446,8 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
}
- if ( aOldPos != aRectFnSet.GetPos(getSwFrame()) ||
- ( !GetValidPosFlag() &&
+ if ( aOldPos != aRectFnSet.GetPos(geFrameArea()) ||
+ ( !isFrameAreaPositionValid() &&
( pFooter || bPosChgDueToOwnFormat ) ) )
{
bOsz = aOszCntrl.ChkOsz();
@@ -476,7 +476,7 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
}
- if ( bExtra && Lower() && !Lower()->GetValidPosFlag() )
+ if ( bExtra && Lower() && !Lower()->isFrameAreaPositionValid() )
{
// If a multi column frame leaves invalid columns because of
// a position change, we loop once more and format
@@ -484,7 +484,7 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
InvalidateSize_();
bExtra = false; // Ensure only one additional loop run
}
- } while ( !IsValid() && !bOsz &&
+ } while ( !isFrameAreaDefinitionValid() && !bOsz &&
// #i3317#
!bConsiderWrapInfluenceDueToOverlapPrevCol &&
// #i40444#
@@ -507,8 +507,8 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
if ( pCellFrame )
{
SwRectFnSet aRectFnSet(pCellFrame);
- if ( aRectFnSet.GetTop(pCellFrame->getSwFrame()) == 0 &&
- aRectFnSet.GetHeight(pCellFrame->getSwFrame()) == 0 )
+ if ( aRectFnSet.GetTop(pCellFrame->geFrameArea()) == 0 &&
+ aRectFnSet.GetHeight(pCellFrame->geFrameArea()) == 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->getSwFrame().IsInside( rPt ) )
+ if ( pCnt->geFrameArea().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->getSwFrame().IsInside( rPt ) )
+ if ( pUp->geFrameArea().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->getSwFrame().Top() )
+ else if ( rPt.Y() <= pUp->geFrameArea().Top() )
{
// <rPt> point is above environment of given content frame
// correct for vertical layout?
rRet.nMain = LONG_MAX;
}
- else if( rPt.X() < pUp->getSwFrame().Left() &&
- rPt.Y() <= ( bVert ? pUp->getSwFrame().Top() : pUp->getSwFrame().Bottom() ) )
+ else if( rPt.X() < pUp->geFrameArea().Left() &&
+ rPt.Y() <= ( bVert ? pUp->geFrameArea().Top() : pUp->geFrameArea().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->getSwFrame().Top() + pLay->getSwPrint().Bottom()) <rPt.Y())||
- (!bVert && (pLay->getSwFrame().Left() + pLay->getSwPrint().Right())<rPt.X()) )
+ (bVert && (pLay->geFrameArea().Top() + pLay->getFramePrintArea().Bottom()) <rPt.Y())||
+ (!bVert && (pLay->geFrameArea().Left() + pLay->getFramePrintArea().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->getSwFrame().Left() + pUp->getSwPrint().Right()) - nTopForObjPos )
- : ( nTopForObjPos - (pUp->getSwFrame().Left() + pUp->getSwPrint().Left() ) ) )
- : ( (pUp->getSwFrame().Top() + pUp->getSwPrint().Bottom()) - nTopForObjPos );
+ ? ( (pUp->geFrameArea().Left() + pUp->getFramePrintArea().Right()) - nTopForObjPos )
+ : ( nTopForObjPos - (pUp->geFrameArea().Left() + pUp->getFramePrintArea().Left() ) ) )
+ : ( (pUp->geFrameArea().Top() + pUp->getFramePrintArea().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->getSwFrame().Left();
+ nFrameTop = pLay->geFrameArea().Left();
else
- nFrameTop = pLay->getSwFrame().Left() + pLay->getSwFrame().Width();
- nPrtHeight = pLay->getSwPrint().Width();
+ nFrameTop = pLay->geFrameArea().Left() + pLay->geFrameArea().Width();
+ nPrtHeight = pLay->getFramePrintArea().Width();
}
else
{
- nFrameTop = pLay->getSwFrame().Top();
- nPrtHeight = pLay->getSwPrint().Height();
+ nFrameTop = pLay->geFrameArea().Top();
+ nPrtHeight = pLay->getFramePrintArea().Height();
}
pSect = pNxtSect;
}
@@ -672,24 +672,24 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pSect->getSwFrame().Right();
- nPrtHeight = pLay->getSwFrame().Left() + pLay->getSwPrint().Left()
- + pLay->getSwPrint().Width() - pSect->getSwFrame().Left()
- - pSect->getSwFrame().Width();
+ nFrameTop = pSect->geFrameArea().Right();
+ nPrtHeight = pLay->geFrameArea().Left() + pLay->getFramePrintArea().Left()
+ + pLay->getFramePrintArea().Width() - pSect->geFrameArea().Left()
+ - pSect->geFrameArea().Width();
}
else
{
- nFrameTop = pSect->getSwFrame().Left();
- nPrtHeight = pSect->getSwFrame().Left() - pLay->getSwFrame().Left()
- - pLay->getSwPrint().Left();
+ nFrameTop = pSect->geFrameArea().Left();
+ nPrtHeight = pSect->geFrameArea().Left() - pLay->geFrameArea().Left()
+ - pLay->getFramePrintArea().Left();
}
}
else
{
- nFrameTop = pSect->getSwFrame().Bottom();
- nPrtHeight = pLay->getSwFrame().Top() + pLay->getSwPrint().Top()
- + pLay->getSwPrint().Height() - pSect->getSwFrame().Top()
- - pSect->getSwFrame().Height();
+ nFrameTop = pSect->geFrameArea().Bottom();
+ nPrtHeight = pLay->geFrameArea().Top() + pLay->getFramePrintArea().Top()
+ + pLay->getFramePrintArea().Height() - pSect->geFrameArea().Top()
+ - pSect->geFrameArea().Height();
}
pSect = nullptr;
}
@@ -700,26 +700,26 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pLay->getSwFrame().Left();
- nPrtHeight = pLay->getSwPrint().Width();
+ nFrameTop = pLay->geFrameArea().Left();
+ nPrtHeight = pLay->getFramePrintArea().Width();
}
else
{
- nFrameTop = pLay->getSwFrame().Left() + pLay->getSwFrame().Width();
- nPrtHeight = pLay->getSwPrint().Width();
+ nFrameTop = pLay->geFrameArea().Left() + pLay->geFrameArea().Width();
+ nPrtHeight = pLay->getFramePrintArea().Width();
}
}
else
{
- nFrameTop = pLay->getSwFrame().Top();
- nPrtHeight = pLay->getSwPrint().Height();
+ nFrameTop = pLay->geFrameArea().Top();
+ nPrtHeight = pLay->getFramePrintArea().Height();
}
bSct = nullptr != pSect;
}
- while ( pLay && !pLay->getSwFrame().IsInside( rPt ) &&
- ( pLay->getSwFrame().Top() <= rPt.Y() || pLay->IsInFly() ||
+ while ( pLay && !pLay->geFrameArea().IsInside( rPt ) &&
+ ( pLay->geFrameArea().Top() <= rPt.Y() || pLay->IsInFly() ||
( pLay->IsInSct() &&
- pLay->FindSctFrame()->GetUpper()->getSwFrame().Top() <= rPt.Y())) )
+ pLay->FindSctFrame()->GetUpper()->geFrameArea().Top() <= rPt.Y())) )
{
if ( pLay->IsFootnoteContFrame() )
{
@@ -753,19 +753,19 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pLay->getSwFrame().Left();
- nPrtHeight = pLay->getSwPrint().Width();
+ nFrameTop = pLay->geFrameArea().Left();
+ nPrtHeight = pLay->getFramePrintArea().Width();
}
else
{
- nFrameTop = pLay->getSwFrame().Left() + pLay->getSwFrame().Width();
- nPrtHeight = pLay->getSwPrint().Width();
+ nFrameTop = pLay->geFrameArea().Left() + pLay->geFrameArea().Width();
+ nPrtHeight = pLay->getFramePrintArea().Width();
}
}
else
{
- nFrameTop = pLay->getSwFrame().Top();
- nPrtHeight = pLay->getSwPrint().Height();
+ nFrameTop = pLay->geFrameArea().Top();
+ nPrtHeight = pLay->getFramePrintArea().Height();
}
}
else
@@ -775,24 +775,24 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pSect->getSwFrame().Right();
- nPrtHeight = pLay->getSwFrame().Left()+pLay->getSwPrint().Left()
- + pLay->getSwPrint().Width() - pSect->getSwFrame().Left()
- - pSect->getSwFrame().Width();
+ nFrameTop = pSect->geFrameArea().Right();
+ nPrtHeight = pLay->geFrameArea().Left()+pLay->getFramePrintArea().Left()
+ + pLay->getFramePrintArea().Width() - pSect->geFrameArea().Left()
+ - pSect->geFrameArea().Width();
}
else
{
- nFrameTop = pSect->getSwFrame().Left();
- nPrtHeight = pSect->getSwFrame().Left() -
- pLay->getSwFrame().Left() - pLay->getSwPrint().Left();
+ nFrameTop = pSect->geFrameArea().Left();
+ nPrtHeight = pSect->geFrameArea().Left() -
+ pLay->geFrameArea().Left() - pLay->getFramePrintArea().Left();
}
}
else
{
- nFrameTop = pSect->getSwFrame().Bottom();
- nPrtHeight = pLay->getSwFrame().Top()+pLay->getSwPrint().Top()
- + pLay->getSwPrint().Height() - pSect->getSwFrame().Top()
- - pSect->getSwFrame().Height();
+ nFrameTop = pSect->geFrameArea().Bottom();
+ nPrtHeight = pLay->geFrameArea().Top()+pLay->getFramePrintArea().Top()
+ + pLay->getFramePrintArea().Height() - pSect->geFrameArea().Top()
+ - pSect->geFrameArea().Height();
}
pSect = nullptr;
}
@@ -803,19 +803,19 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrameTop = pLay->getSwFrame().Left();
- nPrtHeight = pLay->getSwPrint().Width();
+ nFrameTop = pLay->geFrameArea().Left();
+ nPrtHeight = pLay->getFramePrintArea().Width();
}
else
{
- nFrameTop = pLay->getSwFrame().Left() + pLay->getSwFrame().Width();
- nPrtHeight = pLay->getSwPrint().Width();
+ nFrameTop = pLay->geFrameArea().Left() + pLay->geFrameArea().Width();
+ nPrtHeight = pLay->getFramePrintArea().Width();
}
}
else
{
- nFrameTop = pLay->getSwFrame().Top();
- nPrtHeight = pLay->getSwPrint().Height();
+ nFrameTop = pLay->geFrameArea().Top();
+ nPrtHeight = pLay->getFramePrintArea().Height();
}
bSct = nullptr != pSect;
}
@@ -823,7 +823,7 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
}
if ( pLay )
{
- if ( pLay->getSwFrame().IsInside( rPt ) )
+ if ( pLay->geFrameArea().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->getSwFrame().Left(), rPt.X() ) -
- std::min( pCnt->getSwFrame().Left(), rPt.X() ),
- dY = std::max( pCnt->getSwFrame().Top(), rPt.Y() ) -
- std::min( pCnt->getSwFrame().Top(), rPt.Y() );
+ sal_uInt64 dX = std::max( pCnt->geFrameArea().Left(), rPt.X() ) -
+ std::min( pCnt->geFrameArea().Left(), rPt.X() ),
+ dY = std::max( pCnt->geFrameArea().Top(), rPt.Y() ) -
+ std::min( pCnt->geFrameArea().Top(), rPt.Y() );
// square of the difference will do fine here
const sal_uInt64 nDiff = (dX * dX) + (dY * dY);
- if ( pCnt->getSwFrame().Top() <= rPt.Y() )
+ if ( pCnt->geFrameArea().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->getSwFrame().Top() <= rPt.Y() )
+ if ( pNew->geFrameArea().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->getSwFrame().Top() <= rPt.Y() )
+ if ( pNew->geFrameArea().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->getSwFrame().Top() > rPt.Y() )
+ if ( pRet->geFrameArea().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->getSwPrint() );
- aTmp += pFrame->getSwFrame().Pos();
+ SwRect aTmp( pFrame->getFramePrintArea() );
+ aTmp += pFrame->geFrameArea().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->getSwFrame().IsInside( aNew ) )
+ if ( pCnt->IsInDocBody() == bBody && pCnt->geFrameArea().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->getSwFrame().IsInside( aNew ) )
+ if ( pTmp && pTmp->geFrameArea().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() + getSwFrame().Width());
+ aNew.setX(aNew.getX() + geFrameArea().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() + getSwFrame().Width());
+ aNew.setX(aNew.getX() + geFrameArea().Width());
else
- aNew.setX(aNew.getX() - getSwFrame().Width());
+ aNew.setX(aNew.getX() - geFrameArea().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->getSwFrame().IsInside( aNew ) )
+ if ( pCnt->geFrameArea().IsInside( aNew ) )
{
// #i70582#
if ( bVert )
{
- nY = pCnt->getSwFrame().Left() - rNew.X();
+ nY = pCnt->geFrameArea().Left() - rNew.X();
if ( bVertL2R )
nY = -nY;
else
- nY += pCnt->getSwFrame().Width() - getSwFrame().Width();
+ nY += pCnt->geFrameArea().Width() - geFrameArea().Width();
nY -= pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
else
- nY = rNew.Y() - pCnt->getSwFrame().Top() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
+ nY = rNew.Y() - pCnt->geFrameArea().Top() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
else
{
@@ -1256,20 +1256,20 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
if( pUp->IsVertical() )
{
if ( pUp->IsVertLR() )
- nDiff += pUp->getSwPrint().Width() - pFollow->GetRelPos().getX();
+ nDiff += pUp->getFramePrintArea().Width() - pFollow->GetRelPos().getX();
else
- nDiff += pFollow->getSwFrame().Left() + pFollow->getSwFrame().Width()
- - pUp->getSwFrame().Left() - pUp->getSwPrint().Left();
+ nDiff += pFollow->geFrameArea().Left() + pFollow->geFrameArea().Width()
+ - pUp->geFrameArea().Left() - pUp->getFramePrintArea().Left();
}
else
- nDiff += pUp->getSwPrint().Height() - pFollow->GetRelPos().Y();
+ nDiff += pUp->getFramePrintArea().Height() - pFollow->GetRelPos().Y();
pFollow = pFollow->GetFollow();
} while ( pFollow != pOriginal );
nY += nDiff;
if( bVert )
- nX = pCnt->getSwFrame().Top() - pOriginal->getSwFrame().Top();
+ nX = pCnt->geFrameArea().Top() - pOriginal->geFrameArea().Top();
else
- nX = pCnt->getSwFrame().Left() - pOriginal->getSwFrame().Left();
+ nX = pCnt->geFrameArea().Left() - pOriginal->geFrameArea().Left();
}
if ( nY == LONG_MAX )
@@ -1294,25 +1294,25 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
if( bVert )
{
if( !pFrame )
- nX += rNew.Y() - pCnt->getSwFrame().Top();
+ nX += rNew.Y() - pCnt->geFrameArea().Top();
else
- nX = rNew.Y() - pFrame->getSwFrame().Top();
+ nX = rNew.Y() - pFrame->geFrameArea().Top();
}
else
{
if( !pFrame )
{
if ( pCnt->IsRightToLeft() )
- nX += pCnt->getSwFrame().Right() - rNew.X() - getSwFrame().Width();
+ nX += pCnt->geFrameArea().Right() - rNew.X() - geFrameArea().Width();
else
- nX += rNew.X() - pCnt->getSwFrame().Left();
+ nX += rNew.X() - pCnt->geFrameArea().Left();
}
else
{
if ( pFrame->IsRightToLeft() )
- nX += pFrame->getSwFrame().Right() - rNew.X() - getSwFrame().Width();
+ nX += pFrame->geFrameArea().Right() - rNew.X() - geFrameArea().Width();
else
- nX = rNew.X() - pFrame->getSwFrame().Left();
+ nX = rNew.X() - pFrame->geFrameArea().Left();
}
}
GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
@@ -1406,13 +1406,13 @@ void SwFlyAtContentFrame::RegisterAtCorrectPage()
void SwFlyAtContentFrame::MakeObjPos()
{
// if fly frame position is valid, nothing is to do. Thus, return
- if ( mbValidPos )
+ if ( isFrameAreaPositionValid() )
{
return;
}
// #i26791# - validate position flag here.
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
// #i35911# - no calculation of new position, if
// anchored object is marked that it clears its environment and its
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 6544bad582ab..88b9418ffc16 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -75,7 +75,7 @@ void SwFlyInContentFrame::SetRefPoint( const Point& rPoint,
SwRectFnSet aRectFnSet(GetAnchorFrame());
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetPos( aFrm, rPoint + rRelPos );
}
@@ -84,7 +84,7 @@ void SwFlyInContentFrame::SetRefPoint( const Point& rPoint,
if( pNotify )
{
InvalidatePage();
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
m_bInvalid = true;
Calc(getRootFrame()->GetCurrShell()->GetOut());
delete pNotify;
@@ -135,7 +135,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 ( !getSwFrame().Height() )
+ if ( !geFrameArea().Height() )
{
Lock(); //don't format the anchor on the crook.
SwContentFrame *pContent = ContainsContent();
@@ -155,9 +155,9 @@ void SwFlyInContentFrame::Format( vcl::RenderContext* pRenderContext, const SwBo
**/
void SwFlyInContentFrame::MakeObjPos()
{
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
{
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
SwFlyFrameFormat *pFormat = GetFormat();
const SwFormatVertOrient &rVert = pFormat->GetVertOrient();
//Update the current values in the format if needed, during this we of
@@ -227,26 +227,31 @@ void SwFlyInContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( IsClipped() )
- mbValidSize = m_bHeightClipped = m_bWidthClipped = false;
+ {
+ setFrameAreaSizeValid(false);
+ m_bHeightClipped = m_bWidthClipped = false;
+ }
- while ( !mbValidPos || !mbValidSize || !mbValidPrtArea || !m_bValidContentPos )
+ while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() || !m_bValidContentPos )
{
//Only stop, if the flag is set!!
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- mbValidPrtArea = false;
+ setFramePrintAreaValid(false);
}
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
MakePrtArea( rAttrs );
m_bValidContentPos = false;
}
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
+ {
Format( getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
+ }
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
{
MakeObjPos();
}
@@ -256,16 +261,17 @@ void SwFlyInContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// re-activate clipping of as-character anchored Writer fly frames
// depending on compatibility option <ClipAsCharacterAnchoredWriterFlyFrames>
- if ( mbValidPos && mbValidSize &&
- GetFormat()->getIDocumentSettingAccess().get( DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME ) )
+ if ( isFrameAreaPositionValid() &&
+ isFrameAreaSizeValid() &&
+ GetFormat()->getIDocumentSettingAccess().get( DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME ) )
{
SwFrame* pFrame = AnchorFrame();
- if ( getSwFrame().Left() == (pFrame->getSwFrame().Left()+pFrame->getSwPrint().Left()) &&
- getSwFrame().Width() > pFrame->getSwPrint().Width() )
+ if ( geFrameArea().Left() == (pFrame->geFrameArea().Left()+pFrame->getFramePrintArea().Left()) &&
+ geFrameArea().Width() > pFrame->getFramePrintArea().Width() )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
- aFrm.Width( pFrame->getSwPrint().Width() );
- mbValidPrtArea = false;
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aFrm.Width( pFrame->getFramePrintArea().Width() );
+ setFramePrintAreaValid(false);
m_bWidthClipped = true;
}
}
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 9226ee283336..d4f225b35dd0 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -125,7 +125,8 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( IsClipped() )
{
- mbValidSize = m_bHeightClipped = m_bWidthClipped = false;
+ setFrameAreaSizeValid(false);
+ m_bHeightClipped = m_bWidthClipped = false;
// no invalidation of position,
// if anchored object is anchored inside a Writer fly frame,
// its position is already locked, and it follows the text flow.
@@ -136,7 +137,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
GetAnchorFrame()->IsInFly() &&
GetFrameFormat().GetFollowTextFlow().GetValue() ) )
{
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
}
}
@@ -144,7 +145,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
int nLoopControlRuns = 0;
const int nLoopControlMax = 10;
- while ( !mbValidPos || !mbValidSize || !mbValidPrtArea || m_bFormatHeightOnly || !m_bValidContentPos )
+ while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() || m_bFormatHeightOnly || !m_bValidContentPos )
{
SwRectFnSet aRectFnSet(this);
const SwFormatFrameSize *pSz;
@@ -155,43 +156,49 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
pSz = &rAttrs.GetAttrSet().GetFrameSize();
// Only set when the flag is set!
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- mbValidPrtArea = false;
+ setFramePrintAreaValid(false);
}
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
MakePrtArea( rAttrs );
m_bValidContentPos = false;
}
- if ( !mbValidSize || m_bFormatHeightOnly )
+ if ( !isFrameAreaSizeValid() || m_bFormatHeightOnly )
{
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
Format( getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
m_bFormatHeightOnly = false;
}
}
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
{
- const Point aOldPos( aRectFnSet.GetPos(getSwFrame()) );
+ const Point aOldPos( aRectFnSet.GetPos(geFrameArea()) );
// #i26791# - use new method <MakeObjPos()>
// #i34753# - no positioning, if requested.
if ( IsNoMakePos() )
- mbValidPos = true;
+ {
+ setFrameAreaPositionValid(true);
+ }
else
// #i26791# - use new method <MakeObjPos()>
MakeObjPos();
- if( aOldPos == aRectFnSet.GetPos(getSwFrame()) )
+ if( aOldPos == aRectFnSet.GetPos(geFrameArea()) )
{
- if( !mbValidPos && GetAnchorFrame()->IsInSct() &&
- !GetAnchorFrame()->FindSctFrame()->IsValid() )
- mbValidPos = true;
+ if( !isFrameAreaPositionValid() && GetAnchorFrame()->IsInSct() &&
+ !GetAnchorFrame()->FindSctFrame()->isFrameAreaDefinitionValid() )
+ {
+ setFrameAreaPositionValid(true);
+ }
}
else
- mbValidSize = false;
+ {
+ setFrameAreaSizeValid(false);
+ }
}
if ( !m_bValidContentPos )
@@ -201,7 +208,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
MakeContentPos( rAttrs );
}
- if ( mbValidPos && mbValidSize )
+ if ( isFrameAreaPositionValid() && isFrameAreaSizeValid() )
{
++nLoopControlRuns;
@@ -217,8 +224,8 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
#if OSL_DEBUG_LEVEL > 0
SwRectFnSet aRectFnSet(this);
- OSL_ENSURE( m_bHeightClipped || ( aRectFnSet.GetHeight(getSwFrame()) > 0 &&
- aRectFnSet.GetHeight(getSwPrint()) > 0),
+ OSL_ENSURE( m_bHeightClipped || ( aRectFnSet.GetHeight(geFrameArea()) > 0 &&
+ aRectFnSet.GetHeight(getFramePrintArea()) > 0),
"SwFlyFreeFrame::Format(), flipping Fly." );
#endif
@@ -275,8 +282,8 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
::CalcClipRect( pObj, aTmpStretch, false );
aClip.Intersection_( aTmpStretch );
- const long nBot = getSwFrame().Top() + getSwFrame().Height();
- const long nRig = getSwFrame().Left() + getSwFrame().Width();
+ const long nBot = geFrameArea().Top() + geFrameArea().Height();
+ const long nRig = geFrameArea().Left() + geFrameArea().Width();
const long nClipBot = aClip.Top() + aClip.Height();
const long nClipRig = aClip.Left() + aClip.Width();
@@ -296,14 +303,14 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
// now the flyframe can change its position and so on ...
if ( !pHeader || !pHeader->IsHeaderFrame() )
{
- const long nOld = getSwFrame().Top();
+ const long nOld = geFrameArea().Top();
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().Y() = std::max( aClip.Top(), nClipBot - aFrm.Height() );
}
- if ( getSwFrame().Top() != nOld )
+ if ( geFrameArea().Top() != nOld )
{
bAgain = true;
}
@@ -313,21 +320,21 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
}
if ( bRig )
{
- const long nOld = getSwFrame().Left();
+ const long nOld = geFrameArea().Left();
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().X() = std::max( aClip.Left(), nClipRig - aFrm.Width() );
}
- if ( getSwFrame().Left() != nOld )
+ if ( geFrameArea().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 )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().X() = nOld;
}
else
@@ -338,7 +345,9 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
m_bWidthClipped = true;
}
if ( bAgain )
- mbValidSize = false;
+ {
+ setFrameAreaSizeValid(false);
+ }
else
{
// If we reach this branch, the Frame protrudes into forbidden
@@ -347,10 +356,10 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
// For Flys with OLE objects as lower, we make sure that
// we always resize proportionally
- Size aOldSize( getSwFrame().SSize() );
+ Size aOldSize( geFrameArea().SSize() );
// First, setup the FrameRect, then transfer it to the Frame.
- SwRect aFrameRect( getSwFrame() );
+ SwRect aFrameRect( geFrameArea() );
if ( bBot )
{
@@ -435,12 +444,12 @@ 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 = getSwFrame().Height() - getSwPrint().Height();
- const long nPrtWidthDiff = getSwFrame().Width() - getSwPrint().Width();
- maUnclippedFrame = getSwFrame();
+ const long nPrtHeightDiff = geFrameArea().Height() - getFramePrintArea().Height();
+ const long nPrtWidthDiff = geFrameArea().Width() - getFramePrintArea().Width();
+ maUnclippedFrame = geFrameArea();
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Height( aFrameRect.Height() );
aFrm.Width ( std::max( long(MINLAY), aFrameRect.Width() ) );
}
@@ -448,12 +457,12 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
if ( Lower() && Lower()->IsColumnFrame() )
{
ColLock(); //lock grow/shrink
- const Size aTmpOldSize( getSwPrint().SSize() );
+ const Size aTmpOldSize( getFramePrintArea().SSize() );
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
- aPrt.Height( getSwFrame().Height() - nPrtHeightDiff );
- aPrt.Width ( getSwFrame().Width() - nPrtWidthDiff );
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
+ aPrt.Height( geFrameArea().Height() - nPrtHeightDiff );
+ aPrt.Width ( geFrameArea().Width() - nPrtWidthDiff );
}
ChgLowersProp( aTmpOldSize );
@@ -467,20 +476,24 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
} while ( pLow );
::CalcContent( this );
ColUnlock();
- if ( !mbValidSize && !m_bWidthClipped )
- m_bFormatHeightOnly = mbValidSize = true;
+
+ if ( !isFrameAreaSizeValid() && !m_bWidthClipped )
+ {
+ setFrameAreaSizeValid(true);
+ m_bFormatHeightOnly = true;
+ }
}
else
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
- aPrt.Height( getSwFrame().Height() - nPrtHeightDiff );
- aPrt.Width ( getSwFrame().Width() - nPrtWidthDiff );
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
+ aPrt.Height( geFrameArea().Height() - nPrtHeightDiff );
+ aPrt.Width ( geFrameArea().Width() - nPrtWidthDiff );
}
}
}
// #i26945#
- OSL_ENSURE( getSwFrame().Height() >= 0,
+ OSL_ENSURE( geFrameArea().Height() >= 0,
"<SwFlyFreeFrame::CheckClip(..)> - fly frame has negative height now." );
}
@@ -954,7 +967,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
pClip = pFly->GetAnchorFrame();
}
- rRect = pClip->getSwFrame();
+ rRect = pClip->geFrameArea();
SwRectFnSet aRectFnSet(pClip);
// vertical clipping: Top and Bottom, also to PrtArea if necessary
@@ -993,8 +1006,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()->getSwFrame()
- : pClipFrame->getSwFrame();
+ rRect = bMove ? pClipFrame->GetUpper()->geFrameArea()
+ : pClipFrame->geFrameArea();
// #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
@@ -1002,8 +1015,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
const SwTabFrame* pTabFrame = const_cast<SwFlyFrame*>(pFly)
->GetAnchorFrameContainingAnchPos()->FindTabFrame();
- SwRect aTmp( pTabFrame->getSwPrint() );
- aTmp += pTabFrame->getSwFrame().Pos();
+ SwRect aTmp( pTabFrame->getFramePrintArea() );
+ aTmp += pTabFrame->geFrameArea().Pos();
rRect.Union( aTmp );
// #i43913# - consider also the cell frame
const SwFrame* pCellFrame = const_cast<SwFlyFrame*>(pFly)
@@ -1014,8 +1027,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
}
if ( pCellFrame )
{
- aTmp = pCellFrame->getSwPrint();
- aTmp += pCellFrame->getSwFrame().Pos();
+ aTmp = pCellFrame->getFramePrintArea();
+ aTmp += pCellFrame->geFrameArea().Pos();
rRect.Union( aTmp );
}
}
@@ -1030,7 +1043,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
aEnvOfObj.GetVertEnvironmentLayoutFrame( *pVertPosOrientFrame );
if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME )
{
- rRect = rVertClipFrame.getSwFrame();
+ rRect = rVertClipFrame.geFrameArea();
}
else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
{
@@ -1040,14 +1053,14 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
}
else
{
- rRect = rVertClipFrame.getSwFrame();
+ rRect = rVertClipFrame.geFrameArea();
}
}
const SwLayoutFrame* pHoriClipFrame =
pFly->GetAnchorFrame()->FindPageFrame()->GetUpper();
SwRectFnSet aRectFnSet(pFly->GetAnchorFrame());
- aRectFnSet.SetLeft( rRect, aRectFnSet.GetLeft(pHoriClipFrame->getSwFrame()) );
- aRectFnSet.SetRight(rRect, aRectFnSet.GetRight(pHoriClipFrame->getSwFrame()));
+ aRectFnSet.SetLeft( rRect, aRectFnSet.GetLeft(pHoriClipFrame->geFrameArea()) );
+ aRectFnSet.SetRight(rRect, aRectFnSet.GetRight(pHoriClipFrame->geFrameArea()));
}
else
{
@@ -1073,8 +1086,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
if ( pUp->IsRootFrame() )
{
- rRect = pUp->getSwPrint();
- rRect += pUp->getSwFrame().Pos();
+ rRect = pUp->getFramePrintArea();
+ rRect += pUp->geFrameArea().Pos();
pUp = nullptr;
}
}
@@ -1087,7 +1100,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
pUp = pPg->FindBodyCont();
if (pUp)
{
- rRect = pUp->GetUpper()->getSwFrame();
+ rRect = pUp->GetUpper()->geFrameArea();
aRectFnSet.SetTop( rRect, aRectFnSet.GetPrtTop(*pUp) );
aRectFnSet.SetBottom(rRect, aRectFnSet.GetPrtBottom(*pUp));
}
@@ -1095,7 +1108,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
else
{
if( ( pUp->GetType() & (SwFrameType::Fly | SwFrameType::Ftn ) ) &&
- !pUp->getSwFrame().IsInside( pFly->getSwFrame().Pos() ) )
+ !pUp->geFrameArea().IsInside( pFly->geFrameArea().Pos() ) )
{
if( pUp->IsFlyFrame() )
{
@@ -1103,7 +1116,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
while( pTmpFly->GetNextLink() )
{
pTmpFly = pTmpFly->GetNextLink();
- if( pTmpFly->getSwFrame().IsInside( pFly->getSwFrame().Pos() ) )
+ if( pTmpFly->geFrameArea().IsInside( pFly->geFrameArea().Pos() ) )
break;
}
pUp = pTmpFly;
@@ -1114,26 +1127,26 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
while( pTmp->GetFollow() )
{
pTmp = pTmp->GetFollow();
- if( pTmp->getSwFrame().IsInside( pFly->getSwFrame().Pos() ) )
+ if( pTmp->geFrameArea().IsInside( pFly->geFrameArea().Pos() ) )
break;
}
pUp = pTmp;
}
}
- rRect = pUp->getSwPrint();
- rRect.Pos() += pUp->getSwFrame().Pos();
+ rRect = pUp->getFramePrintArea();
+ rRect.Pos() += pUp->geFrameArea().Pos();
if ( pUp->GetType() & (SwFrameType::Header | SwFrameType::Footer) )
{
- rRect.Left ( pUp->GetUpper()->getSwFrame().Left() );
- rRect.Width( pUp->GetUpper()->getSwFrame().Width());
+ rRect.Left ( pUp->GetUpper()->geFrameArea().Left() );
+ rRect.Width( pUp->GetUpper()->geFrameArea().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->getSwFrame().Left() );
- rRect.Width( pUp->getSwFrame().Width() );
+ rRect.Left ( pUp->geFrameArea().Left() );
+ rRect.Width( pUp->geFrameArea().Width() );
}
}
}
@@ -1141,8 +1154,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->getSwPrint() );
- aTmp += pCell->getSwFrame().Pos();
+ SwRect aTmp( pCell->getFramePrintArea() );
+ aTmp += pCell->geFrameArea().Pos();
rRect.Union( aTmp );
}
}
@@ -1153,11 +1166,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->getSwFrame();
+ rRect = pUp->geFrameArea();
if( !pUp->IsBodyFrame() )
{
- rRect += pUp->getSwPrint().Pos();
- rRect.SSize( pUp->getSwPrint().SSize() );
+ rRect += pUp->getFramePrintArea().Pos();
+ rRect.SSize( pUp->getFramePrintArea().SSize() );
if ( pUp->IsCellFrame() )
{
const SwFrame *pTab = pUp->FindTabFrame();
@@ -1168,7 +1181,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()->getSwFrame()) );
+ aRectFnSet.SetRight( rRect, aRectFnSet.GetRight(pUp->GetUpper()->geFrameArea()) );
}
long nHeight = (9*aRectFnSet.GetHeight(rRect))/10;
long nTop;
@@ -1179,7 +1192,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->getSwFrame());
+ long nWidth = aRectFnSet.GetWidth(pFly->geFrameArea());
aRectFnSet.SetLeftAndWidth( rRect, aRectFnSet.IsVert() ?
static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().Y() :
static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().X(), nWidth );
@@ -1187,9 +1200,9 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
}
else
{
- nTop = aRectFnSet.YInc( aRectFnSet.GetBottom(pFly->getSwFrame()),
+ nTop = aRectFnSet.YInc( aRectFnSet.GetBottom(pFly->geFrameArea()),
rUL.GetLower() - nHeight );
- nHeight = 2*nHeight - aRectFnSet.GetHeight(pFly->getSwFrame())
+ nHeight = 2*nHeight - aRectFnSet.GetHeight(pFly->geFrameArea())
- rUL.GetLower() - rUL.GetUpper();
}
aRectFnSet.SetTopAndHeight( rRect, nTop, nHeight );
@@ -1210,8 +1223,8 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
pAnchorFrame = pC->GetAnchorFrame();
}
const SwFrame* pUp = pAnchorFrame->GetUpper();
- rRect = pUp->getSwPrint();
- rRect += pUp->getSwFrame().Pos();
+ rRect = pUp->getFramePrintArea();
+ rRect += pUp->geFrameArea().Pos();
SwRectFnSet aRectFnSet(pAnchorFrame);
long nHeight = (9*aRectFnSet.GetHeight(rRect))/10;
long nTop;
@@ -1249,7 +1262,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->getSwFrame();
+ rRect = pClipFrame->geFrameArea();
}
else
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 471f46a851b8..23dc1d4e2fb2 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -80,10 +80,10 @@ bool StackHack::bLocked = false;
SwFrameNotify::SwFrameNotify( SwFrame *pF ) :
mpFrame( pF ),
- maFrame( pF->getSwFrame() ),
- maPrt( pF->getSwPrint() ),
+ maFrame( pF->geFrameArea() ),
+ maPrt( pF->getFramePrintArea() ),
mbInvaKeep( false ),
- mbValidSize( pF->GetValidSizeFlag() )
+ mbValidSize( pF->isFrameAreaSizeValid() )
{
if ( pF->IsTextFrame() )
{
@@ -102,11 +102,11 @@ SwFrameNotify::SwFrameNotify( SwFrame *pF ) :
SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
{
SwRectFnSet aRectFnSet(mpFrame);
- const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->getSwFrame());
+ const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->geFrameArea());
const bool bChgWidth =
- aRectFnSet.GetWidth(maFrame) != aRectFnSet.GetWidth(mpFrame->getSwFrame());
+ aRectFnSet.GetWidth(maFrame) != aRectFnSet.GetWidth(mpFrame->geFrameArea());
const bool bChgHeight =
- aRectFnSet.GetHeight(maFrame)!=aRectFnSet.GetHeight(mpFrame->getSwFrame());
+ aRectFnSet.GetHeight(maFrame)!=aRectFnSet.GetHeight(mpFrame->geFrameArea());
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->getSwFrame());
+ long nNewHeight = aRectFnSet.GetHeight(mpFrame->geFrameArea());
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->getSwFrame()) ) > 0 )
+ aRectFnSet.TopDist( maFrame, aRectFnSet.GetTop(mpFrame->geFrameArea()) ) > 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->getSwPrint());
+ aRectFnSet.GetWidth(maPrt) != aRectFnSet.GetWidth(mpFrame->getFramePrintArea());
const bool bPrtHeight =
- aRectFnSet.GetHeight(maPrt)!=aRectFnSet.GetHeight(mpFrame->getSwPrint());
+ aRectFnSet.GetHeight(maPrt)!=aRectFnSet.GetHeight(mpFrame->getFramePrintArea());
if ( bPrtWidth || bPrtHeight )
{
bool bUseNewFillProperties(false);
@@ -227,7 +227,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
}
}
- const bool bPrtP = aRectFnSet.PosDiff( maPrt, mpFrame->getSwPrint() );
+ const bool bPrtP = aRectFnSet.PosDiff( maPrt, mpFrame->getFramePrintArea() );
if ( bAbsP || bPrtP || bChgWidth || bChgHeight ||
bPrtWidth || bPrtHeight || bChgFlyBasePos )
{
@@ -360,7 +360,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
}
}
}
- else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->GetValidSizeFlag() )
+ else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->isFrameAreaSizeValid() )
{
SwRootFrame *pRootFrame = mpFrame->getRootFrame();
if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
@@ -445,7 +445,7 @@ SwLayNotify::~SwLayNotify()
SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(mpFrame);
SwRectFnSet aRectFnSet(pLay);
bool bNotify = false;
- if ( pLay->getSwPrint().SSize() != maPrt.SSize() )
+ if ( pLay->getFramePrintArea().SSize() != maPrt.SSize() )
{
if ( !IsLowersComplete() )
{
@@ -454,10 +454,10 @@ SwLayNotify::~SwLayNotify()
if ( pLay->IsRowFrame() )
{
bInvaPercent = true;
- long nNew = aRectFnSet.GetHeight(pLay->getSwPrint());
+ long nNew = aRectFnSet.GetHeight(pLay->getFramePrintArea());
if( nNew != aRectFnSet.GetHeight(maPrt) )
static_cast<SwRowFrame*>(pLay)->AdjustCells( nNew, true);
- if( aRectFnSet.GetWidth(pLay->getSwPrint())
+ if( aRectFnSet.GetWidth(pLay->getFramePrintArea())
!= 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()->getSwFrame())
- != aRectFnSet.GetHeight(pLay->getSwPrint());
+ aRectFnSet.GetHeight(pLay->Lower()->geFrameArea())
+ != aRectFnSet.GetHeight(pLay->getFramePrintArea());
}
else
bLow = false;
@@ -487,15 +487,15 @@ SwLayNotify::~SwLayNotify()
if ( pLay->Lower() )
{
if( pLay->Lower()->IsColumnFrame() && pLay->Lower()->GetNext() )
- bLow = pLay->Lower()->getSwFrame().Height() != pLay->getSwPrint().Height();
+ bLow = pLay->Lower()->geFrameArea().Height() != pLay->getFramePrintArea().Height();
else
- bLow = pLay->getSwPrint().Width() != maPrt.Width();
+ bLow = pLay->getFramePrintArea().Width() != maPrt.Width();
}
else
bLow = false;
}
else if( pLay->IsFooterFrame() && !pLay->HasFixSize() )
- bLow = pLay->getSwPrint().Width() != maPrt.Width();
+ bLow = pLay->getFramePrintArea().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->getSwPrint().Height() > maPrt.Height() ||
- pLay->getSwPrint().Width() > maPrt.Width()) &&
+ if ( (pLay->getFramePrintArea().Height() > maPrt.Height() ||
+ pLay->getFramePrintArea().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->getSwPrint().Height() - maPrt.Height() );
+ pLay->InvaPercentLowers( pLay->getFramePrintArea().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->getSwPrint() );
- const bool bPos = bPrtPos || aRectFnSet.PosDiff( maFrame, pLay->getSwFrame() );
- const bool bSize = pLay->getSwFrame().SSize() != maFrame.SSize();
+ const bool bPrtPos = aRectFnSet.PosDiff( maPrt, pLay->getFramePrintArea() );
+ const bool bPos = bPrtPos || aRectFnSet.PosDiff( maFrame, pLay->geFrameArea() );
+ const bool bSize = pLay->geFrameArea().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->getSwFrame() );
- const bool bFrameChgd = pFly->getSwFrame().SSize() != maFrame.SSize();
- const bool bPrtChgd = maPrt != pFly->getSwPrint();
+ const bool bPosChgd = aRectFnSet.PosDiff( maFrame, pFly->geFrameArea() );
+ const bool bFrameChgd = pFly->geFrameArea().SSize() != maFrame.SSize();
+ const bool bPrtChgd = maPrt != pFly->getFramePrintArea();
if ( bPosChgd || bFrameChgd || bPrtChgd )
{
pFly->NotifyDrawObj();
@@ -748,8 +748,8 @@ SwContentNotify::~SwContentNotify()
pCnt->SetCompletePaint();
SwRectFnSet aRectFnSet(pCnt);
- if ( pCnt->IsInTab() && ( aRectFnSet.PosDiff( pCnt->getSwFrame(), maFrame ) ||
- pCnt->getSwFrame().SSize() != maFrame.SSize()))
+ if ( pCnt->IsInTab() && ( aRectFnSet.PosDiff( pCnt->geFrameArea(), maFrame ) ||
+ pCnt->geFrameArea().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->getSwPrint().SSize();
+ maPrt.SSize() != pCnt->getFramePrintArea().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->getSwPrint(), &pFly->getSwFrame(),
+ &pFly->getFramePrintArea(), &pFly->geFrameArea(),
bNoTextFramePrtAreaChanged );
}
}
@@ -862,10 +862,10 @@ SwContentNotify::~SwContentNotify()
}
}
//dito animated graphics
- if ( getSwFrame().HasArea() && static_cast<SwNoTextFrame*>(pCnt)->HasAnimation() )
+ if ( geFrameArea().HasArea() && static_cast<SwNoTextFrame*>(pCnt)->HasAnimation() )
{
static_cast<SwNoTextFrame*>(pCnt)->StopAnimation();
- pSh->InvalidateWindows( getSwFrame() );
+ pSh->InvalidateWindows( geFrameArea() );
}
}
}
@@ -936,7 +936,7 @@ SwContentNotify::~SwContentNotify()
}
// #i44049#
- if ( pCnt->IsTextFrame() && aRectFnSet.PosDiff( maFrame, pCnt->getSwFrame() ) )
+ if ( pCnt->IsTextFrame() && aRectFnSet.PosDiff( maFrame, pCnt->geFrameArea() ) )
{
pCnt->InvalidateObjs();
}
@@ -1120,8 +1120,8 @@ static void lcl_SetPos( SwFrame& _rNewFrame,
const SwLayoutFrame& _rLayFrame )
{
SwRectFnSet aRectFnSet(&_rLayFrame);
- SwFrameRect::FrameWriteAccess aFrm(_rNewFrame);
- aRectFnSet.SetPos( aFrm, aRectFnSet.GetPos(_rLayFrame.getSwFrame()) );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(_rNewFrame);
+ aRectFnSet.SetPos( aFrm, aRectFnSet.GetPos(_rLayFrame.geFrameArea()) );
// move position by one SwTwip in text flow direction in order to get
// notifications for a new calculated position after its formatting.
@@ -2516,7 +2516,7 @@ void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling )
SwFrame* pLast;
do
{ pSav->mpUpper = pParent;
- nGrowVal += aRectFnSet.GetHeight(pSav->getSwFrame());
+ nGrowVal += aRectFnSet.GetHeight(pSav->geFrameArea());
pSav->InvalidateAll_();
// register Flys, if TextFrames than also invalidate appropriately
@@ -2740,7 +2740,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
}
- else if ( pOldPrt && *pOldPrt != pFly->getSwPrint() &&
+ else if ( pOldPrt && *pOldPrt != pFly->getFramePrintArea() &&
pFly->GetFormat()->GetSurround().IsContour() )
{
// #i24097#
@@ -2755,10 +2755,10 @@ static void lcl_CheckFlowBack( SwFrame* pFrame, const SwRect &rRect )
{
if( pFrame->IsLayoutFrame() )
{
- if( rRect.IsOver( pFrame->getSwFrame() ) )
+ if( rRect.IsOver( pFrame->geFrameArea() ) )
lcl_CheckFlowBack( static_cast<SwLayoutFrame*>(pFrame)->Lower(), rRect );
}
- else if( !pFrame->GetNext() && nBottom > pFrame->getSwFrame().Bottom() )
+ else if( !pFrame->GetNext() && nBottom > pFrame->geFrameArea().Bottom() )
{
if( pFrame->IsContentFrame() && static_cast<SwContentFrame*>(pFrame)->HasFollow() )
pFrame->InvalidateSize();
@@ -2774,8 +2774,8 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrame *pCnt,
{
if ( pCnt->IsTextFrame() )
{
- SwRect aCntPrt( pCnt->getSwPrint() );
- aCntPrt.Pos() += pCnt->getSwFrame().Pos();
+ SwRect aCntPrt( pCnt->getFramePrintArea() );
+ aCntPrt.Pos() += pCnt->geFrameArea().Pos();
if ( eHint == PREP_FLY_ATTR_CHG )
{
// #i35640# - use given rectangle <rRect> instead
@@ -2896,8 +2896,8 @@ void Notify_Background( const SdrObject* pObj,
// instead of <GetCurrentBoundRect()>, because a recalculation
// of the bounding rectangle isn't intended here.
if (!isValidTableBeforeAnchor
- && (pTab->getSwFrame().IsOver(pObj->GetLastBoundRect()) ||
- pTab->getSwFrame().IsOver(rRect)))
+ && (pTab->geFrameArea().IsOver(pObj->GetLastBoundRect()) ||
+ pTab->geFrameArea().IsOver(rRect)))
{
if ( !pFlyFrame || !pFlyFrame->IsLowerOf( pTab ) )
pTab->InvalidatePrt();
@@ -2908,8 +2908,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->getSwFrame().IsOver( pObj->GetLastBoundRect() ) ||
- pCell->getSwFrame().IsOver( rRect ) ) )
+ ( pCell->geFrameArea().IsOver( pObj->GetLastBoundRect() ) ||
+ pCell->geFrameArea().IsOver( rRect ) ) )
{
const SwFormatVertOrient &rOri = pCell->GetFormat()->GetVertOrient();
if ( text::VertOrientation::NONE != rOri.GetVertOrient() )
@@ -2930,7 +2930,7 @@ void Notify_Background( const SdrObject* pObj,
if( pAnchoredObj->GetDrawObj() == pObj )
continue;
SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
- if ( pFly->getSwFrame().Top() == FAR_AWAY )
+ if ( pFly->geFrameArea().Top() == FAR_AWAY )
continue;
if ( !pFlyFrame ||
@@ -2947,10 +2947,10 @@ void Notify_Background( const SdrObject* pObj,
if( pFly->IsFlyLayFrame() )
{
if( pFly->Lower() && pFly->Lower()->IsColumnFrame() &&
- pFly->getSwFrame().Bottom() >= rRect.Top() &&
- pFly->getSwFrame().Top() <= rRect.Bottom() &&
- pFly->getSwFrame().Right() >= rRect.Left() &&
- pFly->getSwFrame().Left() <= rRect.Right() )
+ pFly->geFrameArea().Bottom() >= rRect.Top() &&
+ pFly->geFrameArea().Top() <= rRect.Bottom() &&
+ pFly->geFrameArea().Right() >= rRect.Left() &&
+ pFly->geFrameArea().Left() <= rRect.Right() )
{
pFly->InvalidateSize();
}
@@ -2967,8 +2967,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->getSwFrame().Bottom() >= rRect.Top() &&
- pFly->getSwFrame().Top() <= rRect.Bottom()) )
+ (pFly->geFrameArea().Bottom() >= rRect.Top() &&
+ pFly->geFrameArea().Top() <= rRect.Bottom()) )
pFly->InvalidatePos();
}
}
@@ -2993,14 +2993,14 @@ const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos )
if( pFrame->IsTextFrame() )
{
pFrame = pFrame->GetUpper();
- if( !pFrame->getSwFrame().IsInside( rPos ) )
+ if( !pFrame->geFrameArea().IsInside( rPos ) )
{
if( pFrame->IsFootnoteFrame() )
{
const SwFootnoteFrame* pTmp = static_cast<const SwFootnoteFrame*>(pFrame)->GetFollow();
while( pTmp )
{
- if( pTmp->getSwFrame().IsInside( rPos ) )
+ if( pTmp->geFrameArea().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetFollow();
}
@@ -3010,7 +3010,7 @@ const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos )
SwFlyFrame* pTmp = const_cast<SwFlyFrame*>(pFrame->FindFlyFrame());
while( pTmp )
{
- if( pTmp->getSwFrame().IsInside( rPos ) )
+ if( pTmp->geFrameArea().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetNextLink();
}
@@ -3028,7 +3028,7 @@ bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject* pObj)
{
const SwFlyFrame* pFly = pFlyDrawObj->GetFlyFrame();
pFrame = pFly->GetAnchorFrame();
- aPos = pFly->getSwFrame().Pos();
+ aPos = pFly->geFrameArea().Pos();
}
else
{
@@ -3042,7 +3042,7 @@ bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject* pObj)
return true;
if( pFrame->IsFlyFrame() )
{
- aPos = pFrame->getSwFrame().Pos();
+ aPos = pFrame->geFrameArea().Pos();
pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos );
}
else
@@ -3083,7 +3083,7 @@ bool IsFrameInSameContext( const SwFrame *pInnerFrame, const SwFrame *pFrame )
}
if( pFrame->IsFlyFrame() )
{
- Point aPos( pFrame->getSwFrame().Pos() );
+ Point aPos( pFrame->geFrameArea().Pos() );
pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos );
}
else
@@ -3101,9 +3101,9 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell )
long nHeight = 0, nFlyAdd = 0;
do
{
- long nLow = pLow->getSwFrame().Height();
+ long nLow = pLow->geFrameArea().Height();
if( pLow->IsTextFrame() && static_cast<SwTextFrame*>(pLow)->IsUndersized() )
- nLow += static_cast<SwTextFrame*>(pLow)->GetParHeight()-pLow->getSwPrint().Height();
+ nLow += static_cast<SwTextFrame*>(pLow)->GetParHeight()-pLow->getFramePrintArea().Height();
else if( pLow->IsSctFrame() && static_cast<SwSectionFrame*>(pLow)->IsUndersized() )
nLow += static_cast<SwSectionFrame*>(pLow)->Undersize();
nFlyAdd = std::max( 0L, nFlyAdd - nLow );
@@ -3119,7 +3119,7 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell )
const SwBorderAttrs &rAttrs = *aAccess.Get();
nHeight += rAttrs.CalcTop() + rAttrs.CalcBottom();
- return pCell->getSwFrame().Height() - nHeight;
+ return pCell->geFrameArea().Height() - nHeight;
}
else
{
@@ -3148,7 +3148,7 @@ SwTwips CalcRowRstHeight( SwLayoutFrame *pRow )
const SwFrame* FindPage( const SwRect &rRect, const SwFrame *pPage )
{
- if ( !rRect.IsOver( pPage->getSwFrame() ) )
+ if ( !rRect.IsOver( pPage->geFrameArea() ) )
{
const SwRootFrame* pRootFrame = static_cast<const SwRootFrame*>(pPage->GetUpper());
const SwFrame* pTmpPage = pRootFrame ? pRootFrame->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr;
@@ -3239,8 +3239,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->getSwFrame().Pos().X() == FAR_AWAY &&
- pFlyFrame->getSwFrame().Pos().Y() == FAR_AWAY )
+ pFlyFrame->geFrameArea().Pos().X() == FAR_AWAY &&
+ pFlyFrame->geFrameArea().Pos().Y() == FAR_AWAY )
{
SwObjectFormatter::FormatObj( *pFlyFrame );
}
@@ -3260,11 +3260,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->getSwFrame().Pos().getX() &&
- FAR_AWAY == pTmpFrame->getSwFrame().Pos().getY() )
- aCalcRect = static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame()->getSwFrame();
+ FAR_AWAY == pTmpFrame->geFrameArea().Pos().getX() &&
+ FAR_AWAY == pTmpFrame->geFrameArea().Pos().getY() )
+ aCalcRect = static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame()->geFrameArea();
else
- aCalcRect = pTmpFrame->getSwFrame();
+ aCalcRect = pTmpFrame->geFrameArea();
if ( aCalcRect.IsInside( *pPoint ) )
{
@@ -3310,8 +3310,8 @@ bool IsExtraData( const SwDoc *pDoc )
// OD 22.09.2003 #110978#
const SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const
{
- SwRect aPrtWithoutHeaderFooter( getSwPrint() );
- aPrtWithoutHeaderFooter.Pos() += getSwFrame().Pos();
+ SwRect aPrtWithoutHeaderFooter( getFramePrintArea() );
+ aPrtWithoutHeaderFooter.Pos() += geFrameArea().Pos();
const SwFrame* pLowerFrame = Lower();
while ( pLowerFrame )
@@ -3321,12 +3321,12 @@ const SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const
if ( pLowerFrame->IsHeaderFrame() )
{
aPrtWithoutHeaderFooter.Top( aPrtWithoutHeaderFooter.Top() +
- pLowerFrame->getSwFrame().Height() );
+ pLowerFrame->geFrameArea().Height() );
}
if ( pLowerFrame->IsFooterFrame() )
{
aPrtWithoutHeaderFooter.Bottom( aPrtWithoutHeaderFooter.Bottom() -
- pLowerFrame->getSwFrame().Height() );
+ pLowerFrame->geFrameArea().Height() );
}
pLowerFrame = pLowerFrame->GetNext();
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index a1b8dcef7768..25801cd9e18a 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->getSwPrint());
+ aRectFnSet.GetHeight(pFrame->getFramePrintArea());
if( nRet < 0 )
nRet = 0;
}
@@ -188,22 +188,23 @@ void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const
const SwTwips nBorder = rInf.GetTopDist() + rInf.GetBottomDist() +
rInf.GetLineWidth();
SwRectFnSet aRectFnSet(this);
- if ( !mbValidPrtArea )
+
+ if ( !isFramePrintAreaValid() )
{
- mbValidPrtArea = true;
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ setFramePrintAreaValid(true);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetTop( aPrt, nBorder );
- aRectFnSet.SetWidth( aPrt, aRectFnSet.GetWidth(getSwFrame()) );
- aRectFnSet.SetHeight(aPrt, aRectFnSet.GetHeight(getSwFrame()) - nBorder );
+ aRectFnSet.SetWidth( aPrt, aRectFnSet.GetWidth(geFrameArea()) );
+ aRectFnSet.SetHeight(aPrt, aRectFnSet.GetHeight(geFrameArea()) - nBorder );
if( aRectFnSet.GetHeight(aPrt) < 0 && !pPage->IsFootnotePage() )
{
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
}
}
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
bool bGrow = pPage->IsFootnotePage();
if( bGrow )
@@ -224,7 +225,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->getSwFrame()) + lcl_Undersize( pFrame );
+ nRemaining += aRectFnSet.GetHeight(pFrame->geFrameArea()) + lcl_Undersize( pFrame );
pFrame = pFrame->GetNext();
}
// add the own border
@@ -233,20 +234,20 @@ void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const
SwTwips nDiff;
if( IsInSct() )
{
- nDiff = -aRectFnSet.BottomDist( getSwFrame(), aRectFnSet.GetPrtBottom(*GetUpper()) );
+ nDiff = -aRectFnSet.BottomDist( geFrameArea(), aRectFnSet.GetPrtBottom(*GetUpper()) );
if( nDiff > 0 )
{
- if( nDiff > aRectFnSet.GetHeight(getSwFrame()) )
+ if( nDiff > aRectFnSet.GetHeight(geFrameArea()) )
{
- nDiff = aRectFnSet.GetHeight(getSwFrame());
+ nDiff = aRectFnSet.GetHeight(geFrameArea());
}
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, -nDiff );
aRectFnSet.AddHeight( aFrm, -nDiff );
}
}
- nDiff = aRectFnSet.GetHeight(getSwFrame()) - nRemaining;
+ nDiff = aRectFnSet.GetHeight(geFrameArea()) - nRemaining;
if ( nDiff > 0 )
Shrink( nDiff );
else if ( nDiff < 0 )
@@ -255,16 +256,17 @@ 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(getSwPrint());
+ SwTwips nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea());
if( nPrtHeight < 0 )
{
- const SwTwips nTmpDiff = std::max( aRectFnSet.GetTop(getSwPrint()), -nPrtHeight );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ const SwTwips nTmpDiff = std::max( aRectFnSet.GetTop(getFramePrintArea()), -nPrtHeight );
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SubTop( aPrt, nTmpDiff );
}
}
}
- mbValidSize = true;
+
+ setFrameAreaSizeValid(true);
}
}
@@ -276,9 +278,9 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
assert(GetUpper() && GetUpper()->IsFootnoteBossFrame());
SwRectFnSet aRectFnSet(this);
- if( aRectFnSet.GetHeight(getSwFrame()) > 0 &&
- nDist > ( LONG_MAX - aRectFnSet.GetHeight(getSwFrame()) ) )
- nDist = LONG_MAX - aRectFnSet.GetHeight(getSwFrame());
+ if( aRectFnSet.GetHeight(geFrameArea()) > 0 &&
+ nDist > ( LONG_MAX - aRectFnSet.GetHeight(geFrameArea()) ) )
+ nDist = LONG_MAX - aRectFnSet.GetHeight(geFrameArea());
SwFootnoteBossFrame *pBoss = static_cast<SwFootnoteBossFrame*>(GetUpper());
if( IsInSct() )
@@ -302,7 +304,7 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
if ( pBoss->GetMaxFootnoteHeight() != LONG_MAX )
{
nDist = std::min( nDist, pBoss->GetMaxFootnoteHeight()
- - aRectFnSet.GetHeight(getSwFrame()) );
+ - aRectFnSet.GetHeight(geFrameArea()) );
if ( nDist <= 0 )
return 0L;
}
@@ -316,17 +318,17 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
return 0L;
}
}
- else if( nDist > aRectFnSet.GetHeight(GetPrev()->getSwFrame()) )
+ else if( nDist > aRectFnSet.GetHeight(GetPrev()->geFrameArea()) )
// do not use more space than the body has
- nDist = aRectFnSet.GetHeight(GetPrev()->getSwFrame());
+ nDist = aRectFnSet.GetHeight(GetPrev()->geFrameArea());
long nAvail = 0;
if ( bBrowseMode )
{
- nAvail = GetUpper()->getSwPrint().Height();
+ nAvail = GetUpper()->getFramePrintArea().Height();
const SwFrame *pAvail = GetUpper()->Lower();
do
- { nAvail -= pAvail->getSwFrame().Height();
+ { nAvail -= pAvail->geFrameArea().Height();
pAvail = pAvail->GetNext();
} while ( pAvail );
if ( nAvail > nDist )
@@ -335,7 +337,7 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
if ( !bTst )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetHeight( aFrm, aRectFnSet.GetHeight(aFrm) + nDist );
if( IsVertical() && !IsVertLR() && !IsReverse() )
@@ -382,7 +384,7 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
nDist -= nReal;
// We can only respect the boundless wish so much
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.SSize().Height() -= nDist;
if( IsVertical() && !IsVertLR() && !IsReverse() )
@@ -512,8 +514,8 @@ void SwFootnoteFrame::Cut()
pSect->InvalidateSize_();
}
else
- { if ( getSwFrame().Height() )
- pUp->Shrink( getSwFrame().Height() );
+ { if ( geFrameArea().Height() )
+ pUp->Shrink( geFrameArea().Height() );
pUp->SetCompletePaint();
pUp->InvalidatePage();
}
@@ -533,15 +535,15 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
SwRectFnSet aRectFnSet(this);
- if( aRectFnSet.GetWidth(getSwFrame())!=aRectFnSet.GetWidth(pParent->getSwPrint()) )
+ if( aRectFnSet.GetWidth(geFrameArea())!=aRectFnSet.GetWidth(pParent->getFramePrintArea()) )
InvalidateSize_();
InvalidatePos_();
SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( GetNext() )
GetNext()->InvalidatePos_();
- if( aRectFnSet.GetHeight(getSwFrame()) )
- pParent->Grow( aRectFnSet.GetHeight(getSwFrame()) );
+ if( aRectFnSet.GetHeight(geFrameArea()) )
+ pParent->Grow( aRectFnSet.GetHeight(geFrameArea()) );
// If the predecessor is the master and/or the successor is the Follow,
// then take their content and destroy them.
@@ -1562,7 +1564,7 @@ void SwFootnoteBossFrame::AppendFootnote( SwContentFrame *pRef, SwTextFootnote *
{
pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrame() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->isFrameAreaDefinitionValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
*(pCnt->FindPageFrame()) ) )
@@ -1917,10 +1919,10 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b
{
pTmp->Prepare( PREP_MOVEFTN );
- SwFrameRect::FrameWriteAccess aFrm(*pTmp);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pTmp);
aRectFnSet.SetHeight(aFrm, 0);
- SwFrameRect::PrintWriteAccess aPrt(*pTmp);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pTmp);
aRectFnSet.SetHeight(aPrt, 0);
pTmp = pTmp->FindNext();
@@ -1931,22 +1933,22 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b
pCnt->Prepare( PREP_MOVEFTN );
}
- SwFrameRect::FrameWriteAccess aFrm(*pCnt);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pCnt);
aRectFnSet.SetHeight(aFrm, 0);
- SwFrameRect::PrintWriteAccess aPrt(*pCnt);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pCnt);
aRectFnSet.SetHeight(aPrt, 0);
pCnt = pCnt->GetNext();
}
{
- SwFrameRect::FrameWriteAccess aFrm(*pFootnote);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFootnote);
aRectFnSet.SetHeight(aFrm, 0);
}
{
- SwFrameRect::PrintWriteAccess aPrt(*pFootnote);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pFootnote);
aRectFnSet.SetHeight(aPrt, 0);
}
@@ -1970,7 +1972,7 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b
pCnt->InvalidatePos_();
pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrame() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->isFrameAreaDefinitionValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
*(pCnt->FindPageFrame()) ) )
@@ -2050,7 +2052,7 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b
pCnt->InvalidatePos_();
pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrame() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->isFrameAreaDefinitionValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
*(pCnt->FindPageFrame()) ) )
@@ -2141,7 +2143,7 @@ void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const boo
pFirst->Calc(getRootFrame()->GetCurrShell()->GetOut());
pContent->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pContent->IsTextFrame() && pContent->IsValid() )
+ if ( pContent->IsTextFrame() && pContent->isFrameAreaDefinitionValid() )
{
SwObjectFormatter::FormatObjsAtFrame( *pContent,
*(pContent->FindPageFrame()) );
@@ -2212,7 +2214,7 @@ void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const boo
{
SwRectFnSet aRectFnSet(this);
SwFrame* pFootnoteContFrame = pFootnoteFrame->GetUpper();
- if ( aRectFnSet.TopDist(pFootnoteFrame->getSwFrame(), aRectFnSet.GetPrtBottom(*pFootnoteContFrame)) > 0 )
+ if ( aRectFnSet.TopDist(pFootnoteFrame->geFrameArea(), aRectFnSet.GetPrtBottom(*pFootnoteContFrame)) > 0 )
{
pFootnoteFrame->InvalidatePos_();
}
@@ -2224,7 +2226,7 @@ void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const boo
pFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut());
pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrame() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->isFrameAreaDefinitionValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
*(pCnt->FindPageFrame()) ) )
@@ -2254,7 +2256,7 @@ void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const boo
pFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut());
pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrame() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->isFrameAreaDefinitionValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
*(pCnt->FindPageFrame()) ) )
@@ -2403,10 +2405,10 @@ void SwFootnoteBossFrame::SetFootnoteDeadLine( const SwTwips nDeadLine )
if ( pCont )
{
pCont->Calc(getRootFrame()->GetCurrShell()->GetOut());
- m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pCont->getSwFrame(), nDeadLine );
+ m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pCont->geFrameArea(), nDeadLine );
}
else
- m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pBody->getSwFrame(), nDeadLine );
+ m_nMaxFootnoteHeight = -aRectFnSet.BottomDist( pBody->geFrameArea(), nDeadLine );
const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
@@ -2437,7 +2439,7 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
{
nRet = 0;
SwTwips nTmp = aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pBody),
- aRectFnSet.GetTop(getSwFrame()) );
+ aRectFnSet.GetTop(geFrameArea()) );
const SwSectionFrame* pSect = FindSctFrame();
// Endnotes in a ftncontainer causes a deadline:
// the bottom of the last contentfrm
@@ -2460,8 +2462,8 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
while( pFrame->GetNext() )
pFrame = pFrame->GetNext(); // last cntntfrm
nTmp += aRectFnSet.YDiff(
- aRectFnSet.GetTop(getSwFrame()),
- aRectFnSet.GetBottom(pFrame->getSwFrame()) );
+ aRectFnSet.GetTop(geFrameArea()),
+ aRectFnSet.GetBottom(pFrame->geFrameArea()) );
}
break;
}
@@ -2473,8 +2475,8 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
nRet = nTmp;
}
else
- nRet = - aRectFnSet.GetHeight(pPg->getSwPrint())/5;
- nRet += aRectFnSet.GetHeight(pBody->getSwFrame());
+ nRet = - aRectFnSet.GetHeight(pPg->getFramePrintArea())/5;
+ nRet += aRectFnSet.GetHeight(pBody->geFrameArea());
if( nRet < 0 )
nRet = 0;
}
@@ -2484,7 +2486,7 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
{
const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
- nRet += BROWSE_HEIGHT - getSwFrame().Height();
+ nRet += BROWSE_HEIGHT - geFrameArea().Height();
}
return nRet;
}
@@ -2739,8 +2741,8 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pO
static_cast<SwSectionFrame*>(pNewUp)->Init();
{
- SwFrameRect::FrameWriteAccess aFrm(*pNewUp);
- aFrm.Pos() = pTmpFootnote->getSwFrame().Pos();
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pNewUp);
+ aFrm.Pos() = pTmpFootnote->geFrameArea().Pos();
aFrm.Pos().Y() += 1; // for notifications
}
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 6a066db2db36..da4196736750 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->getSwFrame().Height();
+ nTmp = pFrame->geFrameArea().Height();
nRemaining += nTmp;
if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
{
nTmp = static_cast<SwTextFrame*>(pFrame)->GetParHeight()
- - pFrame->getSwPrint().Height();
+ - pFrame->getFramePrintArea().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.getSwFrame().Height() < nMinHeight)
+ if (rFrame.geFrameArea().Height() < nMinHeight)
{
- rFrame.Grow(nMinHeight - rFrame.getSwFrame().Height());
+ rFrame.Grow(nMinHeight - rFrame.geFrameArea().Height());
}
}
@@ -171,7 +171,7 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
/* set print area */
// OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)>
SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left(pAttrs->CalcLeft(this));
@@ -184,13 +184,13 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
aPrt.Top(nSpace);
}
- aPrt.Width(getSwFrame().Width() - nLR);
+ aPrt.Width(geFrameArea().Width() - nLR);
SwTwips nNewHeight;
- if (nUL < getSwFrame().Height())
+ if (nUL < geFrameArea().Height())
{
- nNewHeight = getSwFrame().Height() - nUL;
+ nNewHeight = geFrameArea().Height() - nUL;
}
else
{
@@ -202,7 +202,7 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
else
{
// Set position
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left( pAttrs->CalcLeft( this ) );
aPrt.Top ( pAttrs->CalcTop() );
@@ -210,11 +210,11 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
// subtract the borders.
// OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)>
SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this );
- aPrt.Width ( getSwFrame().Width() - nLR );
- aPrt.Height( getSwFrame().Height()- nUL );
+ aPrt.Width ( geFrameArea().Width() - nLR );
+ aPrt.Height( geFrameArea().Height()- nUL );
}
- mbValidPrtArea = true;
+ setFramePrintAreaValid(true);
}
void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
@@ -223,7 +223,8 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
if( !IsColLocked() )
{
- mbValidSize = mbValidPrtArea = true;
+ setFramePrintAreaValid(true);
+ setFrameAreaSizeValid(true);
const SwTwips nBorder = nUL;
SwTwips nMinHeight = lcl_GetFrameMinHeight(*this);
@@ -244,14 +245,14 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
do
{
- nOldHeight = getSwPrint().Height();
+ nOldHeight = getFramePrintArea().Height();
SwFrame* pFrame = Lower();
// #i64301#
if ( pFrame &&
- aOldFooterPrtPos != ( getSwFrame().Pos() + getSwPrint().Pos() ) )
+ aOldFooterPrtPos != ( geFrameArea().Pos() + getFramePrintArea().Pos() ) )
{
pFrame->InvalidatePos_();
- aOldFooterPrtPos = getSwFrame().Pos() + getSwPrint().Pos();
+ aOldFooterPrtPos = geFrameArea().Pos() + getFramePrintArea().Pos();
}
int nLoopControl = 0;
while( pFrame )
@@ -263,10 +264,11 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
// Note: frame could be invalid after calling its format,
// if it's locked
OSL_ENSURE( StackHack::IsLocked() || !pFrame->IsTextFrame() ||
- pFrame->IsValid() ||
+ pFrame->isFrameAreaDefinitionValid() ||
static_cast<SwTextFrame*>(pFrame)->IsJoinLocked(),
"<SwHeadFootFrame::FormatSize(..)> - text frame invalid and not locked." );
- if ( pFrame->IsTextFrame() && pFrame->IsValid() )
+
+ if ( pFrame->IsTextFrame() && pFrame->isFrameAreaDefinitionValid() )
{
if ( !SwObjectFormatter::FormatObjsAtFrame( *pFrame,
*(pFrame->FindPageFrame()) ) )
@@ -288,13 +290,13 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
while ( pFrame )
{
- nRemaining += pFrame->getSwFrame().Height();
+ nRemaining += pFrame->geFrameArea().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->getSwPrint().Height();
+ - pFrame->getFramePrintArea().Height();
else if( pFrame->IsSctFrame() &&
static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize();
@@ -371,35 +373,42 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
else
break;
// Don't overwrite the lower edge of the upper
- if ( GetUpper() && getSwFrame().Height() )
+ if ( GetUpper() && geFrameArea().Height() )
{
- const SwTwips nDeadLine = GetUpper()->getSwFrame().Top() + GetUpper()->getSwPrint().Bottom();
- const SwTwips nBot = getSwFrame().Bottom();
+ const SwTwips nDeadLine = GetUpper()->geFrameArea().Top() + GetUpper()->getFramePrintArea().Bottom();
+ const SwTwips nBot = geFrameArea().Bottom();
if ( nBot > nDeadLine )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Bottom( nDeadLine );
- SwFrameRect::PrintWriteAccess aPrt(*this);
- aPrt.SSize().Height() = getSwFrame().Height() - nBorder;
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
+ aPrt.SSize().Height() = geFrameArea().Height() - nBorder;
}
}
- mbValidSize = mbValidPrtArea = true;
- } while( nRemaining<=nMaxHeight && nOldHeight!=getSwPrint().Height() );
+
+ setFramePrintAreaValid(true);
+ setFrameAreaSizeValid(true);
+ } while( nRemaining<=nMaxHeight && nOldHeight!=getFramePrintArea().Height() );
ColUnlock();
}
- mbValidSize = mbValidPrtArea = true;
+
+ setFramePrintAreaValid(true);
+ setFrameAreaSizeValid(true);
}
else //if (GetType() & FRM_HEADFOOT)
{
do
{
- if ( getSwFrame().Height() != pAttrs->GetSize().Height() )
- ChgSize( Size( getSwFrame().Width(), pAttrs->GetSize().Height()));
- mbValidSize = true;
+ if ( geFrameArea().Height() != pAttrs->GetSize().Height() )
+ {
+ ChgSize( Size( geFrameArea().Width(), pAttrs->GetSize().Height()));
+ }
+
+ setFrameAreaSizeValid(true);
MakePos();
- } while ( !mbValidSize );
+ } while ( !isFrameAreaSizeValid() );
}
}
@@ -407,7 +416,7 @@ void SwHeadFootFrame::Format(vcl::RenderContext* pRenderContext, const SwBorderA
{
OSL_ENSURE( pAttrs, "SwFooterFrame::Format, pAttrs is 0." );
- if ( mbValidPrtArea && mbValidSize )
+ if ( isFramePrintAreaValid() && isFrameAreaSizeValid() )
return;
if ( ! GetEatSpacing() && IsHeaderFrame())
@@ -420,10 +429,10 @@ void SwHeadFootFrame::Format(vcl::RenderContext* pRenderContext, const SwBorderA
long nUL = pAttrs->CalcTop() + pAttrs->CalcBottom();
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
FormatPrt(nUL, pAttrs);
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
FormatSize(nUL, pAttrs);
}
}
@@ -456,9 +465,9 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
/* calculate maximum eatable spacing */
if (IsHeaderFrame())
- nMaxEat = getSwFrame().Height() - getSwPrint().Top() - getSwPrint().Height() - pAttrs->CalcBottomLine();
+ nMaxEat = geFrameArea().Height() - getFramePrintArea().Top() - getFramePrintArea().Height() - pAttrs->CalcBottomLine();
else
- nMaxEat = getSwPrint().Top() - pAttrs->CalcTopLine();
+ nMaxEat = getFramePrintArea().Top() - pAttrs->CalcTopLine();
if (nMaxEat < 0)
nMaxEat = 0;
@@ -466,7 +475,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 - getSwFrame().Height();
+ SwTwips nFrameTooSmall = nMinHeight - geFrameArea().Height();
if (nFrameTooSmall > 0)
nEat -= nFrameTooSmall;
@@ -487,7 +496,7 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if (! IsHeaderFrame())
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Top(aPrt.Top() - nEat);
aPrt.Height(aPrt.Height() - nEat);
}
@@ -545,7 +554,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
nResult = 0;
SwTwips nMinHeight = lcl_GetFrameMinHeight(*this);
- SwTwips nOldHeight = getSwFrame().Height();
+ SwTwips nOldHeight = geFrameArea().Height();
SwTwips nRest = 0; // Amount to shrink by spitting out spacing
if ( nOldHeight >= nMinHeight )
@@ -591,7 +600,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
SwTwips nShrink = nRest;
/* calculate maximum shrinking */
- SwTwips nMaxShrink = getSwPrint().Height() - nMinPrtHeight;
+ SwTwips nMaxShrink = getFramePrintArea().Height() - nMinPrtHeight;
/* shrink no more than maximum shrinking */
if (nShrink > nMaxShrink)
@@ -604,7 +613,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if (! IsHeaderFrame() )
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Top(aPrt.Top() + nShrink);
aPrt.Height(aPrt.Height() - nShrink);
}
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index b2169e48bf70..8af03a14b2fe 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->getSwFrame() ) )
+ if ( pFly == pSelfFly || !rRect.IsOver( pFly->geFrameArea() ) )
continue;
if ( pSelfFly && pSelfFly->IsLowerOf( pFly ) )
@@ -169,7 +169,7 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrame *p
continue;
}
- aTmp -= pFly->getSwFrame();
+ aTmp -= pFly->geFrameArea();
}
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->getSwFrame());
+ long nNewHeight = aRectFnSet.GetHeight(pCnt->geFrameArea());
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->getSwFrame().Bottom() < rVis.Top() )
+ while( pPg && pPg->geFrameArea().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->getSwFrame().Top() < nBottom ||
+ while ( pPg && ( pPg->geFrameArea().Top() < nBottom ||
( IsIdle() && pPg == pPage ) ) )
{
unlockPositionOfObjects( pPg );
@@ -777,12 +777,12 @@ bool SwLayAction::TurboAction_( const SwContentFrame *pCnt )
{
const SwPageFrame *pPage = nullptr;
- if ( !pCnt->IsValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() )
+ if ( !pCnt->isFrameAreaDefinitionValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() )
{
const SwRect aOldRect( pCnt->UnionFrame( true ) );
- const long nOldBottom = pCnt->getSwFrame().Top() + pCnt->getSwPrint().Bottom();
+ const long nOldBottom = pCnt->geFrameArea().Top() + pCnt->getFramePrintArea().Bottom();
pCnt->Calc(m_pImp->GetShell()->GetOut());
- if ( pCnt->getSwFrame().Bottom() < aOldRect.Bottom() )
+ if ( pCnt->geFrameArea().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->getSwFrame() );
+ m_pImp->GetShell()->AddPaintRect( pCnt->geFrameArea() );
// 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
@@ -849,8 +849,8 @@ bool SwLayAction::TurboAction()
static bool lcl_IsInvaLay( const SwFrame *pFrame, long nBottom )
{
- return !pFrame->IsValid() ||
- (pFrame->IsCompletePaint() && ( pFrame->getSwFrame().Top() < nBottom ) );
+ return !pFrame->isFrameAreaDefinitionValid() ||
+ (pFrame->IsCompletePaint() && ( pFrame->geFrameArea().Top() < nBottom ) );
}
static const SwFrame *lcl_FindFirstInvaLay( const SwFrame *pFrame, long nBottom )
@@ -882,9 +882,9 @@ static const SwFrame *lcl_FindFirstInvaContent( const SwLayoutFrame *pLay, long
pLay->ContainsContent();
while ( pCnt )
{
- if ( !pCnt->IsValid() || pCnt->IsCompletePaint() )
+ if ( !pCnt->isFrameAreaDefinitionValid() || pCnt->IsCompletePaint() )
{
- if ( pCnt->getSwFrame().Top() <= nBottom )
+ if ( pCnt->geFrameArea().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->getSwFrame().Top() <= nBottom )
+ if ( pFly->geFrameArea().Top() <= nBottom )
return pFly;
}
const SwFrame *pFrame = lcl_FindFirstInvaContent( pFly, nBottom, nullptr );
- if ( pFrame && pFrame->getSwFrame().Bottom() <= nBottom )
+ if ( pFrame && pFrame->geFrameArea().Bottom() <= nBottom )
return pFrame;
}
}
}
}
- if ( pCnt->getSwFrame().Top() > nBottom && !pCnt->IsInTab() )
+ if ( pCnt->geFrameArea().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->getSwFrame().Top() <= _nBottom )
+ if ( pFly->geFrameArea().Top() <= _nBottom )
{
if ( pFly->IsInvalid() || pFly->IsCompletePaint() )
return pFly;
const SwFrame* pTmp;
if ( nullptr != (pTmp = lcl_FindFirstInvaContent( pFly, _nBottom, nullptr )) &&
- pTmp->getSwFrame().Top() <= _nBottom )
+ pTmp->geFrameArea().Top() <= _nBottom )
return pFly;
}
}
@@ -970,7 +970,7 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
// If the page is not valid, we quickly format it, otherwise
// there's gonna be no end of trouble
- if ( !prPage->IsValid() )
+ if ( !prPage->isFrameAreaDefinitionValid() )
{
if ( bBrowse )
{
@@ -994,8 +994,8 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
}
const SwRect &rVis = m_pImp->GetShell()->VisArea();
- if ( (prPage->getSwFrame().Top() >= rVis.Bottom()) ||
- (prPage->getSwFrame().Left()>= rVis.Right()) )
+ if ( (prPage->geFrameArea().Top() >= rVis.Bottom()) ||
+ (prPage->geFrameArea().Left()>= rVis.Right()) )
{
bRet = true;
@@ -1040,8 +1040,8 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
pLst = pContent->FindSctFrame();
pLst = pLst->FindPrev();
if ( pLst &&
- (pLst->getSwFrame().Top() >= rVis.Bottom() ||
- pLst->getSwFrame().Left()>= rVis.Right()) )
+ (pLst->geFrameArea().Top() >= rVis.Bottom() ||
+ pLst->geFrameArea().Left()>= rVis.Right()) )
{
bTstCnt = false;
}
@@ -1057,7 +1057,7 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
if ( pContent->IsInSct() )
{
const SwSectionFrame *pSct = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindSctFrame();
- if ( !pSct->IsValid() )
+ if ( !pSct->isFrameAreaDefinitionValid() )
{
pSct->Calc(pRenderContext);
pSct->SetCompletePaint();
@@ -1069,7 +1069,7 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
}
}
- if ( !bPageChg && !pContent->IsValid() )
+ if ( !bPageChg && !pContent->isFrameAreaDefinitionValid() )
{
pContent->Calc(pRenderContext);
pContent->SetCompletePaint();
@@ -1083,7 +1083,7 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
if ( !bPageChg && pContent->IsInTab() )
{
const SwTabFrame *pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindTabFrame();
- if ( !pTab->IsValid() )
+ if ( !pTab->isFrameAreaDefinitionValid() )
{
pTab->Calc(pRenderContext);
pTab->SetCompletePaint();
@@ -1098,7 +1098,7 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
if ( !bPageChg && pContent->IsInSct() )
{
const SwSectionFrame *pSct = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindSctFrame();
- if ( !pSct->IsValid() )
+ if ( !pSct->isFrameAreaDefinitionValid() )
{
pSct->Calc(pRenderContext);
pSct->SetCompletePaint();
@@ -1160,13 +1160,13 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
const SwFrame* pFrame( nullptr );
if ( prPage->IsInvalidLayout() &&
nullptr != (pFrame = lcl_FindFirstInvaLay( prPage, nBottom )) &&
- pFrame->getSwFrame().Top() <= nBottom )
+ pFrame->geFrameArea().Top() <= nBottom )
{
return false;
}
if ( (prPage->IsInvalidContent() || prPage->IsInvalidFlyInCnt()) &&
nullptr != (pFrame = lcl_FindFirstInvaContent( prPage, nBottom, nullptr )) &&
- pFrame->getSwFrame().Top() <= nBottom )
+ pFrame->geFrameArea().Top() <= nBottom )
{
return false;
}
@@ -1187,12 +1187,12 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
// remember frame at complete paint
SwRect aFrameAtCompletePaint;
- if ( !pLay->IsValid() || pLay->IsCompletePaint() )
+ if ( !pLay->isFrameAreaDefinitionValid() || pLay->IsCompletePaint() )
{
- if ( pLay->GetPrev() && !pLay->GetPrev()->IsValid() )
+ if ( pLay->GetPrev() && !pLay->GetPrev()->isFrameAreaDefinitionValid() )
pLay->GetPrev()->SetCompletePaint();
- SwRect aOldFrame( pLay->getSwFrame() );
+ SwRect aOldFrame( pLay->geFrameArea() );
SwRect aOldRect( aOldFrame );
if( pLay->IsPageFrame() )
{
@@ -1204,12 +1204,12 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
pLay->Calc(pRenderContext);
}
- if ( aOldFrame != pLay->getSwFrame() )
+ if ( aOldFrame != pLay->geFrameArea() )
bChanged = true;
bool bNoPaint = false;
if ( pLay->IsPageBodyFrame() &&
- pLay->getSwFrame().Pos() == aOldRect.Pos() &&
+ pLay->geFrameArea().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->getSwFrame() );
+ SwRect aPaint( pLay->geFrameArea() );
// 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->getSwFrame();
+ aFrameAtCompletePaint = pLay->geFrameArea();
}
// 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->getSwFrame() );
+ SwRect aPageRect( pLay->geFrameArea() );
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->getSwFrame().Top() );
+ aSpaceToPrevPage.Bottom( pLay->geFrameArea().Top() );
if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage );
// left
aSpaceToPrevPage = aPageRect;
aSpaceToPrevPage.Left( aSpaceToPrevPage.Left() - nHalfDocBorder );
- aSpaceToPrevPage.Right( pLay->getSwFrame().Left() );
+ aSpaceToPrevPage.Right( pLay->geFrameArea().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->getSwFrame().Bottom() );
+ aSpaceToNextPage.Top( pLay->geFrameArea().Bottom() );
if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage );
// right
aSpaceToNextPage = aPageRect;
aSpaceToNextPage.Right( aSpaceToNextPage.Right() + nHalfDocBorder );
- aSpaceToNextPage.Left( pLay->getSwFrame().Right() );
+ aSpaceToNextPage.Left( pLay->geFrameArea().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->getSwFrame() );
+ SwRect aBoundRect(pLay->IsPageFrame() ? static_cast<SwPageFrame*>(pLay)->GetBoundRect(pRenderContext) : pLay->geFrameArea() );
if ( bAlreadyPainted &&
( aBoundRect.Width() > aFrameAtCompletePaint.Width() ||
@@ -1396,16 +1396,16 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrame* pFly )
bool bChanged = false;
bool bAddRect = true;
- if ( !pFly->IsValid() || pFly->IsCompletePaint() || pFly->IsInvalid() )
+ if ( !pFly->isFrameAreaDefinitionValid() || pFly->IsCompletePaint() || pFly->IsInvalid() )
{
// The Frame has changed, now it's getting formatted.
- const SwRect aOldRect( pFly->getSwFrame() );
+ const SwRect aOldRect( pFly->geFrameArea() );
pFly->Calc(pRenderContext);
- bChanged = aOldRect != pFly->getSwFrame();
+ bChanged = aOldRect != pFly->geFrameArea();
if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) &&
- pFly->getSwFrame().Top() > 0 && pFly->getSwFrame().Left() > 0 )
- m_pImp->GetShell()->AddPaintRect( pFly->getSwFrame() );
+ pFly->geFrameArea().Top() > 0 && pFly->geFrameArea().Left() > 0 )
+ m_pImp->GetShell()->AddPaintRect( pFly->geFrameArea() );
if ( bChanged )
pFly->Invalidate();
@@ -1455,17 +1455,17 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
// vertical layout support
SwRectFnSet aRectFnSet(pTab);
- if ( !pTab->IsValid() || pTab->IsCompletePaint() || pTab->IsComplete() )
+ if ( !pTab->isFrameAreaDefinitionValid() || pTab->IsCompletePaint() || pTab->IsComplete() )
{
- if ( pTab->GetPrev() && !pTab->GetPrev()->IsValid() )
+ if ( pTab->GetPrev() && !pTab->GetPrev()->isFrameAreaDefinitionValid() )
{
pTab->GetPrev()->SetCompletePaint();
}
- const SwRect aOldRect( pTab->getSwFrame() );
+ const SwRect aOldRect( pTab->geFrameArea() );
pTab->SetLowersFormatted( false );
pTab->Calc(pRenderContext);
- if ( aOldRect != pTab->getSwFrame() )
+ if ( aOldRect != pTab->geFrameArea() )
{
bChanged = true;
}
@@ -1473,13 +1473,13 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
if ( IsPaint() && bAddRect )
{
- // add condition <pTab->getSwFrame().HasArea()>
+ // add condition <pTab->geFrameArea().HasArea()>
if ( !pTab->IsCompletePaint() &&
pTab->IsComplete() &&
- ( pTab->getSwFrame().SSize() != pTab->getSwPrint().SSize() ||
+ ( pTab->geFrameArea().SSize() != pTab->getFramePrintArea().SSize() ||
// vertical layout support
aRectFnSet.GetLeftMargin(*pTab) ) &&
- pTab->getSwFrame().HasArea()
+ pTab->geFrameArea().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->getSwFrame();
+ aMarginRect = pTab->geFrameArea();
aRectFnSet.SetWidth( aMarginRect, nLeftMargin );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
if ( aRectFnSet.GetRightMargin(*pTab) > 0)
{
- aMarginRect = pTab->getSwFrame();
+ aMarginRect = pTab->geFrameArea();
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->getSwFrame();
+ aMarginRect = pTab->geFrameArea();
aRectFnSet.SetHeight( aMarginRect, nTopMargin );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
if ( aRectFnSet.GetBottomMargin(*pTab) > 0)
{
- aMarginRect = pTab->getSwFrame();
+ aMarginRect = pTab->geFrameArea();
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->getSwFrame())) )
+ (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->geFrameArea())) )
return false;
// Now, deal with the lowers
@@ -1568,7 +1568,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
SetNextCycle( true );
// format lowers, only if table frame is valid
- if ( pTab->IsValid() )
+ if ( pTab->isFrameAreaDefinitionValid() )
{
SwLayoutFrame *pLow = static_cast<SwLayoutFrame*>(pTab->Lower());
while ( pLow )
@@ -1592,7 +1592,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
while ( pContent && pPage->IsAnLower( pContent ) )
{
// If the content didn't change, we can use a few shortcuts.
- const bool bFull = !pContent->IsValid() || pContent->IsCompletePaint() ||
+ const bool bFull = !pContent->isFrameAreaDefinitionValid() || pContent->IsCompletePaint() ||
pContent->IsRetouche() || pContent->GetDrawObjs();
if ( bFull )
{
@@ -1603,7 +1603,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
const SwLayoutFrame*pOldUpper = pContent->GetUpper();
const SwTabFrame *pTab = pContent->FindTabFrame();
- const bool bInValid = !pContent->IsValid() || pContent->IsCompletePaint();
+ const bool bInValid = !pContent->isFrameAreaDefinitionValid() || pContent->IsCompletePaint();
const bool bOldPaint = IsPaint();
m_bPaint = bOldPaint && !(pTab && pTab == m_pOptTab);
FormatContent_( pContent, pPage );
@@ -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->getSwFrame() );
+ m_pImp->GetShell()->AddPaintRect( pContent->geFrameArea() );
}
if ( IsAgain() )
@@ -1678,8 +1678,11 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
bool bSetContent = true;
if ( pContentPrev )
{
- if ( !pContentPrev->IsValid() && pPage->IsAnLower( pContentPrev ) )
+ if ( !pContentPrev->isFrameAreaDefinitionValid() && pPage->IsAnLower( pContentPrev ) )
+ {
pPage->InvalidateContent();
+ }
+
if ( pOldUpper != pContent->GetUpper() &&
pPage->GetPhyPageNum() < pContent->FindPageFrame()->GetPhyPageNum() )
{
@@ -1690,7 +1693,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
if ( bSetContent )
{
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
- pContent->getSwFrame().Top() > m_pImp->GetShell()->VisArea().Bottom())
+ pContent->geFrameArea().Top() > m_pImp->GetShell()->VisArea().Bottom())
{
const long nBottom = m_pImp->GetShell()->VisArea().Bottom();
const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage,
@@ -1725,13 +1728,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->getSwFrame() );
+ m_pImp->GetShell()->AddPaintRect( pContent->geFrameArea() );
}
// Do this if the frame has been formatted before.
if ( pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() &&
IsPaint() )
- PaintContent( pContent, pPage, pContent->getSwFrame(), pContent->getSwFrame().Bottom());
+ PaintContent( pContent, pPage, pContent->geFrameArea(), pContent->geFrameArea().Bottom());
if ( IsIdle() )
{
CheckIdleEnd();
@@ -1740,7 +1743,7 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
return false;
}
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
- pContent->getSwFrame().Top() > m_pImp->GetShell()->VisArea().Bottom())
+ pContent->geFrameArea().Top() > m_pImp->GetShell()->VisArea().Bottom())
{
const long nBottom = m_pImp->GetShell()->VisArea().Bottom();
const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage,
@@ -1767,12 +1770,10 @@ bool SwLayAction::FormatContent( const SwPageFrame *pPage )
return !IsInterrupt() || mbFormatContentOnInterrupt;
}
-void SwLayAction::FormatContent_( const SwContentFrame *pContent,
- const SwPageFrame *pPage )
+void SwLayAction::FormatContent_( const SwContentFrame *pContent, const SwPageFrame *pPage )
{
// We probably only ended up here because the Content holds DrawObjects.
- const bool bDrawObjsOnly = pContent->IsValid() && !pContent->IsCompletePaint() &&
- !pContent->IsRetouche();
+ const bool bDrawObjsOnly = pContent->isFrameAreaDefinitionValid() && !pContent->IsCompletePaint() && !pContent->IsRetouche();
SwRectFnSet aRectFnSet(pContent);
if ( !bDrawObjsOnly && IsPaint() )
{
@@ -1781,7 +1782,7 @@ void SwLayAction::FormatContent_( const SwContentFrame *pContent,
pContent->OptCalc();
if( IsAgain() )
return;
- if( aRectFnSet.YDiff( aRectFnSet.GetBottom(pContent->getSwFrame()),
+ if( aRectFnSet.YDiff( aRectFnSet.GetBottom(pContent->geFrameArea()),
aRectFnSet.GetBottom(aOldRect) ) < 0 )
{
pContent->SetRetouche();
@@ -1791,8 +1792,8 @@ void SwLayAction::FormatContent_( const SwContentFrame *pContent,
else
{
if ( IsPaint() && pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() )
- PaintContent( pContent, pPage, pContent->getSwFrame(),
- aRectFnSet.GetBottom(pContent->getSwFrame()) );
+ PaintContent( pContent, pPage, pContent->geFrameArea(),
+ aRectFnSet.GetBottom(pContent->geFrameArea()) );
pContent->OptCalc();
}
}
@@ -1825,7 +1826,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->getSwFrame() );
+ m_pImp->GetShell()->AddPaintRect( pContent->geFrameArea() );
}
if ( IsAgain() )
@@ -2047,7 +2048,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly )
pPage = static_cast<SwPageFrame*>(pPage->GetNext());
if ( pPage && bVisAreaOnly &&
- !pPage->getSwFrame().IsOver( pImp->GetShell()->VisArea()))
+ !pPage->geFrameArea().IsOver( pImp->GetShell()->VisArea()))
break;
}
return false;
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 32e2643deb3b..32043626e8b4 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->getSwFrame().Left() != FAR_AWAY &&
+ if( pFly->geFrameArea().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();
- const SwRect& rRct = pFly->getSwFrame();
- sal_Int32 nX = rRct.Left() - pPage->getSwFrame().Left();
- sal_Int32 nY = rRct.Top() - pPage->getSwFrame().Top();
+ const SwRect& rRct = pFly->geFrameArea();
+ sal_Int32 nX = rRct.Left() - pPage->geFrameArea().Left();
+ sal_Int32 nY = rRct.Top() - pPage->geFrameArea().Top();
aIo.GetStream().WriteUInt16( nPageNum ).WriteUInt32( nOrdNum )
.WriteInt32( nX ).WriteInt32( nY )
.WriteInt32( rRct.Width() )
@@ -807,8 +807,8 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
mrpFrame->InsertBehind( mrpLay, mrpPrv );
{
- SwFrameRect::FrameWriteAccess aFrm(*mrpFrame);
- aFrm.Pos() = mrpLay->getSwFrame().Pos();
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*mrpFrame);
+ aFrm.Pos() = mrpLay->geFrameArea().Pos();
aFrm.Pos().Y() += 1;
}
@@ -880,10 +880,10 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
if( CheckInsertPage() )
{
CheckFlyCache_( pLastPage );
- if( mrpPrv && mrpPrv->IsTextFrame() && !mrpPrv->GetValidSizeFlag() )
+ if( mrpPrv && mrpPrv->IsTextFrame() && !mrpPrv->isFrameAreaSizeValid() )
{
- SwFrameRect::FrameWriteAccess aFrm(*mrpPrv);
- aFrm.Height( mrpPrv->GetUpper()->getSwPrint().Height() );
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*mrpPrv);
+ aFrm.Height( mrpPrv->GetUpper()->getFramePrintArea().Height() );
}
bRet = true;
@@ -917,8 +917,8 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
}
{
- SwFrameRect::FrameWriteAccess aFrm(*pSct);
- aFrm.Pos() = mrpLay->getSwFrame().Pos();
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pSct);
+ aFrm.Pos() = mrpLay->geFrameArea().Pos();
aFrm.Pos().Y() += 1; //because of the notifications
}
@@ -1016,12 +1016,12 @@ void SwLayHelper::CheckFlyCache_( SwPageFrame* pPage )
const SwFlyCache* pFlyCache = *aFlyCacheSetIt;
SwFlyFrame* pFly = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(*aFlySetIt))->GetFlyFrame();
- if ( pFly->getSwFrame().Left() == FAR_AWAY )
+ if ( pFly->geFrameArea().Left() == FAR_AWAY )
{
// we get the stored information
- SwFrameRect::FrameWriteAccess aFrm(*pFly);
- aFrm.Pos().X() = pFlyCache->Left() + pPage->getSwFrame().Left();
- aFrm.Pos().Y() = pFlyCache->Top() + pPage->getSwFrame().Top();
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFly);
+ aFrm.Pos().X() = pFlyCache->Left() + pPage->geFrameArea().Left();
+ aFrm.Pos().Y() = pFlyCache->Top() + pPage->geFrameArea().Top();
if ( mpImpl->IsUseFlyCache() )
{
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 722f3d8d204f..11859831ab19 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.getSwFrame().Pos().X();
- aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrame.getSwFrame().Pos().Y();
- aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrame.getSwFrame().Width();
- aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrame.getSwFrame().Height();
+ aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrame.geFrameArea().Pos().X();
+ aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrame.geFrameArea().Pos().Y();
+ aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrame.geFrameArea().Width();
+ aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrame.geFrameArea().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->getSwFrame(), aRectFnSet.GetPrtBottom(p_rNewUpperFrame) )
- : aRectFnSet.GetHeight(p_rNewUpperFrame.getSwFrame());
+ ? aRectFnSet.BottomDist( pLastLower->geFrameArea(), aRectFnSet.GetPrtBottom(p_rNewUpperFrame) )
+ : aRectFnSet.GetHeight(p_rNewUpperFrame.geFrameArea());
// 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 ad81a3e91b6f..d04756ae03ad 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( getSwFrame().SSize() );
+ mpDrawPage->SetSize( geFrameArea().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->getSwFrame().Top() );
+ SwDocPosUpdate aMsgHint( pPage->geFrameArea().Top() );
rFieldsAccess.UpdatePageFields( &aMsgHint );
}
@@ -654,7 +654,7 @@ void SwRootFrame::AllInvalidateAutoCompleteWords() const
void SwRootFrame::AllAddPaintRect() const
{
- GetCurrShell()->AddPaintRect( getSwFrame() );
+ GetCurrShell()->AddPaintRect( geFrameArea() );
}
void SwRootFrame::AllRemoveFootnotes()
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index c4f0c73ab3b0..43cd7fc94e56 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -364,7 +364,7 @@ void SwObjectFormatter::FormatObj_( SwAnchoredObject& _rAnchoredObj )
// --> #i57917#
// stop formatting of anchored object, if restart of layout process is requested.
- } while ( !rFlyFrame.IsValid() &&
+ } while ( !rFlyFrame.isFrameAreaDefinitionValid() &&
!_rAnchoredObj.RestartLayoutProcess() &&
rFlyFrame.GetAnchorFrame() == &GetAnchorFrame() );
}
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 63326578686b..954b77913b67 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -286,7 +286,7 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
bool SwObjectFormatterTextFrame::DoFormatObjs()
{
- if ( !mrAnchorTextFrame.IsValid() )
+ if ( !mrAnchorTextFrame.isFrameAreaDefinitionValid() )
{
if ( GetLayAction() &&
mrAnchorTextFrame.FindPageFrame() != &GetPageFrame() )
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index b63190b1d38e..b16f9c566779 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -74,19 +74,19 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
// PrtArea of the Upper minus any neighbors (for robustness).
// The PrtArea has always the size of the frame.
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- SwTwips nHeight = GetUpper()->getSwPrint().Height();
- SwTwips nWidth = GetUpper()->getSwPrint().Width();
+ SwTwips nHeight = GetUpper()->getFramePrintArea().Height();
+ SwTwips nWidth = GetUpper()->getFramePrintArea().Width();
const SwFrame *pFrame = GetUpper()->Lower();
do
{
if ( pFrame != this )
{
if( pFrame->IsVertical() )
- nWidth -= pFrame->getSwFrame().Width();
+ nWidth -= pFrame->geFrameArea().Width();
else
- nHeight -= pFrame->getSwFrame().Height();
+ nHeight -= pFrame->geFrameArea().Height();
}
pFrame = pFrame->GetNext();
} while ( pFrame );
@@ -96,7 +96,7 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
nHeight = 0;
}
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Height( nHeight );
if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != aFrm.Width() )
@@ -117,7 +117,7 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
bNoGrid = false;
long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
SwRectFnSet aRectFnSet(this);
- long nSize = aRectFnSet.GetWidth(getSwFrame());
+ long nSize = aRectFnSet.GetWidth(geFrameArea());
long nBorder = 0;
if( GRID_LINES_CHARS == pGrid->GetGridType() )
{
@@ -128,12 +128,12 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
nBorder /= 2;
}
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetPosX( aPrt, nBorder );
aRectFnSet.SetWidth( aPrt, nSize );
// Height of body frame:
- nBorder = aRectFnSet.GetHeight(getSwFrame());
+ nBorder = aRectFnSet.GetHeight(geFrameArea());
// Number of possible lines in area of body frame:
long nNumberOfLines = nBorder / nSum;
@@ -156,14 +156,15 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
if( bNoGrid )
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Pos().setX(0);
aPrt.Pos().setY(0);
- aPrt.Height( getSwFrame().Height() );
- aPrt.Width( getSwFrame().Width() );
+ aPrt.Height( geFrameArea().Height() );
+ aPrt.Width( geFrameArea().Width() );
}
- mbValidSize = mbValidPrtArea = true;
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
}
SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPgDsc ) :
@@ -194,7 +195,7 @@ SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPg
vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr;
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
if ( bBrowseMode )
{
@@ -222,7 +223,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( getSwPrint().SSize() );
+ pBodyFrame->ChgSize( getFramePrintArea().SSize() );
pBodyFrame->Paste( this );
pBodyFrame->Calc(pRenderContext); // so that the columns can be inserted correctly
pBodyFrame->InvalidatePos();
@@ -285,7 +286,7 @@ void SwPageFrame::DestroyImpl()
// including border and shadow area.
const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT);
SwRect aRetoucheRect;
- SwPageFrame::GetBorderAndShadowBoundRect( getSwFrame(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
+ SwPageFrame::GetBorderAndShadowBoundRect( geFrameArea(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
pSh->AddPaintRect( aRetoucheRect );
}
}
@@ -602,11 +603,11 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
}
case RES_FRM_SIZE:
{
- const SwRect aOldPageFrameRect( getSwFrame() );
+ const SwRect aOldPageFrameRect( geFrameArea() );
SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
// OD 28.10.2002 #97265# - Don't call <SwPageFrame::MakeAll()>
// Calculation of the page is not necessary, because its size is
// invalidated here and further invalidation is done in the
@@ -625,7 +626,7 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
static_cast<const SwFormatFrameSize&>(*pNew);
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Height( std::max( rSz.GetHeight(), long(MINLAY) ) );
aFrm.Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
}
@@ -647,7 +648,7 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
pSh->InvalidateWindows( aOldRectWithBorderAndShadow );
}
rInvFlags |= 0x03;
- if ( aOldPageFrameRect.Height() != getSwFrame().Height() )
+ if ( aOldPageFrameRect.Height() != geFrameArea().Height() )
rInvFlags |= 0x04;
}
break;
@@ -800,7 +801,7 @@ void AdjustSizeChgNotify( SwRootFrame *pRoot )
{
rSh.SizeChgNotify();
if ( rSh.Imp() )
- rSh.Imp()->NotifySizeChg( pRoot->getSwFrame().SSize() );
+ rSh.Imp()->NotifySizeChg( pRoot->geFrameArea().SSize() );
}
}
}
@@ -848,7 +849,7 @@ void SwPageFrame::Cut()
}
// cleanup Window
if ( pSh && pSh->GetWin() )
- pSh->InvalidateWindows( getSwFrame() );
+ pSh->InvalidateWindows( geFrameArea() );
}
// decrease the root's page number
@@ -906,7 +907,7 @@ void SwPageFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
else
::SetLastPage( this );
- if( getSwFrame().Width() != pParent->getSwPrint().Width() )
+ if( geFrameArea().Width() != pParent->getFramePrintArea().Width() )
InvalidateSize_();
InvalidatePos();
@@ -1031,7 +1032,7 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
// invalidate the field, starting from here
if ( nDocPos == LONG_MAX )
- nDocPos = pPrevPage ? pPrevPage->getSwFrame().Top() : pPage->getSwFrame().Top();
+ nDocPos = pPrevPage ? pPrevPage->geFrameArea().Top() : pPage->geFrameArea().Top();
// Cases:
// 1. Empty page should be "normal" page -> remove empty page and take next one
@@ -1327,7 +1328,7 @@ SwPageFrame *SwFrame::InsertPage( SwPageFrame *pPrevPage, bool bFootnote )
SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( !pSh || !pSh->Imp()->IsUpdateExpFields() )
{
- SwDocPosUpdate aMsgHint( pPrevPage->getSwFrame().Top() );
+ SwDocPosUpdate aMsgHint( pPrevPage->geFrameArea().Top() );
pDoc->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
return pPage;
@@ -1356,7 +1357,7 @@ SwTwips SwRootFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
{
if ( !bTst )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.SSize().Height() += nDist;
}
@@ -1366,11 +1367,11 @@ SwTwips SwRootFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
SwTwips SwRootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool )
{
OSL_ENSURE( nDist >= 0, "nDist < 0." );
- OSL_ENSURE( nDist <= getSwFrame().Height(), "nDist greater than current size." );
+ OSL_ENSURE( nDist <= geFrameArea().Height(), "nDist greater than current size." );
if ( !bTst )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.SSize().Height() -= nDist;
}
@@ -1461,7 +1462,7 @@ void SwRootFrame::RemoveSuperfluous()
{
SAL_INFO( "sw.pageframe", "RemoveSuperfluous - DestroyFrm p: " << pPage );
RemovePage( &pPage, SwRemoveResult::Prev );
- nDocPos = pPage ? pPage->getSwFrame().Top() : 0;
+ nDocPos = pPage ? pPage->geFrameArea().Top() : 0;
}
} while ( pPage );
@@ -1588,39 +1589,38 @@ void SwRootFrame::AssertPageFlys( SwPageFrame *pPage )
Size SwRootFrame::ChgSize( const Size& aNewSize )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.SSize() = aNewSize;
}
InvalidatePrt_();
mbFixSize = false;
- return getSwFrame().SSize();
+ return geFrameArea().SSize();
}
void SwRootFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
- if ( !mbValidPos )
+ if ( !isFrameAreaPositionValid() )
{
- mbValidPos = true;
-
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ setFrameAreaPositionValid(true);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Pos().setX(DOCUMENTBORDER);
aFrm.Pos().setY(DOCUMENTBORDER);
}
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
- mbValidPrtArea = true;
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ setFramePrintAreaValid(true);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Pos().setX(0);
aPrt.Pos().setY(0);
- aPrt.SSize( getSwFrame().SSize() );
+ aPrt.SSize( geFrameArea().SSize() );
}
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
// SSize is set by the pages (Cut/Paste).
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
}
}
@@ -1732,7 +1732,7 @@ void SwRootFrame::ImplCalcBrowseWidth()
case text::HoriOrientation::INSIDE:
case text::HoriOrientation::LEFT:
if ( text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() )
- nWidth += pFrame->getSwPrint().Left();
+ nWidth += pFrame->getFramePrintArea().Left();
break;
default:
break;
@@ -1924,11 +1924,11 @@ static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset )
static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset )
{
- const SwRect aFrame( pFrame->getSwFrame() );
+ const SwRect aFrame( pFrame->geFrameArea() );
// first move the current frame
{
- SwFrameRect::FrameWriteAccess aFrm(*pFrame);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFrame);
if (aFrm.Pos().X() != FAR_AWAY)
{
@@ -2017,7 +2017,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
maPageRects.clear();
- const long nBorder = getSwFrame().Pos().getX();
+ const long nBorder = geFrameArea().Pos().getX();
const long nVisWidth = mnViewWidth - 2 * nBorder;
const long nGapBetweenPages = pViewOpt ? pViewOpt->GetGapBetweenPages()
: (pSh ? pSh->GetViewOptions()->GetGapBetweenPages()
@@ -2066,15 +2066,15 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
{
const SwFrame& rFormatPage = pPageFrame->GetFormatPage();
- nPageWidth = rFormatPage.getSwFrame().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrame->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages);
- nPageHeight = rFormatPage.getSwFrame().Height() + nGapBetweenPages;
+ nPageWidth = rFormatPage.geFrameArea().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrame->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages);
+ nPageHeight = rFormatPage.geFrameArea().Height() + nGapBetweenPages;
}
else
{
if ( !pPageFrame->IsEmptyPage() )
{
- nPageWidth = pPageFrame->getSwFrame().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages);
- nPageHeight = pPageFrame->getSwFrame().Height() + nGapBetweenPages;
+ nPageWidth = pPageFrame->geFrameArea().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages);
+ nPageHeight = pPageFrame->geFrameArea().Height() + nGapBetweenPages;
}
}
@@ -2123,7 +2123,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->getSwFrame().Width() + nSidebarWidth;
+ SwTwips nLastPageWidth = pLastPageInCurrentRow->geFrameArea().Width() + nSidebarWidth;
while ( ( mnColumns > 0 || nRemain > 0 ) && nNumberOfVirtualPages < nMaxNumberOfVirtualPages )
{
@@ -2147,7 +2147,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
{
// #i88036#
nCurrentRowWidth +=
- pStartOfRow->GetFormatPage().getSwFrame().Width() + nSidebarWidth;
+ pStartOfRow->GetFormatPage().geFrameArea().Width() + nSidebarWidth;
}
// center page if possible
@@ -2164,7 +2164,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
if ( bFirstRow && mbBookMode )
{
// #i88036#
- nX += pStartOfRow->GetFormatPage().getSwFrame().Width() + nSidebarWidth;
+ nX += pStartOfRow->GetFormatPage().geFrameArea().Width() + nSidebarWidth;
}
SwPageFrame* pEndOfRow = pPageFrame;
@@ -2176,8 +2176,8 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
if ( mbBookMode )
pFormatPage = &pPageToAdjust->GetFormatPage();
- const SwTwips nCurrentPageWidth = pFormatPage->getSwFrame().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth);
- const Point aOldPagePos = pPageToAdjust->getSwFrame().Pos();
+ const SwTwips nCurrentPageWidth = pFormatPage->geFrameArea().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth);
+ const Point aOldPagePos = pPageToAdjust->geFrameArea().Pos();
const bool bLeftSidebar = pPageToAdjust->SidebarPosition() == sw::sidebarwindows::SidebarPosition::LEFT;
const SwTwips nLeftPageAddOffset = bLeftSidebar ?
nSidebarWidth :
@@ -2214,7 +2214,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->getSwFrame().SSize().Width() + nGapBetweenPages + nSidebarWidth,
+ pPageToAdjust->geFrameArea().SSize().Width() + nGapBetweenPages + nSidebarWidth,
nCurrentRowHeight );
static const long nOuterClickDiff = 1000000;
@@ -2272,7 +2272,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
} // end while
// set size of root frame:
- const Size aOldSize( getSwFrame().SSize() );
+ const Size aOldSize( geFrameArea().SSize() );
const Size aNewSize( nMaxPageRight - nBorder, nSumRowHeight - nGapBetweenPages );
if ( bPageChanged || aNewSize != aOldSize )
@@ -2292,7 +2292,7 @@ void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* p
}
}
- maPagesArea.Pos( getSwFrame().Pos() );
+ maPagesArea.Pos( geFrameArea().Pos() );
maPagesArea.SSize( aNewSize );
if ( TWIPS_MAX != nMinPageLeft )
maPagesArea.Left_( nMinPageLeft );
@@ -2349,17 +2349,17 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC
{
if ( pFrame->IsBodyFrame() )
{
- nUpperLimit = pFrame->getSwFrame().Top();
- nLowerLimit = pFrame->getSwFrame().Bottom();
+ nUpperLimit = pFrame->geFrameArea().Top();
+ nLowerLimit = pFrame->geFrameArea().Bottom();
}
else if ( pFrame->IsFootnoteContFrame() )
- nLowerLimit = pFrame->getSwFrame().Bottom();
+ nLowerLimit = pFrame->geFrameArea().Bottom();
pFrame = pFrame->GetNext();
}
- SwRect aHeaderArea( getSwFrame().TopLeft(),
- Size( getSwFrame().Width(), nUpperLimit - getSwFrame().Top() ) );
+ SwRect aHeaderArea( geFrameArea().TopLeft(),
+ Size( geFrameArea().Width(), nUpperLimit - geFrameArea().Top() ) );
SwViewShell* pViewShell = getRootFrame()->GetCurrShell();
const bool bHideWhitespaceMode = pViewShell->GetViewOptions()->IsHideWhitespaceMode();
@@ -2373,8 +2373,8 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC
}
else
{
- SwRect aFooterArea( Point( getSwFrame().Left(), nLowerLimit ),
- Size( getSwFrame().Width(), getSwFrame().Bottom() - nLowerLimit ) );
+ SwRect aFooterArea( Point( geFrameArea().Left(), nLowerLimit ),
+ Size( geFrameArea().Width(), geFrameArea().Bottom() - nLowerLimit ) );
if ( aFooterArea.IsInside( rPt ) &&
(!bHideWhitespaceMode || static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetFooter().IsActive()) )
@@ -2404,7 +2404,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() - getSwFrame().Height();
+ long nWhitespace = rPageSize.getHeight() - geFrameArea().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 dee5bb6f94e7..cda2cf1dc9b8 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()->getSwFrame().Left() + rLRect.GetTab()->getSwPrint().Left(),
- nTRight = rLRect.GetTab()->getSwFrame().Left() + rLRect.GetTab()->getSwPrint().Right();
+ nTLeft = rLRect.GetTab()->geFrameArea().Left() + rLRect.GetTab()->getFramePrintArea().Left(),
+ nTRight = rLRect.GetTab()->geFrameArea().Left() + rLRect.GetTab()->getFramePrintArea().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()->getSwFrame().Top() + rLRect.GetTab()->getSwPrint().Top(),
- nTBottom = rLRect.GetTab()->getSwFrame().Top() + rLRect.GetTab()->getSwPrint().Bottom();
+ nTTop = rLRect.GetTab()->geFrameArea().Top() + rLRect.GetTab()->getFramePrintArea().Top(),
+ nTBottom = rLRect.GetTab()->geFrameArea().Top() + rLRect.GetTab()->getFramePrintArea().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->getSwPrint();
- rRect.Pos() += pFrame->getSwFrame().Pos();
+ rRect = pFrame->getFramePrintArea();
+ rRect.Pos() += pFrame->geFrameArea().Pos();
}
else if ( pFrame->IsCellFrame() )
- rRect = pFrame->getSwFrame();
+ rRect = pFrame->geFrameArea();
else
{
- rRect = pFrame->getSwPrint();
- rRect.Pos() += pFrame->getSwFrame().Pos();
+ rRect = pFrame->getFramePrintArea();
+ rRect.Pos() += pFrame->geFrameArea().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->getSwFrame()))
+ if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->geFrameArea()))
continue;
if (!pFly->GetFormat()->GetPrint().GetValue() &&
@@ -1565,8 +1565,8 @@ static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage,
}
else
{
- SwRect aRect( pFly->getSwPrint() );
- aRect += pFly->getSwFrame().Pos();
+ SwRect aRect( pFly->getFramePrintArea() );
+ aRect += pFly->geFrameArea().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->getSwPrint() );
- aUpper.Pos() += pUpper->getSwFrame().Pos();
+ SwRect aUpper( pUpper->getFramePrintArea() );
+ aUpper.Pos() += pUpper->geFrameArea().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.getSwFrame();
+ SwRect aBorderRect = rFrame.geFrameArea();
if ( rFrame.IsTabFrame() )
{
- aBorderRect = rFrame.getSwPrint();
- aBorderRect.Pos() += rFrame.getSwFrame().Pos();
+ aBorderRect = rFrame.getFramePrintArea();
+ aBorderRect.Pos() += rFrame.geFrameArea().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->getSwFrame(), pSh, &rRenderContext, aPaintRect,
+ SwPageFrame::GetBorderAndShadowBoundRect( pPage->geFrameArea(), 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->getSwFrame()),
- aRectFnSet.GetWidth(pPage->getSwFrame()) );
+ aRectFnSet.GetLeft(pPage->geFrameArea()),
+ aRectFnSet.GetWidth(pPage->geFrameArea()) );
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->getSwFrame(),
+ *pPage, pPage->geFrameArea(),
&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->getSwFrame(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
- SwPageFrame::PaintNotesSidebar( pPage->getSwFrame(), pSh, pPage->GetPhyPageNum(), bRightSidebar);
+ SwPageFrame::PaintBorderAndShadow( pPage->geFrameArea(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
+ SwPageFrame::PaintNotesSidebar( pPage->geFrameArea(), 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->getSwFrame(),
+ *pPage, pPage->geFrameArea(),
&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->getSwFrame() );
+ SwRect aEmptyPageRect( pPage->geFrameArea() );
// code from vprint.cxx
const SwPageFrame& rFormatPage = pPage->GetFormatPage();
- aEmptyPageRect.SSize() = rFormatPage.getSwFrame().SSize();
+ aEmptyPageRect.SSize() = rFormatPage.geFrameArea().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->getSwFrame().Bottom() );
+ aPaintRect.Bottom( pFrame->geFrameArea().Bottom() );
if ( aPaintRect.Height() > 0 )
gProp.pSGlobalShell->InvalidateWindows(aPaintRect);
- aPaintRect.Top( pFrame->getSwFrame().Top() );
- aPaintRect.Bottom( pFrame->getSwFrame().Bottom() );
+ aPaintRect.Top( pFrame->geFrameArea().Top() );
+ aPaintRect.Bottom( pFrame->geFrameArea().Bottom() );
}
else
{
@@ -3597,8 +3597,8 @@ void SwColumnFrame::PaintBreak( ) const
!gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer ) &&
gProp.pSGlobalShell->GetViewOptions()->IsLineBreak() )
{
- SwRect aRect( pCnt->getSwPrint() );
- aRect.Pos() += pCnt->getSwFrame().Pos();
+ SwRect aRect( pCnt->getFramePrintArea() );
+ aRect.Pos() += pCnt->geFrameArea().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->getSwFrame() );
+ SwRect aBodyRect( pBody->geFrameArea() );
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->getSwFrame().Bottom() - aBodyRect.Bottom() );
+ aBodyRect.AddBottom( pFootnoteContFrame->geFrameArea().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->getSwFrame().IsOver( pFly->getSwFrame() ) )
+ if ( pPage && pPage->geFrameArea().IsOver( pFly->geFrameArea() ) )
{
pAnch = pFly->AnchorFrame();
}
@@ -3835,7 +3835,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
pAnch = pDrawContact ? pDrawContact->GetAnchorFrame(pObj) : nullptr;
if ( pAnch )
{
- if ( !pAnch->GetValidPosFlag() )
+ if ( !pAnch->isFrameAreaPositionValid() )
pAnch = nullptr;
else if ( sal_IntPtr(pSh->GetOut()) == sal_IntPtr(pSh->getIDocumentDeviceAccess().getPrinter( false )))
{
@@ -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->getSwFrame().IsOver( pObj->GetCurrentBoundRect() ) )
+ if ( !pPage->geFrameArea().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(getSwFrame()))
+ if (!aVisRect.IsOver(geFrameArea()))
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_( getSwFrame() );
+ aRect.Intersection_( geFrameArea() );
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 &&
- getSwPrint().SSize() != getSwFrame().SSize() );
+ getFramePrintArea().SSize() != geFrameArea().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->getSwFrame() );
+ aPaintRect.Intersection_( pParentFlyFrame->geFrameArea() );
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( getSwPrint() ); aTmp += getSwFrame().Pos();
+ SwRect aTmp( getFramePrintArea() ); aTmp += geFrameArea().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( getSwPrint() );
- aTabRect.Pos() += getSwFrame().Pos();
+ SwRect aTabRect( getFramePrintArea() );
+ aTabRect.Pos() += geFrameArea().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( getSwPrint() );
- aRect += getSwFrame().Pos();
+ SwRect aRect( getFramePrintArea() );
+ aRect += geFrameArea().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( getSwPrint() );
- aRect.Pos() += getSwFrame().Pos();
+ SwRect aRect( getFramePrintArea() );
+ aRect.Pos() += geFrameArea().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(getSwPrint());
+ SwTwips nPrtWidth = aRectFnSet.GetWidth(getFramePrintArea());
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(getSwFrame().Left()+getSwFrame().Width()-rInf.GetTopDist()-nLineWidth,
+ SwRect( Point(geFrameArea().Left()+geFrameArea().Width()-rInf.GetTopDist()-nLineWidth,
nX), Size( nLineWidth, nWidth ) )
- : SwRect( Point( nX, getSwFrame().Pos().Y() + rInf.GetTopDist() ),
+ : SwRect( Point( nX, geFrameArea().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 = getSwPrint();
- aLineRect += getSwFrame().Pos();
+ SwRect aLineRect = getFramePrintArea();
+ aLineRect += geFrameArea().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->getSwFrame().*fnGetX)() - nPenHalf );
+ ( (pCol->geFrameArea().*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->getSwPrint() );
- aGrid += pBody->getSwFrame().Pos();
+ SwRect aGrid( pBody->getFramePrintArea() );
+ aGrid += pBody->geFrameArea().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 = getSwFrame();
+ SwRect aPgRect = geFrameArea();
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( getSwFrame() );
+ SwRect aPageRect( geFrameArea() );
SwRect aResult;
if(!pSh) {
@@ -6360,7 +6360,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
}
}
- SwRect aPaintRect( getSwFrame() );
+ SwRect aPaintRect( geFrameArea() );
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() && getSwPrint().SSize() == getSwFrame().SSize()) )
+ (IsTextFrame() && getFramePrintArea().SSize() == geFrameArea().SSize()) )
{
- aRect = getSwFrame();
+ aRect = geFrameArea();
::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( getSwFrame().Top() );
+ aRect.Top( geFrameArea().Top() );
}
}
}
@@ -6557,9 +6557,9 @@ void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage,
if( !pLow )
return;
SwShortCut aShortCut( *pLow, rRect );
- while( pLow && !aShortCut.Stop( pLow->getSwFrame() ) )
+ while( pLow && !aShortCut.Stop( pLow->geFrameArea() ) )
{
- if ( pLow->getSwFrame().IsOver( rRect ) && pLow->getSwFrame().HasArea() )
+ if ( pLow->geFrameArea().IsOver( rRect ) && pLow->geFrameArea().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->getSwFrame().IsOver( rRect ) )
+ if ( pFly->IsFlyInContentFrame() && pFly->geFrameArea().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->getSwFrame() );
+ SwRect aArea( pPageBody->geFrameArea() );
if ( pFootnoteCont )
- aArea.AddBottom( pFootnoteCont->getSwFrame().Bottom() - aArea.Bottom() );
+ aArea.AddBottom( pFootnoteCont->geFrameArea().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->getSwFrame() );
+ SwRect aArea( pColBody->geFrameArea() );
// #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()->getSwFrame().Right() );
+ aArea.Right( GetUpper()->geFrameArea().Right() );
else
- aArea.Top( GetUpper()->getSwFrame().Top() );
+ aArea.Top( GetUpper()->geFrameArea().Top() );
}
if ( pFootnoteCont )
- aArea.AddBottom( pFootnoteCont->getSwFrame().Bottom() - aArea.Bottom() );
+ aArea.AddBottom( pFootnoteCont->geFrameArea().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( getSwPrint() );
- aArea.Pos() += getSwFrame().Pos();
+ SwRect aArea( getFramePrintArea() );
+ aArea.Pos() += geFrameArea().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 ? getSwFrame() : getSwPrint() );
+ SwRect aOriginal( bUseFrameArea ? geFrameArea() : getFramePrintArea() );
if ( !bUseFrameArea )
- aOriginal.Pos() += getSwFrame().Pos();
+ aOriginal.Pos() += geFrameArea().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->getSwFrame().Top() <= aRect.Bottom() &&
- pFly->getSwFrame().Bottom() >= aRect.Top() )
+ if ( pFly->geFrameArea().Top() <= aRect.Bottom() &&
+ pFly->geFrameArea().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->getSwFrame().Top() <= rRect.Bottom() &&
- pCnt->getSwFrame().Bottom() >= rRect.Top() )
+ pCnt->geFrameArea().Top() <= rRect.Bottom() &&
+ pCnt->geFrameArea().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->getSwFrame().Top() <= rRect.Bottom() &&
- pFly->getSwFrame().Bottom() >= rRect.Top() )
+ pFly->geFrameArea().Top() <= rRect.Bottom() &&
+ pFly->geFrameArea().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( getSwFrame().Top() + getSwFrame().Height() );
+ aRetouche.Top( geFrameArea().Top() + geFrameArea().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->getSwFrame();
+ rOrigRect = pFrame->geFrameArea();
}
else
{
- if ( pFrame->getSwFrame().SSize() != pFrame->getSwPrint().SSize() )
+ if ( pFrame->geFrameArea().SSize() != pFrame->getFramePrintArea().SSize() )
{
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
@@ -7397,8 +7397,8 @@ bool SwFrame::GetBackgroundBrush(
}
else
{
- rOrigRect = pFrame->getSwPrint();
- rOrigRect += pFrame->getSwFrame().Pos();
+ rOrigRect = pFrame->getFramePrintArea();
+ rOrigRect += pFrame->geFrameArea().Pos();
}
}
@@ -7471,7 +7471,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
aMet.SetPrefMapMode( aMap );
::SwCalcPixStatics( pSh->GetOut() );
- aMet.SetPrefSize( pFly->getSwFrame().SSize() );
+ aMet.SetPrefSize( pFly->geFrameArea().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->getSwFrame() );
+ SwRect aOut( pFly->geFrameArea() );
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->getSwFrame().Left(), -pFly->getSwFrame().Top() );
+ aMet.Move( -pFly->geFrameArea().Left(), -pFly->geFrameArea().Top() );
aRet = Graphic( aMet );
if( bNoteURL )
{
OSL_ENSURE( pNoteURL, "MakeGraphic: Good Bye, NoteURL." );
- pNoteURL->FillImageMap( pMap, pFly->getSwFrame().Pos(), aMap );
+ pNoteURL->FillImageMap( pMap, pFly->geFrameArea().Pos(), aMap );
delete pNoteURL;
pNoteURL = nullptr;
}
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 79627835e543..27b542699df8 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -100,10 +100,10 @@ void SwSectionFrame::Init()
{
assert(GetUpper() && "SwSectionFrame::Init before insertion?!");
SwRectFnSet aRectFnSet(this);
- long nWidth = aRectFnSet.GetWidth(GetUpper()->getSwPrint());
+ long nWidth = aRectFnSet.GetWidth(GetUpper()->getFramePrintArea());
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetWidth( aFrm, nWidth );
aRectFnSet.SetHeight( aFrm, 0 );
}
@@ -112,7 +112,7 @@ void SwSectionFrame::Init()
const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace();
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetLeft( aPrt, rLRSpace.GetLeft() );
aRectFnSet.SetWidth( aPrt, nWidth - rLRSpace.GetLeft() - rLRSpace.GetRight() );
aRectFnSet.SetHeight( aPrt, 0 );
@@ -205,7 +205,7 @@ void SwSectionFrame::DelEmpty( bool bRemove )
if( pUp )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Height( 0 );
}
@@ -295,15 +295,15 @@ void SwSectionFrame::Cut_( bool bRemove )
if ( pUp )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nFrameHeight = aRectFnSet.GetHeight(getSwFrame());
+ SwTwips nFrameHeight = aRectFnSet.GetHeight(geFrameArea());
if( nFrameHeight > 0 )
{
if( !bRemove )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetHeight( aFrm, 0 );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, 0 );
}
@@ -400,7 +400,7 @@ void SwSectionFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
pSibling->InvalidatePage( pPage );
}
- SwTwips nFrameHeight = aRectFnSet.GetHeight(getSwFrame());
+ SwTwips nFrameHeight = aRectFnSet.GetHeight(geFrameArea());
if( nFrameHeight )
pParent->Grow( nFrameHeight );
@@ -735,7 +735,7 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* pRenderContext)
#ifdef DBG_UTIL
OSL_ENSURE( getRootFrame()->IsInDelList( this ), "SectionFrame without Section" );
#endif
- if( !mbValidPos )
+ if( !isFrameAreaPositionValid() )
{
if( GetUpper() )
{
@@ -743,7 +743,7 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* pRenderContext)
aRectFnSet.MakePos( *this, GetUpper(), GetPrev(), false );
}
- if (getSwFrame().Height() == 0)
+ if (geFrameArea().Height() == 0)
{
// SwLayoutFrame::MakeAll() is not called for to-be-deleted
// section frames (which would invalidate the position of the
@@ -752,7 +752,10 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* pRenderContext)
pNext->InvalidatePos();
}
}
- mbValidSize = mbValidPos = mbValidPrtArea = true;
+
+ setFrameAreaPositionValid(true);
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
return;
}
LockJoin(); // I don't let myself to be destroyed on the way
@@ -789,8 +792,10 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* pRenderContext)
// A section with Follow uses all the space until the lower edge of the
// Upper. If it moves, its size can grow or decrease...
- if( !mbValidPos && ToMaximize( false ) )
- mbValidSize = false;
+ if( !isFrameAreaPositionValid() && ToMaximize( false ) )
+ {
+ setFrameAreaSizeValid(false);
+ }
SwLayoutFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut());
@@ -802,7 +807,7 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* pRenderContext)
// SwFrame::ValidateThisAndAllLowers(), and then we don't attempt
// calculating the proper position of the lower.
SwFrame* pLower = Lower();
- if (pLower && !pLower->GetValidPosFlag())
+ if (pLower && !pLower->isFrameAreaPositionValid())
pLower->Calc(pRenderContext);
}
@@ -903,7 +908,7 @@ bool SwSectionFrame::CalcMinDiff( SwTwips& rMinDiff ) const
{
SwRectFnSet aRectFnSet(this);
rMinDiff = aRectFnSet.GetPrtBottom(*GetUpper());
- rMinDiff = aRectFnSet.BottomDist( getSwFrame(), rMinDiff );
+ rMinDiff = aRectFnSet.BottomDist( geFrameArea(), rMinDiff );
return true;
}
return false;
@@ -1030,7 +1035,7 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
if( bGrow && ( !IsInFly() || !GetUpper()->IsColBodyFrame() ||
!FindFlyFrame()->IsLocked() ) )
{
- nDiff = -aRectFnSet.BottomDist( getSwFrame(), nDeadLine );
+ nDiff = -aRectFnSet.BottomDist( geFrameArea(), nDeadLine );
if( !bMaximize )
nDiff += Undersize();
if( nDiff > 0 )
@@ -1042,11 +1047,11 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
nDeadLine += nAdd;
}
}
- nDiff = -aRectFnSet.BottomDist( getSwFrame(), nDeadLine );
+ nDiff = -aRectFnSet.BottomDist( geFrameArea(), nDeadLine );
SetUndersized( !bMaximize && nDiff >= 0 );
const bool bCalc = ( IsUndersized() || bMaximize ) &&
( nDiff ||
- aRectFnSet.GetTop(getSwPrint()) > aRectFnSet.GetHeight(getSwFrame()) );
+ aRectFnSet.GetTop(getFramePrintArea()) > aRectFnSet.GetHeight(geFrameArea()) );
// 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;
@@ -1069,18 +1074,18 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
}
if ( bCalc || bExtraCalc )
{
- nDiff = aRectFnSet.YDiff( nDeadLine, aRectFnSet.GetTop(getSwFrame()) );
+ nDiff = aRectFnSet.YDiff( nDeadLine, aRectFnSet.GetTop(geFrameArea()) );
if( nDiff < 0 )
- nDeadLine = aRectFnSet.GetTop(getSwFrame());
- const Size aOldSz( getSwPrint().SSize() );
+ nDeadLine = aRectFnSet.GetTop(geFrameArea());
+ const Size aOldSz( getFramePrintArea().SSize() );
long nTop = aRectFnSet.GetTopMargin(*this);
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetBottom( aFrm, nDeadLine );
}
- nDiff = aRectFnSet.GetHeight(getSwFrame());
+ nDiff = aRectFnSet.GetHeight(geFrameArea());
if( nTop > nDiff )
nTop = nDiff;
aRectFnSet.SetYMargins( *this, nTop, 0 );
@@ -1089,8 +1094,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() != getSwPrint().Width()) :
- (aOldSz.Height() != getSwPrint().Height());
+ (aOldSz.Width() != getFramePrintArea().Width()) :
+ (aOldSz.Height() != getFramePrintArea().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#
@@ -1126,19 +1131,19 @@ void SwSectionFrame::SimpleFormat()
// assure notifications on position changes.
const SwLayNotify aNotify( this );
aRectFnSet.MakePos( *this, GetUpper(), GetPrev(), false );
- mbValidPos = true;
+ setFrameAreaPositionValid(true);
}
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( getSwFrame(), nDeadLine ) >= 0 )
+ if( aRectFnSet.BottomDist( geFrameArea(), nDeadLine ) >= 0 )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetBottom( aFrm, nDeadLine );
}
- long nHeight = aRectFnSet.GetHeight(getSwFrame());
+ long nHeight = aRectFnSet.GetHeight(geFrameArea());
long nTop = CalcUpperSpace();
if( nTop > nHeight )
nTop = nHeight;
@@ -1217,18 +1222,18 @@ class ExtraFormatToPositionObjs
// grow section till bottom of printing area of upper frame
SwRectFnSet aRectFnSet(mpSectFrame);
SwTwips nTopMargin = aRectFnSet.GetTopMargin(*mpSectFrame);
- Size aOldSectPrtSize( mpSectFrame->getSwPrint().SSize() );
- SwTwips nDiff = aRectFnSet.BottomDist( mpSectFrame->getSwFrame(), aRectFnSet.GetPrtBottom(*mpSectFrame->GetUpper()) );
+ Size aOldSectPrtSize( mpSectFrame->getFramePrintArea().SSize() );
+ SwTwips nDiff = aRectFnSet.BottomDist( mpSectFrame->geFrameArea(), aRectFnSet.GetPrtBottom(*mpSectFrame->GetUpper()) );
{
- SwFrameRect::FrameWriteAccess aFrm(*mpSectFrame);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*mpSectFrame);
aRectFnSet.AddBottom( aFrm, nDiff );
}
aRectFnSet.SetYMargins( *mpSectFrame, nTopMargin, 0 );
// #i59789#
// suppress formatting, if printing area of section is too narrow
- if ( aRectFnSet.GetHeight(mpSectFrame->getSwPrint()) <= 0 )
+ if ( aRectFnSet.GetHeight(mpSectFrame->getFramePrintArea()) <= 0 )
{
return;
}
@@ -1287,14 +1292,18 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
#ifdef DBG_UTIL
OSL_ENSURE( getRootFrame()->IsInDelList( this ), "SectionFrame without Section" );
#endif
- mbValidSize = mbValidPos = mbValidPrtArea = true;
+ setFrameAreaPositionValid(true);
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
return;
}
+
SwRectFnSet aRectFnSet(this);
- if ( !mbValidPrtArea )
+
+ if ( !isFramePrintAreaValid() )
{
PROTOCOL( this, PROT::PrintArea, DbgAction::NONE, nullptr )
- mbValidPrtArea = true;
+ setFramePrintAreaValid(true);
SwTwips nUpper = CalcUpperSpace();
// #109700# LRSpace for sections
@@ -1303,7 +1312,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
if( nUpper != aRectFnSet.GetTopMargin(*this) )
{
- mbValidSize = false;
+ setFrameAreaSizeValid(false);
SwFrame* pOwn = ContainsAny();
if( pOwn )
pOwn->InvalidatePos_();
@@ -1311,14 +1320,14 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
aRectFnSet.SetYMargins( *this, nUpper, 0 );
}
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
PROTOCOL_ENTER( this, PROT::Size, DbgAction::NONE, nullptr )
- const long nOldHeight = aRectFnSet.GetHeight(getSwFrame());
+ const long nOldHeight = aRectFnSet.GetHeight(geFrameArea());
bool bOldLock = IsColLocked();
ColLock();
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
// The size is only determined by the content, if the SectFrame does not have a
// Follow. Otherwise it fills (occupies) the Upper down to the lower edge.
@@ -1349,17 +1358,17 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
if( GetUpper() )
{
- const long nWidth = aRectFnSet.GetWidth(GetUpper()->getSwPrint());
+ const long nWidth = aRectFnSet.GetWidth(GetUpper()->getFramePrintArea());
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetWidth( aFrm, nWidth );
}
// #109700# LRSpace for sections
{
const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace();
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetWidth( aPrt, nWidth - rLRSpace.GetLeft() - rLRSpace.GetRight() );
}
@@ -1369,7 +1378,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
const SwViewShell *pSh = getRootFrame()->GetCurrShell();
CheckClipping( pSh && pSh->GetViewOptions()->getBrowseMode(), bMaximize );
bMaximize = ToMaximize( false );
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
}
// Check the width of the columns and adjust if necessary
@@ -1386,7 +1395,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
{
// #i61435#
// suppress formatting, if upper frame has height <= 0
- if ( aRectFnSet.GetHeight(GetUpper()->getSwFrame()) > 0 )
+ if ( aRectFnSet.GetHeight(GetUpper()->geFrameArea()) > 0 )
{
FormatWidthCols( *pAttr, nRemaining, MINLAY );
}
@@ -1401,7 +1410,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
break;
}
bMaximize = ToMaximize( false );
- nRemaining += aRectFnSet.GetHeight(pFrame->getSwFrame());
+ nRemaining += aRectFnSet.GetHeight(pFrame->geFrameArea());
}
else
{
@@ -1415,7 +1424,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
}
// If we are in a columned frame which calls a CalcContent
// in the FormatWidthCols, the content might need calculating
- if( pFrame && !pFrame->IsValid() && IsInFly() &&
+ if( pFrame && !pFrame->isFrameAreaDefinitionValid() && IsInFly() &&
FindFlyFrame()->IsColLocked() )
::CalcContent( this );
nRemaining += InnerHeight();
@@ -1423,12 +1432,12 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
}
}
- SwTwips nDiff = aRectFnSet.GetHeight(getSwFrame()) - nRemaining;
+ SwTwips nDiff = aRectFnSet.GetHeight(geFrameArea()) - nRemaining;
if( nDiff < 0)
{
SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*GetUpper());
{
- long nBottom = aRectFnSet.GetBottom(getSwFrame());
+ long nBottom = aRectFnSet.GetBottom(geFrameArea());
nBottom = aRectFnSet.YInc( nBottom, -nDiff );
long nTmpDiff = aRectFnSet.YDiff( nBottom, nDeadLine );
if( nTmpDiff > 0 )
@@ -1445,11 +1454,11 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
}
if( nDiff )
{
- long nTmp = nRemaining - aRectFnSet.GetHeight(getSwFrame());
+ long nTmp = nRemaining - aRectFnSet.GetHeight(geFrameArea());
long nTop = aRectFnSet.GetTopMargin(*this);
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, nTmp );
}
@@ -1494,7 +1503,8 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
CheckClipping( true, bMaximize );
if( !bOldLock )
ColUnlock();
- long nDiff = nOldHeight - aRectFnSet.GetHeight(getSwFrame());
+ long nDiff = nOldHeight - aRectFnSet.GetHeight(geFrameArea());
+
if( nDiff > 0 )
{
if( !GetNext() )
@@ -1502,8 +1512,11 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
if( GetUpper() && !GetUpper()->IsFooterFrame() )
GetUpper()->Shrink( nDiff );
}
+
if( IsUndersized() )
- mbValidPrtArea = true;
+ {
+ setFramePrintAreaValid(true);
+ }
}
}
@@ -1750,7 +1763,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
if( pOldBoss == pNxtContent->FindFootnoteBossFrame( true ) )
{
SwSaveFootnoteHeight aHeight( pOldBoss,
- pOldBoss->getSwFrame().Top() + pOldBoss->getSwFrame().Height() );
+ pOldBoss->geFrameArea().Top() + pOldBoss->geFrameArea().Height() );
pSect->GetUpper()->MoveLowerFootnotes( pNxtContent, pOldBoss,
pLayLeaf->FindFootnoteBossFrame( true ), false );
}
@@ -1982,7 +1995,7 @@ static SwTwips lcl_DeadLine( const SwFrame* pFrame )
}
SwRectFnSet aRectFnSet(pFrame);
return pUp ? aRectFnSet.GetPrtBottom(*pUp) :
- aRectFnSet.GetBottom(pFrame->getSwFrame());
+ aRectFnSet.GetBottom(pFrame->geFrameArea());
}
/// checks whether the SectionFrame is still able to grow, as case may be the environment has to be asked
@@ -1990,7 +2003,7 @@ bool SwSectionFrame::Growable() const
{
SwRectFnSet aRectFnSet(this);
if( aRectFnSet.YDiff( lcl_DeadLine( this ),
- aRectFnSet.GetBottom(getSwFrame()) ) > 0 )
+ aRectFnSet.GetBottom(geFrameArea()) ) > 0 )
return true;
return ( GetUpper() && const_cast<SwFrame*>(static_cast<SwFrame const *>(GetUpper()))->Grow( LONG_MAX, true ) );
@@ -2001,7 +2014,7 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst )
if ( !IsColLocked() && !HasFixSize() )
{
SwRectFnSet aRectFnSet(this);
- long nFrameHeight = aRectFnSet.GetHeight(getSwFrame());
+ long nFrameHeight = aRectFnSet.GetHeight(geFrameArea());
if( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) )
nDist = LONG_MAX - nFrameHeight;
@@ -2025,7 +2038,7 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst )
else
{
nGrow = lcl_DeadLine( this );
- nGrow = aRectFnSet.YDiff( nGrow, aRectFnSet.GetBottom(getSwFrame()) );
+ nGrow = aRectFnSet.YDiff( nGrow, aRectFnSet.GetBottom(geFrameArea()) );
}
SwTwips nSpace = nGrow;
if( !bInCalcContent && nGrow < nDist && GetUpper() )
@@ -2066,13 +2079,13 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst )
}
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, nGrow );
}
{
- const long nPrtHeight = aRectFnSet.GetHeight(getSwPrint()) + nGrow;
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ const long nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea()) + nGrow;
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, nPrtHeight );
}
@@ -2134,7 +2147,7 @@ SwTwips SwSectionFrame::Shrink_( SwTwips nDist, bool bTst )
else
{
SwRectFnSet aRectFnSet(this);
- long nFrameHeight = aRectFnSet.GetHeight(getSwFrame());
+ long nFrameHeight = aRectFnSet.GetHeight(geFrameArea());
if ( nDist > nFrameHeight )
nDist = nFrameHeight;
@@ -2157,13 +2170,13 @@ SwTwips SwSectionFrame::Shrink_( SwTwips nDist, bool bTst )
}
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, -nDist );
}
{
- const long nPrtHeight = aRectFnSet.GetHeight(getSwPrint()) - nDist;
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ const long nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea()) - nDist;
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, nPrtHeight );
}
@@ -2642,7 +2655,7 @@ void SwSectionFrame::InvalidateFootnotePos()
SwTwips SwSectionFrame::CalcUndersize() const
{
SwRectFnSet aRectFnSet(this);
- return InnerHeight() - aRectFnSet.GetHeight(getSwPrint());
+ return InnerHeight() - aRectFnSet.GetHeight(getFramePrintArea());
}
SwTwips SwSectionFrame::Undersize()
@@ -2709,7 +2722,7 @@ void SwRootFrame::DeleteEmptySct_()
mpDestroy->erase( mpDestroy->begin() );
OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
"DeleteEmptySct: Locked SectionFrame" );
- if( !pSect->getSwFrame().HasArea() && !pSect->ContainsContent() )
+ if( !pSect->geFrameArea().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 edcc34354ff8..5156aa40e829 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -34,31 +34,31 @@
// No inline cause we need the function pointers
long SwFrame::GetTopMargin() const
- { return getSwPrint().Top(); }
+ { return getFramePrintArea().Top(); }
long SwFrame::GetBottomMargin() const
- { return getSwFrame().Height() -getSwPrint().Height() -getSwPrint().Top(); }
+ { return geFrameArea().Height() -getFramePrintArea().Height() -getFramePrintArea().Top(); }
long SwFrame::GetLeftMargin() const
- { return getSwPrint().Left(); }
+ { return getFramePrintArea().Left(); }
long SwFrame::GetRightMargin() const
- { return getSwFrame().Width() - getSwPrint().Width() - getSwPrint().Left(); }
+ { return geFrameArea().Width() - getFramePrintArea().Width() - getFramePrintArea().Left(); }
long SwFrame::GetPrtLeft() const
- { return getSwFrame().Left() + getSwPrint().Left(); }
+ { return geFrameArea().Left() + getFramePrintArea().Left(); }
long SwFrame::GetPrtBottom() const
- { return getSwFrame().Top() + getSwPrint().Height() + getSwPrint().Top(); }
+ { return geFrameArea().Top() + getFramePrintArea().Height() + getFramePrintArea().Top(); }
long SwFrame::GetPrtRight() const
- { return getSwFrame().Left() + getSwPrint().Width() + getSwPrint().Left(); }
+ { return geFrameArea().Left() + getFramePrintArea().Width() + getFramePrintArea().Left(); }
long SwFrame::GetPrtTop() const
- { return getSwFrame().Top() + getSwPrint().Top(); }
+ { return geFrameArea().Top() + getFramePrintArea().Top(); }
bool SwFrame::SetMinLeft( long nDeadline )
{
- SwTwips nDiff = nDeadline - getSwFrame().Left();
+ SwTwips nDiff = nDeadline - geFrameArea().Left();
if( nDiff > 0 )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Left( nDeadline );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Width( aPrt.Width() - nDiff );
return true;
@@ -68,13 +68,13 @@ bool SwFrame::SetMinLeft( long nDeadline )
bool SwFrame::SetMaxBottom( long nDeadline )
{
- SwTwips nDiff = getSwFrame().Top() + getSwFrame().Height() - nDeadline;
+ SwTwips nDiff = geFrameArea().Top() + geFrameArea().Height() - nDeadline;
if( nDiff > 0 )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Height( aFrm.Height() - nDiff );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Height( aPrt.Height() - nDiff );
return true;
@@ -84,13 +84,13 @@ bool SwFrame::SetMaxBottom( long nDeadline )
bool SwFrame::SetMinTop( long nDeadline )
{
- SwTwips nDiff = nDeadline - getSwFrame().Top();
+ SwTwips nDiff = nDeadline - geFrameArea().Top();
if( nDiff > 0 )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Top( nDeadline );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Height( aPrt.Height() - nDiff );
return true;
@@ -100,13 +100,13 @@ bool SwFrame::SetMinTop( long nDeadline )
bool SwFrame::SetMaxRight( long nDeadline )
{
- SwTwips nDiff = getSwFrame().Left() + getSwFrame().Width() - nDeadline;
+ SwTwips nDiff = geFrameArea().Left() + geFrameArea().Width() - nDeadline;
if( nDiff > 0 )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Width( aFrm.Width() - nDiff );
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Width( aPrt.Width() - nDiff );
return true;
@@ -116,17 +116,17 @@ bool SwFrame::SetMaxRight( long nDeadline )
void SwFrame::MakeBelowPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
if( pPrv )
{
- aFrm.Pos( pPrv->getSwFrame().Pos() );
- aFrm.Pos().Y() += pPrv->getSwFrame().Height();
+ aFrm.Pos( pPrv->geFrameArea().Pos() );
+ aFrm.Pos().Y() += pPrv->geFrameArea().Height();
}
else
{
- aFrm.Pos( pUp->getSwFrame().Pos() );
- aFrm.Pos() += pUp->getSwPrint().Pos();
+ aFrm.Pos( pUp->geFrameArea().Pos() );
+ aFrm.Pos() += pUp->getFramePrintArea().Pos();
}
if( bNotify )
@@ -137,18 +137,18 @@ void SwFrame::MakeBelowPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
void SwFrame::MakeUpperPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
if( pPrv )
{
- aFrm.Pos( pPrv->getSwFrame().Pos() );
+ aFrm.Pos( pPrv->geFrameArea().Pos() );
aFrm.Pos().Y() -= aFrm.Height();
}
else
{
- aFrm.Pos( pUp->getSwFrame().Pos() );
- aFrm.Pos() += pUp->getSwPrint().Pos();
- aFrm.Pos().Y() += pUp->getSwPrint().Height() - aFrm.Height();
+ aFrm.Pos( pUp->geFrameArea().Pos() );
+ aFrm.Pos() += pUp->getFramePrintArea().Pos();
+ aFrm.Pos().Y() += pUp->getFramePrintArea().Height() - aFrm.Height();
}
if( bNotify )
@@ -159,18 +159,18 @@ void SwFrame::MakeUpperPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
void SwFrame::MakeLeftPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
if( pPrv )
{
- aFrm.Pos( pPrv->getSwFrame().Pos() );
+ aFrm.Pos( pPrv->geFrameArea().Pos() );
aFrm.Pos().X() -= aFrm.Width();
}
else
{
- aFrm.Pos( pUp->getSwFrame().Pos() );
- aFrm.Pos() += pUp->getSwPrint().Pos();
- aFrm.Pos().X() += pUp->getSwPrint().Width() - aFrm.Width();
+ aFrm.Pos( pUp->geFrameArea().Pos() );
+ aFrm.Pos() += pUp->getFramePrintArea().Pos();
+ aFrm.Pos().X() += pUp->getFramePrintArea().Width() - aFrm.Width();
}
if( bNotify )
@@ -181,17 +181,17 @@ void SwFrame::MakeLeftPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify
void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
if( pPrv )
{
- aFrm.Pos( pPrv->getSwFrame().Pos() );
- aFrm.Pos().X() += pPrv->getSwFrame().Width();
+ aFrm.Pos( pPrv->geFrameArea().Pos() );
+ aFrm.Pos().X() += pPrv->geFrameArea().Width();
}
else
{
- aFrm.Pos( pUp->getSwFrame().Pos() );
- aFrm.Pos() += pUp->getSwPrint().Pos();
+ aFrm.Pos( pUp->geFrameArea().Pos() );
+ aFrm.Pos() += pUp->getFramePrintArea().Pos();
}
if( bNotify )
@@ -202,30 +202,30 @@ void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
void SwFrame::SetTopBottomMargins( long nTop, long nBot )
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Top( nTop );
- aPrt.Height( getSwFrame().Height() - nTop - nBot );
+ aPrt.Height( geFrameArea().Height() - nTop - nBot );
}
void SwFrame::SetBottomTopMargins( long nBot, long nTop )
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Top( nTop );
- aPrt.Height( getSwFrame().Height() - nTop - nBot );
+ aPrt.Height( geFrameArea().Height() - nTop - nBot );
}
void SwFrame::SetLeftRightMargins( long nLeft, long nRight)
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left( nLeft );
- aPrt.Width( getSwFrame().Width() - nLeft - nRight );
+ aPrt.Width( geFrameArea().Width() - nLeft - nRight );
}
void SwFrame::SetRightLeftMargins( long nRight, long nLeft)
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left( nLeft );
- aPrt.Width( getSwFrame().Width() - nLeft - nRight );
+ aPrt.Width( geFrameArea().Width() - nLeft - nRight );
}
/// checks the layout direction and invalidates the lower frames recursively, if necessary.
@@ -331,10 +331,10 @@ void SwFrame::CheckDirChange()
// previous frame according to new option 'Use former object positioning'
Point SwFrame::GetFrameAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const
{
- Point aAnchor = getSwFrame().Pos();
+ Point aAnchor = geFrameArea().Pos();
if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() )
- aAnchor.X() += getSwFrame().Width();
+ aAnchor.X() += geFrameArea().Width();
if ( IsTextFrame() )
{
@@ -590,14 +590,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 (getSwPrint())
+|* to be displayed. This region could be larger than the printarea (getFramePrintArea())
|* 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()->getSwFrame() : getSwFrame();
+ SwRect aRect = IsRowFrame() ? GetUpper()->geFrameArea() : geFrameArea();
const bool bVert = IsVertical();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
long nRight = (aRect.*fnRect->fnGetRight)();
@@ -611,17 +611,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->getSwFrame().*fnRect->fnGetRight)();
- long nTmpLeft = (pTmp->getSwFrame().*fnRect->fnGetLeft)();
+ long nTmpRight = (pTmp->geFrameArea().*fnRect->fnGetRight)();
+ long nTmpLeft = (pTmp->geFrameArea().*fnRect->fnGetLeft)();
if( pTmp->IsRowFrame() && nRowSpan > 1 )
{
const SwFrame* pNxt = pTmp;
while( --nRowSpan > 0 && pNxt->GetNext() )
pNxt = pNxt->GetNext();
if( pTmp->IsVertical() )
- nTmpLeft = (pNxt->getSwFrame().*fnRect->fnGetLeft)();
+ nTmpLeft = (pNxt->geFrameArea().*fnRect->fnGetLeft)();
else
- nTmpRight = (pNxt->getSwFrame().*fnRect->fnGetRight)();
+ nTmpRight = (pNxt->geFrameArea().*fnRect->fnGetRight)();
}
OSL_ENSURE( pTmp, "PaintArea lost in time and space" );
if( pTmp->IsPageFrame() || pTmp->IsFlyFrame() ||
@@ -684,17 +684,17 @@ const SwRect SwFrame::PaintArea() const
}
/**
-|* The unionframe is the framearea (getSwFrame()) of a frame expanded by the
+|* The unionframe is the framearea (geFrameArea()) 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 = (getSwFrame().*fnRect->fnGetLeft)();
- long nWidth = (getSwFrame().*fnRect->fnGetWidth)();
- long nPrtLeft = (getSwPrint().*fnRect->fnGetLeft)();
- long nPrtWidth = (getSwPrint().*fnRect->fnGetWidth)();
+ long nLeft = (geFrameArea().*fnRect->fnGetLeft)();
+ long nWidth = (geFrameArea().*fnRect->fnGetWidth)();
+ long nPrtLeft = (getFramePrintArea().*fnRect->fnGetLeft)();
+ long nPrtWidth = (getFramePrintArea().*fnRect->fnGetWidth)();
if( nPrtLeft + nPrtWidth > nWidth )
nWidth = nPrtLeft + nPrtWidth;
if( nPrtLeft < 0 )
@@ -731,7 +731,7 @@ const SwRect SwFrame::UnionFrame( bool bBorder ) const
nAdd = nTmp;
}
nWidth = nRight + nAdd - nLeft;
- SwRect aRet( getSwFrame() );
+ SwRect aRet( geFrameArea() );
(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 65f1e7373e13..44c8bd6c332d 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->getSwFrame());
+ nRet += aRectFnSet.GetHeight(pStart->geFrameArea());
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->getSwFrame().Right() );
+ pAnchoredObj->SetObjLeft( _pPageFrame->geFrameArea().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->getSwFrame()) > 0)
+ if (aRectFnSet.GetHeight(pTmpRow->geFrameArea()) > 0)
bAllRowsCollapsed = false;
pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetNext());
@@ -353,10 +353,10 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
if (bAllRowsCollapsed)
{
// All rows of this table have 0 height -> set height of the table itself as well.
- SwFrameRect::FrameWriteAccess aFrm(*pTmp);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pTmp);
aRectFnSet.SetHeight(aFrm, 0);
- SwFrameRect::PrintWriteAccess aPrt(*pTmp);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pTmp);
aRectFnSet.SetTop(aPrt, 0);
aRectFnSet.SetHeight(aPrt, 0);
}
@@ -365,12 +365,12 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
}
else
{
- pTmp->Shrink(aRectFnSet.GetHeight(pTmp->getSwFrame()));
- SwFrameRect::PrintWriteAccess aPrt(*pTmp);
+ pTmp->Shrink(aRectFnSet.GetHeight(pTmp->geFrameArea()));
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pTmp);
aRectFnSet.SetTop(aPrt, 0);
aRectFnSet.SetHeight(aPrt, 0);
- if (aRectFnSet.GetHeight(pTmp->getSwFrame()) > 0)
+ if (aRectFnSet.GetHeight(pTmp->geFrameArea()) > 0)
{
bAllLowersCollapsed = false;
}
@@ -388,10 +388,10 @@ 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.
- SwFrameRect::FrameWriteAccess aFrm(*pCurrMasterCell);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pCurrMasterCell);
aRectFnSet.SetHeight(aFrm, 0);
- SwFrameRect::PrintWriteAccess aPrt(*pCurrMasterCell);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pCurrMasterCell);
aRectFnSet.SetTop(aPrt, 0);
aRectFnSet.SetHeight(aPrt, 0);
}
@@ -404,10 +404,10 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
if (bAllCellsCollapsed)
{
// All cells have 0 height -> set height of row as well.
- SwFrameRect::FrameWriteAccess aFrm(rRow);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(rRow);
aRectFnSet.SetHeight(aFrm, 0);
- SwFrameRect::PrintWriteAccess aPrt(rRow);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(rRow);
aRectFnSet.SetTop(aPrt, 0);
aRectFnSet.SetHeight(aPrt, 0);
}
@@ -532,7 +532,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->getSwFrame());
+ nMinHeight = aRectFnSet.GetHeight(pTmpLastLineRow->geFrameArea());
else
{
{
@@ -586,8 +586,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->getSwFrame()) );
- pCurrFollowFlowLineCell->Grow( aRectFnSet.GetHeight(pTmpLastLineRow->getSwFrame()) );
+ pTmpLastLineRow->Shrink( aRectFnSet.GetHeight(pTmpLastLineRow->geFrameArea()) );
+ pCurrFollowFlowLineCell->Grow( aRectFnSet.GetHeight(pTmpLastLineRow->geFrameArea()) );
pTmpLastLineRow = pTmp;
}
}
@@ -641,7 +641,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.getSwFrame());
+ SwTwips nCurLastLineHeight = aRectFnSet.GetHeight(rLastLine.geFrameArea());
// If there are nested cells in rLastLine, the recalculation of the last
// line needs some preprocessing.
@@ -718,7 +718,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.getSwFrame(), aRectFnSet.GetPrtBottom(*rTab.GetUpper()));
+ aRectFnSet.BottomDist(rTab.geFrameArea(), aRectFnSet.GetPrtBottom(*rTab.GetUpper()));
if ( nDistanceToUpperPrtBottom < 0 || !rTab.DoesObjsFit() )
bRet = false;
@@ -793,11 +793,11 @@ static void lcl_AdjustRowSpanCells( SwRowFrame* pRow )
{
// calculate height of cell:
const long nNewCellHeight = lcl_GetHeightOfRows( pRow, nLayoutRowSpan );
- const long nDiff = nNewCellHeight - aRectFnSet.GetHeight(pCellFrame->getSwFrame());
+ const long nDiff = nNewCellHeight - aRectFnSet.GetHeight(pCellFrame->geFrameArea());
if ( nDiff )
{
- SwFrameRect::FrameWriteAccess aFrm(*pCellFrame);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pCellFrame);
aRectFnSet.AddBottom(aFrm, nDiff);
}
}
@@ -880,7 +880,7 @@ bool SwTabFrame::RemoveFollowFlowLine()
while ( pRow && nRowsToMove-- > 1 )
{
SwFrame* pNxt = pRow->GetNext();
- nGrow += aRectFnSet.GetHeight(pRow->getSwFrame());
+ nGrow += aRectFnSet.GetHeight(pRow->geFrameArea());
// The footnotes have to be moved:
lcl_MoveFootnotes( *GetFollow(), *this, static_cast<SwRowFrame&>(*pRow) );
@@ -996,20 +996,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(getSwFrame()));
+ aRectFnSet.YDiff(nCutPos, aRectFnSet.GetTop(geFrameArea()));
nRemainingSpaceForLastRow -= aRectFnSet.GetTopMargin(*this);
// Make pRow point to the line that does not fit anymore:
while( pRow->GetNext() &&
- nRemainingSpaceForLastRow >= ( aRectFnSet.GetHeight(pRow->getSwFrame()) +
+ nRemainingSpaceForLastRow >= ( aRectFnSet.GetHeight(pRow->geFrameArea()) +
(IsCollapsingBorders() ?
pRow->GetBottomLineSize() :
0 ) ) )
{
if( bTryToSplit || !pRow->IsRowSpanLine() ||
- 0 != aRectFnSet.GetHeight(pRow->getSwFrame()) )
+ 0 != aRectFnSet.GetHeight(pRow->geFrameArea()) )
++nRowCount;
- nRemainingSpaceForLastRow -= aRectFnSet.GetHeight(pRow->getSwFrame());
+ nRemainingSpaceForLastRow -= aRectFnSet.GetHeight(pRow->geFrameArea());
pRow = static_cast<SwRowFrame*>(pRow->GetNext());
}
@@ -1061,7 +1061,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->getSwFrame()) > nRemainingSpaceForLastRow )
+ aRectFnSet.GetHeight(pLowerRow->geFrameArea()) > nRemainingSpaceForLastRow )
{
bKeepNextRow = true;
break;
@@ -1078,7 +1078,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
if ( bKeepNextRow )
{
pRow = GetFirstNonHeadlineRow();
- if ( pRow && pRow->IsRowSpanLine() && 0 == aRectFnSet.GetHeight(pRow->getSwFrame()) )
+ if ( pRow && pRow->IsRowSpanLine() && 0 == aRectFnSet.GetHeight(pRow->geFrameArea()) )
pRow = static_cast<SwRowFrame*>(pRow->GetNext());
if ( pRow )
{
@@ -1156,14 +1156,14 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
// We give the follow table an initial width.
{
- SwFrameRect::FrameWriteAccess aFrm(*pFoll);
- aRectFnSet.AddWidth(aFrm, aRectFnSet.GetWidth(getSwFrame()));
- aRectFnSet.SetLeft(aFrm, aRectFnSet.GetLeft(getSwFrame()));
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFoll);
+ aRectFnSet.AddWidth(aFrm, aRectFnSet.GetWidth(geFrameArea()));
+ aRectFnSet.SetLeft(aFrm, aRectFnSet.GetLeft(geFrameArea()));
}
{
- SwFrameRect::PrintWriteAccess aPrt(*pFoll);
- aRectFnSet.AddWidth(aPrt, aRectFnSet.GetWidth(getSwPrint()));
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pFoll);
+ aRectFnSet.AddWidth(aPrt, aRectFnSet.GetWidth(getFramePrintArea()));
}
// Insert the new follow table
@@ -1248,7 +1248,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
while ( pRow )
{
SwFrame* pNxt = pRow->GetNext();
- nShrink += aRectFnSet.GetHeight(pRow->getSwFrame());
+ nShrink += aRectFnSet.GetHeight(pRow->geFrameArea());
// The footnotes do not have to be moved, this is done in the
// MoveFwd of the follow table!!!
pRow->RemoveFromLayout();
@@ -1267,7 +1267,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
while ( pRow )
{
SwFrame* pNxt = pRow->GetNext();
- nShrink += aRectFnSet.GetHeight(pRow->getSwFrame());
+ nShrink += aRectFnSet.GetHeight(pRow->geFrameArea());
// The footnotes have to be moved:
lcl_MoveFootnotes( *this, *GetFollow(), *pRow );
@@ -1326,7 +1326,7 @@ bool SwTabFrame::Join()
while ( pRow )
{
pNxt = pRow->GetNext();
- nHeight += aRectFnSet.GetHeight(pRow->getSwFrame());
+ nHeight += aRectFnSet.GetHeight(pRow->geFrameArea());
pRow->RemoveFromLayout();
pRow->InvalidateAll_();
pRow->InsertBehind( this, pPrv );
@@ -1367,7 +1367,7 @@ void SwInvalidatePositions( SwFrame *pFrame, long nBottom )
pFrame = pFrame->GetNext();
} while ( pFrame &&
( bAll ||
- aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->getSwFrame()), nBottom ) < 0 ) );
+ aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->geFrameArea()), nBottom ) < 0 ) );
}
void SwInvalidateAll( SwFrame *pFrame, long nBottom )
@@ -1402,7 +1402,7 @@ void SwInvalidateAll( SwFrame *pFrame, long nBottom )
pFrame = pFrame->GetNext();
} while ( pFrame &&
( bAll ||
- aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->getSwFrame()), nBottom ) < 0 ) );
+ aRectFnSet.YDiff( aRectFnSet.GetTop(pFrame->geFrameArea()), nBottom ) < 0 ) );
}
// #i29550#
@@ -1470,7 +1470,7 @@ bool SwContentFrame::CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDont
if ( bFormatPossible && !bSkipContent )
{
- bRet |= !pCnt->IsValid();
+ bRet |= !pCnt->isFrameAreaDefinitionValid();
// #i26945# - no extra invalidation of floating
// screen objects needed.
// Thus, delete call of method <SwFrame::InvalidateObjs( true )>
@@ -1480,10 +1480,10 @@ bool SwContentFrame::CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDont
// #i46941# - frame has to be valid
// Note: frame could be invalid after calling its format, if it's locked.
OSL_ENSURE( !pCnt->IsTextFrame() ||
- pCnt->IsValid() ||
+ pCnt->isFrameAreaDefinitionValid() ||
static_cast<SwTextFrame*>(pCnt)->IsJoinLocked(),
"<SwContentFrame::CalcLowers(..)> - text frame invalid and not locked." );
- if ( pCnt->IsTextFrame() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->isFrameAreaDefinitionValid() )
{
// #i23129#, #i36347# - pass correct page frame to
// the object formatter
@@ -1512,7 +1512,7 @@ bool SwContentFrame::CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDont
}
pCnt->GetUpper()->Calc(pRenderContext);
}
- if( ! bAll && aRectFnSet.YDiff(aRectFnSet.GetTop(pCnt->getSwFrame()), nBottom) > 0 )
+ if( ! bAll && aRectFnSet.YDiff(aRectFnSet.GetTop(pCnt->geFrameArea()), nBottom) > 0 )
break;
pCnt = pCnt->GetNextContentFrame();
}
@@ -1541,7 +1541,7 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
// #130744# An invalid locked table frame will
// not be calculated => It will not become valid =>
// Loop in lcl_RecalcRow(). Therefore we do not consider them for bRet.
- bRet |= !pFrame->IsValid() && ( !pFrame->IsTabFrame() || !static_cast<SwTabFrame*>(pFrame)->IsJoinLocked() );
+ bRet |= !pFrame->isFrameAreaDefinitionValid() && ( !pFrame->IsTabFrame() || !static_cast<SwTabFrame*>(pFrame)->IsJoinLocked() );
pFrame->Calc(pRenderContext);
if( static_cast<SwLayoutFrame*>(pFrame)->Lower() )
bRet |= lcl_InnerCalcLayout( static_cast<SwLayoutFrame*>(pFrame)->Lower(), nBottom);
@@ -1551,7 +1551,7 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
if ( pThisCell && pThisCell->GetTabBox()->getRowSpan() < 1 )
{
SwCellFrame& rToCalc = const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( true ));
- bRet |= !rToCalc.IsValid();
+ bRet |= !rToCalc.isFrameAreaDefinitionValid();
rToCalc.Calc(pRenderContext);
if ( rToCalc.Lower() )
bRet |= lcl_InnerCalcLayout( rToCalc.Lower(), nBottom);
@@ -1560,7 +1560,7 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
pFrame = pFrame->GetNext();
} while( pFrame &&
( bAll ||
- aRectFnSet.YDiff(aRectFnSet.GetTop(pFrame->getSwFrame()), nBottom) < 0 )
+ aRectFnSet.YDiff(aRectFnSet.GetTop(pFrame->geFrameArea()), nBottom) < 0 )
&& pFrame->GetUpper() == pOldUp );
return bRet;
}
@@ -1788,7 +1788,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
SwLayNotify aNotify( this ); //does the notification in the DTor
// If pos is invalid, we have to call a SetInvaKeep at aNotify.
// Otherwise the keep attribute would not work in front of a table.
- const bool bOldValidPos = GetValidPosFlag();
+ const bool bOldValidPos = isFrameAreaPositionValid();
//If my neighbour is my Follow at the same time, I'll swallow it up.
// OD 09.04.2003 #108698# - join all follows, which are placed on the
@@ -1903,7 +1903,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
// a new one is moved forwards immediately
- if ( !getSwFrame().Top() && IsFollow() )
+ if ( !geFrameArea().Top() && IsFollow() )
{
SwFrame *pPre = GetPrev();
if ( pPre && pPre->IsTabFrame() && static_cast<SwTabFrame*>(pPre)->GetFollow() == this)
@@ -1917,7 +1917,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
int nUnSplitted = 5; // Just another loop control :-(
int nThrowAwayValidLayoutLimit = 5; // And another one :-(
SwRectFnSet aRectFnSet(this);
- while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
const bool bMoveable = IsMoveable();
if (bMoveable &&
@@ -1932,12 +1932,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
bSplit = false;
}
- Point aOldPos( aRectFnSet.GetPos(getSwFrame()) );
+ Point aOldPos( aRectFnSet.GetPos(geFrameArea()) );
MakePos();
- if ( aOldPos != aRectFnSet.GetPos(getSwFrame()) )
+ if ( aOldPos != aRectFnSet.GetPos(geFrameArea()) )
{
- if ( aOldPos.Y() != aRectFnSet.GetTop(getSwFrame()) )
+ if ( aOldPos.Y() != aRectFnSet.GetTop(geFrameArea()) )
{
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if( pLayout )
@@ -1949,7 +1949,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pAttrs = pAccess->Get();
}
- mbValidPrtArea = false;
+ setFramePrintAreaValid(false);
aNotify.SetLowersComplete( false );
}
SwFrame *pPre;
@@ -1971,20 +1971,20 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
SwFrame* pFrame = GetFirstNonHeadlineRow();
if ( pFrame )
- n1StLineHeight = aRectFnSet.GetHeight(pFrame->getSwFrame());
+ n1StLineHeight = aRectFnSet.GetHeight(pFrame->geFrameArea());
}
- if ( !mbValidSize || !mbValidPrtArea )
+ if ( !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
{
- const long nOldPrtWidth = aRectFnSet.GetWidth(getSwPrint());
- const long nOldFrameWidth = aRectFnSet.GetWidth(getSwFrame());
- const Point aOldPrtPos = aRectFnSet.GetPos(getSwPrint());
+ const long nOldPrtWidth = aRectFnSet.GetWidth(getFramePrintArea());
+ const long nOldFrameWidth = aRectFnSet.GetWidth(geFrameArea());
+ const Point aOldPrtPos = aRectFnSet.GetPos(getFramePrintArea());
Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout &&
- (aRectFnSet.GetWidth(getSwPrint()) != nOldPrtWidth ||
- aRectFnSet.GetWidth(getSwFrame()) != nOldFrameWidth) )
+ (aRectFnSet.GetWidth(getFramePrintArea()) != nOldPrtWidth ||
+ aRectFnSet.GetWidth(geFrameArea()) != nOldFrameWidth) )
{
pAccess.reset();
m_bCalcLowers |= pLayout->Resize(
@@ -1992,7 +1992,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
- if ( aOldPrtPos != aRectFnSet.GetPos(getSwPrint()) )
+ if ( aOldPrtPos != aRectFnSet.GetPos(getFramePrintArea()) )
aNotify.SetLowersComplete( false );
}
@@ -2008,7 +2008,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->getSwFrame()) )
+ if( pFrame && n1StLineHeight >aRectFnSet.GetHeight(pFrame->geFrameArea()) )
{
SwTabFrame *pMaster = FindMaster();
bool bDummy;
@@ -2027,9 +2027,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
MoveLowerFootnotes( nullptr, pOldBoss, nullptr, true );
if ( bReformat || bKeep )
{
- long nOldTop = aRectFnSet.GetTop(getSwFrame());
+ long nOldTop = aRectFnSet.GetTop(geFrameArea());
MakePos();
- if( nOldTop != aRectFnSet.GetTop(getSwFrame()) )
+ if( nOldTop != aRectFnSet.GetTop(geFrameArea()) )
{
SwHTMLTableLayout *pHTMLLayout =
GetTable()->GetHTMLTableLayout();
@@ -2043,7 +2043,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pAttrs = pAccess->Get();
}
- mbValidPrtArea = false;
+ setFramePrintAreaValid(false);
Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
}
lcl_RecalcTable( *this, nullptr, aNotify );
@@ -2059,7 +2059,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// content.
if ( nullptr != sw_FormatNextContentForKeep( this ) && !GetNext() )
{
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
}
}
}
@@ -2067,7 +2067,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
//Again an invalid value? - do it again...
- if ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ if ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
continue;
// check, if calculation of table frame is ready.
@@ -2077,7 +2077,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(getSwFrame(), aRectFnSet.GetPrtBottom(*GetUpper()));
+ aRectFnSet.BottomDist(geFrameArea(), 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();
@@ -2087,7 +2087,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
if ( GetUpper()->Grow( -nDistanceToUpperPrtBottom ) )
{
// upper is grown --> recalculate <nDistanceToUpperPrtBottom>
- nDistanceToUpperPrtBottom = aRectFnSet.BottomDist(getSwFrame(), aRectFnSet.GetPrtBottom(*GetUpper()));
+ nDistanceToUpperPrtBottom = aRectFnSet.BottomDist(geFrameArea(), aRectFnSet.GetPrtBottom(*GetUpper()));
}
}
@@ -2108,12 +2108,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*pTmp);
if ( bBrowseMode )
nDeadLine += pTmp->Grow( LONG_MAX, true );
- bool bFits = aRectFnSet.BottomDist(getSwFrame(), nDeadLine) > 0;
- if (!bFits && aRectFnSet.GetHeight(GetFollow()->getSwFrame()) == 0)
+ bool bFits = aRectFnSet.BottomDist(geFrameArea(), nDeadLine) > 0;
+ if (!bFits && aRectFnSet.GetHeight(GetFollow()->geFrameArea()) == 0)
// The follow should move backwards, so allow the case
// when the upper has no space, but the follow is
// empty.
- bFits = aRectFnSet.BottomDist(getSwFrame(), nDeadLine) >= 0;
+ bFits = aRectFnSet.BottomDist(geFrameArea(), nDeadLine) >= 0;
if (bFits)
{
// First, we remove an existing follow flow line.
@@ -2150,7 +2150,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
continue;
}
- const SwTwips nOld = aRectFnSet.GetHeight(getSwFrame());
+ const SwTwips nOld = aRectFnSet.GetHeight(geFrameArea());
long nRowsToMove = lcl_GetMaximumLayoutRowSpan( *pRow );
SwFrame* pRowToMove = pRow;
@@ -2183,7 +2183,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pRowToMove = pNextRow;
}
- if ( nOld != aRectFnSet.GetHeight(getSwFrame()) )
+ if ( nOld != aRectFnSet.GetHeight(geFrameArea()) )
lcl_RecalcTable( *this, static_cast<SwLayoutFrame*>(pRow), aNotify );
continue;
@@ -2231,15 +2231,15 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// The last row wants to keep with the frame behind the table.
// Check if the next frame is on a different page and valid.
// In this case we do a magic trick:
- if ( !bKeep && !GetNext() && pTmpNxt && pTmpNxt->IsValid() )
+ if ( !bKeep && !GetNext() && pTmpNxt && pTmpNxt->isFrameAreaDefinitionValid() )
{
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
bLastRowHasToMoveToFollow = true;
}
}
}
- if ( IsValid() )
+ if ( isFrameAreaDefinitionValid() )
{
if (m_bCalcLowers)
{
@@ -2264,7 +2264,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// an unsolvable problem: We ignore it with all our power.
if ( !bMoveable )
{
- if (m_bCalcLowers && IsValid())
+ if (m_bCalcLowers && isFrameAreaDefinitionValid())
{
lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
@@ -2283,12 +2283,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
continue;
}
- if (m_bCalcLowers && IsValid())
+ if (m_bCalcLowers && isFrameAreaDefinitionValid())
{
lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
m_bCalcLowers = false;
- if( !IsValid() )
+ if( !isFrameAreaDefinitionValid() )
continue;
}
@@ -2321,7 +2321,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// all kinds of unexpected things could happen.
if ( !bEmulateTableKeepFwdMoveAllowed ||
( IsInSct() && (FindSctFrame())->Lower()->IsColumnFrame() &&
- 0 == aRectFnSet.GetHeight(GetUpper()->getSwFrame())
+ 0 == aRectFnSet.GetHeight(GetUpper()->geFrameArea())
) )
{
bTryToSplit = false;
@@ -2347,7 +2347,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( getSwFrame(), nDeadLine ) > 0 && !bLastRowHasToMoveToFollow )
+ if( aRectFnSet.BottomDist( geFrameArea(), nDeadLine ) > 0 && !bLastRowHasToMoveToFollow )
{
continue;
}
@@ -2384,7 +2384,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
++nMinNumOfLines;
const SwTwips nBreakLine = aRectFnSet.YInc(
- aRectFnSet.GetTop(getSwFrame()),
+ aRectFnSet.GetTop(geFrameArea()),
aRectFnSet.GetTopMargin(*this) +
lcl_GetHeightOfRows( GetLower(), nMinNumOfLines ) );
@@ -2402,11 +2402,14 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
if (!nThrowAwayValidLayoutLimit)
continue;
- bool bInitialLoopEndCondition = mbValidPos && mbValidSize && mbValidPrtArea;
+ const bool bInitialLoopEndCondition(isFrameAreaPositionValid() && isFrameAreaSizeValid() && isFramePrintAreaValid());
RemoveFollowFlowLine();
- bool bFinalLoopEndCondition = mbValidPos && mbValidSize && mbValidPrtArea;
+ const bool bFinalLoopEndCondition(isFrameAreaPositionValid() && isFrameAreaSizeValid() && isFramePrintAreaValid());
+
if (bInitialLoopEndCondition && !bFinalLoopEndCondition)
+ {
--nThrowAwayValidLayoutLimit;
+ }
}
const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !(bAllowSplitOfRow || !bEmulateTableKeepFwdMoveAllowed) ) );
@@ -2436,7 +2439,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
if ( bSplitError && bTryToSplit ) // no restart if we did not try to split: i72847, i79426
{
lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), LONG_MAX );
- mbValidPos = false;
+ setFrameAreaPositionValid(false);
bTryToSplit = false;
continue;
}
@@ -2477,7 +2480,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()->getSwFrame()) );
+ fnRectX.GetBottom(GetFollow()->GetUpper()->geFrameArea()) );
// #i43913#
// #i63632# Do not unlock the
// follow if it wasn't locked before.
@@ -2574,19 +2577,19 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
GetUpper()->ResetCompletePaint();
}
- if (m_bCalcLowers && IsValid())
+ if (m_bCalcLowers && isFrameAreaDefinitionValid())
{
// #i44910# - format of lower frames unnecessary
// and can cause layout loops, if table doesn't fit and isn't
// allowed to split.
SwTwips nDistToUpperPrtBottom =
- aRectFnSet.BottomDist( getSwFrame(), aRectFnSet.GetPrtBottom(*GetUpper()));
+ aRectFnSet.BottomDist( geFrameArea(), aRectFnSet.GetPrtBottom(*GetUpper()));
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
{
lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
m_bCalcLowers = false;
- if (!mbValidPrtArea)
+ if (!isFramePrintAreaValid())
m_pTable->SetRowsToRepeat(1);
}
#if OSL_DEBUG_LEVEL > 0
@@ -2597,7 +2600,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
#endif
}
- } //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
+ } //while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || !isFramePrintAreaValid() )
//If my direct predecessor is my master now, it can destroy me during the
//next best opportunity.
@@ -2635,10 +2638,10 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
{
SwRectFnSet aRectFnSet(this);
const bool bConsiderWrapOnObjPos = rIDSA.get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION);
- long nPrtPos = aRectFnSet.GetTop(getSwFrame());
+ long nPrtPos = aRectFnSet.GetTop(geFrameArea());
nPrtPos = aRectFnSet.YInc( nPrtPos, rUpper );
- SwRect aRect( getSwFrame() );
- long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(getSwPrint()), rUpper );
+ SwRect aRect( geFrameArea() );
+ long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(getFramePrintArea()), rUpper );
if( nYDiff > 0 )
aRectFnSet.AddBottom( aRect, -nYDiff );
for ( size_t i = 0; i < pPage->GetSortedObjs()->size(); ++i )
@@ -2668,7 +2671,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
bool bConsiderFly =
// #i46807# - do not consider invalid
// Writer fly frames.
- pFly->IsValid() &&
+ pFly->isFrameAreaDefinitionValid() &&
// fly anchored at character
pFly->IsFlyAtContentFrame() &&
// fly overlaps with corresponding table rectangle
@@ -2725,7 +2728,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
{
const long nWidth = aRectFnSet.XDiff(
aRectFnSet.GetRight(aFlyRect),
- aRectFnSet.GetLeft(pFly->GetAnchorFrame()->getSwFrame()) );
+ aRectFnSet.GetLeft(pFly->GetAnchorFrame()->geFrameArea()) );
rLeftOffset = std::max( rLeftOffset, nWidth );
bInvalidatePrtArea = true;
}
@@ -2734,7 +2737,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
text::HoriOrientation::RIGHT == rHori.GetHoriOrient() )
{
const long nWidth = aRectFnSet.XDiff(
- aRectFnSet.GetRight(pFly->GetAnchorFrame()->getSwFrame()),
+ aRectFnSet.GetRight(pFly->GetAnchorFrame()->geFrameArea()),
aRectFnSet.GetLeft(aFlyRect) );
rRightOffset = std::max( rRightOffset, nWidth );
bInvalidatePrtArea = true;
@@ -2742,7 +2745,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
}
}
}
- rUpper = aRectFnSet.YDiff( nPrtPos, aRectFnSet.GetTop(getSwFrame()) );
+ rUpper = aRectFnSet.YDiff( nPrtPos, aRectFnSet.GetTop(geFrameArea()) );
}
return bInvalidatePrtArea;
@@ -2755,13 +2758,13 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
OSL_ENSURE( pAttrs, "TabFrame::Format, pAttrs is 0." );
SwRectFnSet aRectFnSet(this);
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- long nDiff = aRectFnSet.GetWidth(GetUpper()->getSwPrint()) -
- aRectFnSet.GetWidth(getSwFrame());
+ long nDiff = aRectFnSet.GetWidth(GetUpper()->getFramePrintArea()) -
+ aRectFnSet.GetWidth(geFrameArea());
if( nDiff )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddRight( aFrm, nDiff );
}
}
@@ -2779,7 +2782,10 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
long nTmpRight = -1000000,
nLeftOffset = 0;
if( CalcFlyOffsets( nUpper, nLeftOffset, nTmpRight ) )
- mbValidPrtArea = false;
+ {
+ setFramePrintAreaValid(false);
+ }
+
long nRightOffset = std::max( 0L, nTmpRight );
SwTwips nLower = pAttrs->CalcBottomLine();
@@ -2787,8 +2793,9 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
if ( IsCollapsingBorders() )
nLower += GetBottomLineSize();
- if ( !mbValidPrtArea )
- { mbValidPrtArea = true;
+ if ( !isFramePrintAreaValid() )
+ {
+ setFramePrintAreaValid(true);
//The width of the PrtArea is given by the FrameFormat, the borders have to
//be set accordingly.
@@ -2798,8 +2805,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(getSwPrint());
- const SwTwips nMax = aRectFnSet.GetWidth(getSwFrame());
+ const SwTwips nOldHeight = aRectFnSet.GetHeight(getFramePrintArea());
+ const SwTwips nMax = aRectFnSet.GetWidth(geFrameArea());
// OD 14.03.2003 #i9040# - adjust variable names.
const SwTwips nLeftLine = pAttrs->CalcLeftLine();
@@ -2979,33 +2986,35 @@ 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 -= getSwPrint().Left();
+ nWidth -= getFramePrintArea().Left();
nWidth -= pAttrs->CalcRightLine();
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Width( std::min( nWidth, aPrt.Width() ) );
}
- if ( nOldHeight != aRectFnSet.GetHeight(getSwPrint()) )
- mbValidSize = false;
+ if ( nOldHeight != aRectFnSet.GetHeight(getFramePrintArea()) )
+ {
+ setFrameAreaSizeValid(false);
+ }
}
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
//The size is defined by the content plus the borders.
SwTwips nRemaining = 0, nDiff;
SwFrame *pFrame = m_pLower;
while ( pFrame )
{
- nRemaining += aRectFnSet.GetHeight(pFrame->getSwFrame());
+ nRemaining += aRectFnSet.GetHeight(pFrame->geFrameArea());
pFrame = pFrame->GetNext();
}
//And now add the borders
nRemaining += nUpper + nLower;
- nDiff = aRectFnSet.GetHeight(getSwFrame()) - nRemaining;
+ nDiff = aRectFnSet.GetHeight(geFrameArea()) - nRemaining;
if ( nDiff > 0 )
Shrink( nDiff );
else if ( nDiff < 0 )
@@ -3016,7 +3025,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(getSwFrame());
+ SwTwips nHeight = aRectFnSet.GetHeight(geFrameArea());
if( nHeight > 0 && nDist > ( LONG_MAX - nHeight ) )
nDist = LONG_MAX - nHeight;
@@ -3025,15 +3034,15 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( GetUpper() )
{
- SwRect aOldFrame( getSwFrame() );
+ SwRect aOldFrame( geFrameArea() );
//The upper only grows as far as needed. nReal provides the distance
//which is already available.
- SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->getSwPrint());
+ SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->getFramePrintArea());
SwFrame *pFrame = GetUpper()->Lower();
while ( pFrame && GetFollow() != pFrame )
{
- nReal -= aRectFnSet.GetHeight(pFrame->getSwFrame());
+ nReal -= aRectFnSet.GetHeight(pFrame->geFrameArea());
pFrame = pFrame->GetNext();
}
@@ -3051,7 +3060,7 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, nDist );
}
@@ -3207,7 +3216,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->getSwFrame().Top() );
+ SwDocPosUpdate aMsgHint( pPage->geFrameArea().Top() );
GetFormat()->GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
}
@@ -3374,33 +3383,33 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat
if ( !SwFlowFrame::IsMoveBwdJump() )
{
- long nOldWidth = aRectFnSet.GetWidth(GetUpper()->getSwPrint());
+ long nOldWidth = aRectFnSet.GetWidth(GetUpper()->getFramePrintArea());
SwRectFnSet fnRectX(pNewUpper);
- long nNewWidth = fnRectX.GetWidth(pNewUpper->getSwPrint());
+ long nNewWidth = fnRectX.GetWidth(pNewUpper->getFramePrintArea());
if( std::abs( nNewWidth - nOldWidth ) < 2 )
{
- bMoveAnyway = BwdMoveNecessary( pOldPage, getSwFrame() ) > 1;
+ bMoveAnyway = BwdMoveNecessary( pOldPage, geFrameArea() ) > 1;
if( !bMoveAnyway )
{
- SwRect aRect( pNewUpper->getSwPrint() );
- aRect.Pos() += pNewUpper->getSwFrame().Pos();
+ SwRect aRect( pNewUpper->getFramePrintArea() );
+ aRect.Pos() += pNewUpper->geFrameArea().Pos();
const SwFrame *pPrevFrame = pNewUpper->Lower();
while ( pPrevFrame && pPrevFrame != this )
{
- fnRectX.SetTop( aRect, fnRectX.GetBottom(pPrevFrame->getSwFrame()) );
+ fnRectX.SetTop( aRect, fnRectX.GetBottom(pPrevFrame->geFrameArea()) );
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->getSwPrint().Height == 0. In this
+ // it is possible that pNewUpper->getFramePrintArea().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->getSwPrint()) > 0 || nTmpSpace <= 0 )
+ if ( fnRectX.GetHeight(pNewUpper->getFramePrintArea()) > 0 || nTmpSpace <= 0 )
nSpace = nTmpSpace;
const SwViewShell *pSh = getRootFrame()->GetCurrShell();
@@ -3420,7 +3429,7 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat
return true;
}
bool bFits = nSpace > 0;
- if (!bFits && aRectFnSet.GetHeight(getSwFrame()) == 0)
+ if (!bFits && aRectFnSet.GetHeight(geFrameArea()) == 0)
// This frame fits into pNewUpper in case it has no space, but this
// frame is empty.
bFits = nSpace >= 0;
@@ -3539,11 +3548,11 @@ void SwTabFrame::Cut()
SwFrame::DestroyFrame(pUp);
}
}
- else if( aRectFnSet.GetHeight(getSwFrame()) )
+ else if( aRectFnSet.GetHeight(geFrameArea()) )
{
// OD 26.08.2003 #i18103# - *no* 'ColUnlock' of section -
// undo changes of fix for #104992#
- pUp->Shrink( getSwFrame().Height() );
+ pUp->Shrink( geFrameArea().Height() );
}
}
@@ -3577,10 +3586,10 @@ void SwTabFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
}
SwRectFnSet aRectFnSet(this);
- if( aRectFnSet.GetHeight(getSwFrame()) )
- pParent->Grow( aRectFnSet.GetHeight(getSwFrame()) );
+ if( aRectFnSet.GetHeight(geFrameArea()) )
+ pParent->Grow( aRectFnSet.GetHeight(geFrameArea()) );
- if( aRectFnSet.GetWidth(getSwFrame()) != aRectFnSet.GetWidth(pParent->getSwPrint()) )
+ if( aRectFnSet.GetWidth(geFrameArea()) != aRectFnSet.GetWidth(pParent->getFramePrintArea()) )
Prepare( PREP_FIXSIZE_CHG );
if ( GetPrev() )
{
@@ -3709,7 +3718,10 @@ void SwRowFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
void SwRowFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( !GetNext() )
- mbValidSize = false;
+ {
+ setFrameAreaSizeValid(false);
+ }
+
SwLayoutFrame::MakeAll(pRenderContext);
}
@@ -3782,14 +3794,14 @@ long CalcHeightWithFlys( const SwFrame *pFrame )
const SwTwips nFrameDiff =
aRectFnSet.YDiff(
- aRectFnSet.GetTop(pTmp->getSwFrame()),
- aRectFnSet.GetTop(pFrame->getSwFrame()) );
+ aRectFnSet.GetTop(pTmp->geFrameArea()),
+ aRectFnSet.GetTop(pFrame->geFrameArea()) );
nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop + nFrameDiff -
- aRectFnSet.GetHeight(pFrame->getSwFrame()) );
+ aRectFnSet.GetHeight(pFrame->geFrameArea()) );
// #i56115# The first height calculation
- // gives wrong results if pFrame->getSwPrint().Y() > 0. We do
+ // gives wrong results if pFrame->getFramePrintArea().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
@@ -3797,7 +3809,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->getSwFrame()) );
+ aRectFnSet.GetBottom(pFrame->geFrameArea()) );
nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop2 );
}
@@ -3868,7 +3880,7 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrame *_pCell,
}
else
{
- long nLowHeight = aRectFnSet.GetHeight(pLow->getSwFrame());
+ long nLowHeight = aRectFnSet.GetHeight(pLow->geFrameArea());
nHeight += nLowHeight;
// #i26945#
if ( _bConsiderObjs )
@@ -3948,7 +3960,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* _pRow,
const SwFrame* pMasterRow = rMaster.GetUpper();
while ( pMasterRow && pMasterRow != _pRow )
{
- nTmp -= aRectFnSet.GetHeight(pMasterRow->getSwFrame());
+ nTmp -= aRectFnSet.GetHeight(pMasterRow->geFrameArea());
pMasterRow = pMasterRow->GetNext();
}
}
@@ -4085,7 +4097,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->getSwFrame());
+ nResult += aRectFnSet.GetHeight(pCurRow->geFrameArea());
}
}
}
@@ -4099,18 +4111,18 @@ void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
const bool bFix = mbFixSize;
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
//RowFrames don't have borders and so on therefore the PrtArea always
//matches the Frame.
- mbValidPrtArea = true;
+ setFramePrintAreaValid(true);
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left( 0 );
aPrt.Top( 0 );
- aPrt.Width ( getSwFrame().Width() );
- aPrt.Height( getSwFrame().Height() );
+ aPrt.Width ( geFrameArea().Width() );
+ aPrt.Height( geFrameArea().Height() );
}
// #i29550#
@@ -4213,9 +4225,9 @@ void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
}
}
- while ( !mbValidSize )
+ while ( !isFrameAreaSizeValid() )
{
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
#if OSL_DEBUG_LEVEL > 0
if ( HasFixSize() )
@@ -4224,7 +4236,7 @@ void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
OSL_ENSURE( rFrameSize.GetSize().Height() > 0, "Has it" );
}
#endif
- const SwTwips nDiff = aRectFnSet.GetHeight(getSwFrame()) -
+ const SwTwips nDiff = aRectFnSet.GetHeight(geFrameArea()) -
( HasFixSize() && !IsRowSpanLine()
? pAttrs->GetSize().Height()
// #i26945#
@@ -4245,10 +4257,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()->getSwPrint());
+ SwTwips nDiff = aRectFnSet.GetHeight(GetUpper()->getFramePrintArea());
SwFrame *pSibling = GetUpper()->Lower();
do
- { nDiff -= aRectFnSet.GetHeight(pSibling->getSwFrame());
+ { nDiff -= aRectFnSet.GetHeight(pSibling->geFrameArea());
pSibling = pSibling->GetNext();
} while ( pSibling );
if ( nDiff > 0 )
@@ -4256,7 +4268,7 @@ void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
mbFixSize = false;
Grow( nDiff );
mbFixSize = bFix;
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
}
}
}
@@ -4285,11 +4297,11 @@ 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->getSwFrame());
+ const long nDiff = nHeight - aRectFnSet.GetHeight(pCellFrame->geFrameArea());
if ( nDiff )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*pCellFrame);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pCellFrame);
aRectFnSet.AddBottom( aFrm, nDiff );
}
@@ -4321,7 +4333,7 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
// Use new height for the current row:
nSumRowHeight += pToAdjustRow == this ?
nHeight :
- aRectFnSet.GetHeight(pToAdjustRow->getSwFrame());
+ aRectFnSet.GetHeight(pToAdjustRow->geFrameArea());
if ( nRowSpan-- == 1 )
break;
@@ -4332,11 +4344,11 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
if ( pToAdjustRow && pToAdjustRow != this )
pToAdjustRow->InvalidateSize_();
- const long nDiff = nSumRowHeight - aRectFnSet.GetHeight(pToAdjust->getSwFrame());
+ const long nDiff = nSumRowHeight - aRectFnSet.GetHeight(pToAdjust->geFrameArea());
if ( nDiff )
{
- aOldFrame = pToAdjust->getSwFrame();
- SwFrameRect::FrameWriteAccess aFrm(*pToAdjust);
+ aOldFrame = pToAdjust->geFrameArea();
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pToAdjust);
aRectFnSet.AddBottom( aFrm, nDiff );
pNotify = pToAdjust;
}
@@ -4397,14 +4409,14 @@ 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( getSwFrame(), aRectFnSet.GetPrtBottom(*GetUpper()->GetUpper()) );
+ aRectFnSet.BottomDist( geFrameArea(), aRectFnSet.GetPrtBottom(*GetUpper()->GetUpper()) );
if ( bRestrictTableGrowth && nAdditionalSpace > 0 )
{
nReal = std::min( nAdditionalSpace, nDist );
nDist -= nReal;
if ( !bTst )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.AddBottom( aFrm, nReal );
}
}
@@ -4432,7 +4444,7 @@ SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
SwRectFnSet fnRectX(this);
- AdjustCells( fnRectX.GetHeight(getSwPrint()) + nReal, true );
+ AdjustCells( fnRectX.GetHeight(getFramePrintArea()) + nReal, true );
if ( nReal )
SetCompletePaint();
}
@@ -4445,7 +4457,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
SwRectFnSet aRectFnSet(this);
if( HasFixSize() )
{
- AdjustCells( aRectFnSet.GetHeight(getSwPrint()), true );
+ AdjustCells( aRectFnSet.GetHeight(getFramePrintArea()), true );
return 0L;
}
@@ -4467,7 +4479,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(getSwFrame()) )
+ if( nMinHeight < aRectFnSet.GetHeight(geFrameArea()) )
{
// #i26945#
OSL_ENSURE( FindTabFrame(), "<SwRowFrame::ShrinkFrame(..)> - no table frame -> crash." );
@@ -4475,8 +4487,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
nMinHeight = lcl_CalcMinRowHeight( this, bConsiderObjs );
}
- if ( (aRectFnSet.GetHeight(getSwFrame()) - nRealDist) < nMinHeight )
- nRealDist = aRectFnSet.GetHeight(getSwFrame()) - nMinHeight;
+ if ( (aRectFnSet.GetHeight(geFrameArea()) - nRealDist) < nMinHeight )
+ nRealDist = aRectFnSet.GetHeight(geFrameArea()) - nMinHeight;
}
if ( nRealDist < 0 )
nRealDist = 0;
@@ -4486,8 +4498,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
if ( !bTst )
{
- SwTwips nHeight = aRectFnSet.GetHeight(getSwFrame());
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwTwips nHeight = aRectFnSet.GetHeight(geFrameArea());
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetHeight( aFrm, nHeight - nReal );
if( IsVertical() && !IsVertLR() && !aRectFnSet.IsRev() )
@@ -4505,8 +4517,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
nReal -= nTmp;
- SwTwips nHeight = aRectFnSet.GetHeight(getSwFrame());
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwTwips nHeight = aRectFnSet.GetHeight(geFrameArea());
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetHeight( aFrm, nHeight + nReal );
if( IsVertical() && !IsVertLR() && !aRectFnSet.IsRev() )
@@ -4538,7 +4550,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
pMasterTab->InvalidatePos();
}
}
- AdjustCells( aRectFnSet.GetHeight(getSwPrint()) - nReal, true );
+ AdjustCells( aRectFnSet.GetHeight(getFramePrintArea()) - nReal, true );
}
return nReal;
}
@@ -4638,7 +4650,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
SwRectFnSet aRectFnSet(pLay);
while ( pFrame )
{
- long nFrameTop = aRectFnSet.GetTop(pFrame->getSwFrame());
+ long nFrameTop = aRectFnSet.GetTop(pFrame->geFrameArea());
if( nFrameTop != lYStart )
{
bRet = true;
@@ -4646,7 +4658,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
const long lDiffX = lYStart - nFrameTop;
{
- SwFrameRect::FrameWriteAccess aFrm(*pFrame);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFrame);
aRectFnSet.SubTop( aFrm, -lDiff );
aRectFnSet.AddBottom( aFrm, lDiff );
}
@@ -4659,7 +4671,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()->getSwFrame())
+ aRectFnSet.GetTop(static_cast<SwLayoutFrame*>(pFrame)->Lower()->geFrameArea())
+ lDiffX, bInva );
if ( pFrame->GetDrawObjs() )
{
@@ -4701,13 +4713,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->getSwFrame().Top() &&
+ FAR_AWAY != pFly->geFrameArea().Top() &&
bVertPosDepOnAnchor &&
!pFly->ConsiderObjWrapInfluenceOnObjPos();
if ( bDirectMove )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*pFly);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFly);
aRectFnSet.SubTop( aFrm, -lDiff );
aRectFnSet.AddBottom( aFrm, lDiff );
}
@@ -4835,7 +4847,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->getSwFrame()) );
+ aRectFnSet.GetHeight(pFrame->geFrameArea()) );
// 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.
@@ -4843,7 +4855,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->getSwFrame(), aRectFnSet.GetPrtBottom(*pLay) );
+ aRectFnSet.BottomDist( pFrame->geFrameArea(), 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
@@ -4867,9 +4879,9 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
const SwTabFrame* pTab = FindTabFrame();
SwRectFnSet aRectFnSet(pTab);
- if ( !mbValidPrtArea )
+ if ( !isFramePrintAreaValid() )
{
- mbValidPrtArea = true;
+ setFramePrintAreaValid(true);
//Adjust position.
if ( Lower() )
@@ -4900,9 +4912,9 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
long nRemaining = GetTabBox()->getRowSpan() >= 1 ?
::lcl_CalcMinCellHeight( this, pTab->IsConsiderObjsForMinCellHeight(), pAttrs ) :
0;
- if ( !mbValidSize )
+ if ( !isFrameAreaSizeValid() )
{
- mbValidSize = true;
+ setFrameAreaSizeValid(true);
//The VarSize of the CellFrames is always the width.
//The width is not variable though, it is defined by the format.
@@ -4922,7 +4934,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->getSwPrint());
+ const long nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
if ( nWish != nPrtWidth )
{
// Avoid rounding problems, at least for the new table model
@@ -4953,7 +4965,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
SwTwips nSumFrameWidths = 0;
while ( pTmpCell != this )
{
- nSumFrameWidths += aRectFnSet.GetWidth(pTmpCell->getSwFrame());
+ nSumFrameWidths += aRectFnSet.GetWidth(pTmpCell->geFrameArea());
pTmpCell = pTmpCell->GetNext();
}
@@ -4973,19 +4985,19 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
else
{
OSL_ENSURE( pAttrs->GetSize().Width() > 0, "Box without width" );
- nWidth = aRectFnSet.GetWidth(GetUpper()->getSwPrint());
+ nWidth = aRectFnSet.GetWidth(GetUpper()->getFramePrintArea());
SwFrame *pPre = GetUpper()->Lower();
while ( pPre != this )
{
- nWidth -= aRectFnSet.GetWidth(pPre->getSwFrame());
+ nWidth -= aRectFnSet.GetWidth(pPre->geFrameArea());
pPre = pPre->GetNext();
}
}
- const long nDiff = nWidth - aRectFnSet.GetWidth(getSwFrame());
+ const long nDiff = nWidth - aRectFnSet.GetWidth(geFrameArea());
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
if( IsNeighbourFrame() && IsRightToLeft() )
{
@@ -4998,12 +5010,12 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
}
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.AddRight( aPrt, nDiff );
}
//Adjust the height, it's defined through the content and the border.
- const long nDiffHeight = nRemaining - aRectFnSet.GetHeight(getSwFrame());
+ const long nDiffHeight = nRemaining - aRectFnSet.GetHeight(geFrameArea());
if ( nDiffHeight )
{
if ( nDiffHeight > 0 )
@@ -5011,14 +5023,20 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
//Validate again if no growth happened. Invalidation is done
//through AdjustCells of the row.
if ( !Grow( nDiffHeight ) )
- mbValidSize = mbValidPrtArea = true;
+ {
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
+ }
}
else
{
//Only keep invalidated if shrinking was done; this can be
//dismissed because all adjoined cells have to be the same size.
if ( !Shrink( -nDiffHeight ) )
- mbValidSize = mbValidPrtArea = true;
+ {
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
+ }
}
}
}
@@ -5050,7 +5068,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
//No alignment if border with flow overlaps the cell.
if ( pPg->GetSortedObjs() )
{
- SwRect aRect( getSwPrint() ); aRect += getSwFrame().Pos();
+ SwRect aRect( getFramePrintArea() ); aRect += geFrameArea().Pos();
for (SwAnchoredObject* pAnchoredObj : *pPg->GetSortedObjs())
{
SwRect aTmp( pAnchoredObj->GetObjRect() );
@@ -5090,11 +5108,11 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
}
}
- long nPrtHeight = aRectFnSet.GetHeight(getSwPrint());
+ long nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea());
if( ( bVertDir && ( nRemaining -= lcl_CalcTopAndBottomMargin( *this, *pAttrs ) ) < nPrtHeight ) ||
- aRectFnSet.GetTop(Lower()->getSwFrame()) != aRectFnSet.GetPrtTop(*this) )
+ aRectFnSet.GetTop(Lower()->geFrameArea()) != aRectFnSet.GetPrtTop(*this) )
{
- long nDiff = aRectFnSet.GetHeight(getSwPrint()) - nRemaining;
+ long nDiff = aRectFnSet.GetHeight(getFramePrintArea()) - nRemaining;
if ( nDiff >= 0 )
{
long lTopOfst = 0;
@@ -5375,12 +5393,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->getSwPrint());
+ SwTwips nReal = aRectFnSet.GetHeight(pPrevCell->getFramePrintArea());
const SwFrame* pFrame = pPrevCell->Lower();
const SwFrame* pLast = pFrame;
while ( pFrame )
{
- nReal -= aRectFnSet.GetHeight(pFrame->getSwFrame());
+ nReal -= aRectFnSet.GetHeight(pFrame->geFrameArea());
pLast = pFrame;
pFrame = pFrame->GetNext();
}
@@ -5466,7 +5484,7 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
if ( bDontSplit )
{
// Table is not allowed to split: Take the whole height, that's all
- return aRectFnSet.GetHeight(getSwFrame());
+ return aRectFnSet.GetHeight(geFrameArea());
}
SwTwips nTmpHeight = 0;
@@ -5517,7 +5535,7 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
if ( pFirstRow )
{
const bool bSplittable = pFirstRow->IsRowSplitAllowed();
- const SwTwips nFirstLineHeight = aRectFnSet.GetHeight(pFirstRow->getSwFrame());
+ const SwTwips nFirstLineHeight = aRectFnSet.GetHeight(pFirstRow->geFrameArea());
if ( !bSplittable )
{
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index add551fe8680..d846975b0860 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 ( !getSwFrame().IsInside( aPoint ) )
+ if ( !geFrameArea().IsInside( aPoint ) )
{
- aPoint.X() = std::max( aPoint.X(), getSwFrame().Left() );
- aPoint.X() = std::min( aPoint.X(), getSwFrame().Right() );
- aPoint.Y() = std::max( aPoint.Y(), getSwFrame().Top() );
- aPoint.Y() = std::min( aPoint.Y(), getSwFrame().Bottom() );
+ aPoint.X() = std::max( aPoint.X(), geFrameArea().Left() );
+ aPoint.X() = std::min( aPoint.X(), geFrameArea().Right() );
+ aPoint.Y() = std::max( aPoint.Y(), geFrameArea().Top() );
+ aPoint.Y() = std::min( aPoint.Y(), geFrameArea().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->getSwFrame().Top() < nBottom )
+ if( pPage->geFrameArea().Top() < nBottom )
{
- if( pPage->getSwFrame().Bottom() > rRect.Top() )
+ if( pPage->geFrameArea().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() > getSwFrame().Right() &&
- rPoint.Y() > getSwFrame().Bottom() )
+ rPoint.X() > geFrameArea().Right() &&
+ rPoint.Y() > geFrameArea().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->getSwFrame().IsInside( rPoint ) )
+ if ( pFrame->geFrameArea().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 = getSwFrame().IsInside( rPoint ) && Lower();
+ bool bInside = geFrameArea().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->getSwFrame().IsInside( rPoint ) &&
- getSwFrame().IsInside( pFly->getSwFrame() ) )
+ if ( pFly && pFly->geFrameArea().IsInside( rPoint ) &&
+ geFrameArea().IsInside( pFly->geFrameArea() ) )
{
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->getSwFrame().IsInside( rPoint ) )
+ if ( pFrame->geFrameArea().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->getSwFrame() );
+ SwRect aRect( pStart->geFrameArea() );
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->getSwFrame()) +
- aRectFnSet.GetWidth(pCell->getSwFrame()) / 2;
+ nX = aRectFnSet.GetLeft(pCell->geFrameArea()) +
+ aRectFnSet.GetWidth(pCell->geFrameArea()) / 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->getSwFrame()) -
- aRectFnSet.GetLeft(pStTab->getSwFrame());
+ nX += aRectFnSet.GetLeft(pTable->geFrameArea()) -
+ aRectFnSet.GetLeft(pStTab->geFrameArea());
}
}
@@ -870,7 +870,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
if ( pTable &&
!pTab->GetUpper()->IsInTab() &&
!pTable->GetUpper()->IsInTab() )
- nX += pTab->getSwFrame().Left() - pTable->getSwFrame().Left();
+ nX += pTab->geFrameArea().Left() - pTable->geFrameArea().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->getSwFrame());
+ long nTmpTop = aRectFnSet.GetTop(pCell->geFrameArea());
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->getSwFrame());
+ long nTmpTop = aRectFnSet.GetTop(pCnt->geFrameArea());
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->getSwFrame().IsInside( aInsideCell ) )
+ if ( pCell && pCell->geFrameArea().IsInside( aInsideCell ) )
{
bEnd = true;
//Get the right Content out of the cell.
- if ( !pCnt->getSwFrame().IsInside( aInsideCnt ) )
+ if ( !pCnt->geFrameArea().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->getSwFrame().IsInside( aInsideCnt ) )
+ else if ( pCnt->geFrameArea().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->getSwFrame().Pos();
- rPt += pContent->getSwPrint().Pos();
+ rPt = pContent->geFrameArea().Pos();
+ rPt += pContent->getFramePrintArea().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->getSwFrame().Top() && rPt.Y() <= pUp->getSwFrame().Bottom() )
+ if( rPt.Y() >= pUp->geFrameArea().Top() && rPt.Y() <= pUp->geFrameArea().Bottom() )
return pUp;
return nullptr;
}
if( pUp->IsFootnoteContFrame() )
- return pUp->getSwFrame().IsInside( rPt ) ? pUp : nullptr;
+ return pUp->geFrameArea().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->getSwFrame().Width() &&
+ if ( pContent->geFrameArea().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->getSwPrint().SSize() );
- if ( aActualSize.Height() > pActual->GetUpper()->getSwPrint().Height() )
- aActualSize.Height() = pActual->GetUpper()->getSwPrint().Height();
+ Size aActualSize( pActual->getFramePrintArea().SSize() );
+ if ( aActualSize.Height() > pActual->GetUpper()->getFramePrintArea().Height() )
+ aActualSize.Height() = pActual->GetUpper()->getFramePrintArea().Height();
SwRectFnSet aRectFnSet(pActual);
if ( !pActual->GetPrev() &&
aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pActual),
aRectFnSet.IsVert() ? rPoint.X() : rPoint.Y() ) > 0 )
{
- aPoint.Y() = pActual->getSwFrame().Top() + pActual->getSwPrint().Top();
- aPoint.X() = pActual->getSwFrame().Left() +
+ aPoint.Y() = pActual->geFrameArea().Top() + pActual->getFramePrintArea().Top();
+ aPoint.X() = pActual->geFrameArea().Left() +
( pActual->IsRightToLeft() || aRectFnSet.IsVert() ?
- pActual->getSwPrint().Right() :
- pActual->getSwPrint().Left() );
+ pActual->getFramePrintArea().Right() :
+ pActual->getFramePrintArea().Left() );
}
else if ( !pActual->GetNext() &&
aRectFnSet.YDiff( aRectFnSet.GetPrtBottom(*pActual),
aRectFnSet.IsVert() ? rPoint.X() : rPoint.Y() ) < 0 )
{
- aPoint.Y() = pActual->getSwFrame().Top() + pActual->getSwPrint().Bottom();
- aPoint.X() = pActual->getSwFrame().Left() +
+ aPoint.Y() = pActual->geFrameArea().Top() + pActual->getFramePrintArea().Bottom();
+ aPoint.X() = pActual->geFrameArea().Left() +
( pActual->IsRightToLeft() || aRectFnSet.IsVert() ?
- pActual->getSwPrint().Left() :
- pActual->getSwPrint().Right() );
+ pActual->getFramePrintArea().Left() :
+ pActual->getFramePrintArea().Right() );
}
//Bring the Point in to the PrtArea
- const SwRect aRect( pActual->getSwFrame().Pos() + pActual->getSwPrint().Pos(),
+ const SwRect aRect( pActual->geFrameArea().Pos() + pActual->getFramePrintArea().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() > getSwFrame().Bottom() )
+ else if ( aContentFrame.Top() > geFrameArea().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->getSwFrame().Pos() + pAct->getSwPrint().Pos(), pAct->getSwPrint().SSize() );
+ const SwRect aRect( pAct->geFrameArea().Pos() + pAct->getFramePrintArea().Pos(), pAct->getFramePrintArea().SSize() );
if ( aAct.Y() < aRect.Top() )
aAct.Y() = aRect.Top();
else if ( aAct.Y() > aRect.Bottom() )
@@ -1433,7 +1433,7 @@ void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
else if ( aAct.X() > aRect.Right() )
aAct.X() = aRect.Right();
- if( !pAct->IsValid() )
+ if( !pAct->isFrameAreaDefinitionValid() )
{
// ContentFrame not formatted -> always on node-beginning
SwContentNode* pCNd = const_cast<SwContentNode*>(pAct->GetNode());
@@ -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->getSwFrame().Bottom() < rPoint.Y() )
+ while( pPage->GetNext() && pPage->geFrameArea().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->getSwFrame().Top() && pPage->GetPrev() )
+ while ( rPoint.Y() < pCnt->geFrameArea().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->getSwFrame().Top() && !lcl_IsInRepeatedHeadline( pCnt ) )
+ if ( rPoint.Y() < pCnt->geFrameArea().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->getSwFrame().Top() > rPoint.Y() &&
+ if( pNxt->geFrameArea().Top() > rPoint.Y() &&
!lcl_IsInRepeatedHeadline( pCnt, &pTFrame ) &&
- ( !pTFrame || pNxt->getSwFrame().Left() > rPoint.X() ))
+ ( !pTFrame || pNxt->geFrameArea().Left() > rPoint.X() ))
{
if (bNext)
- aRet = pNxt->getSwFrame().Pos();
+ aRet = pNxt->geFrameArea().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->getSwFrame().Pos();
+ return pPage->geFrameArea().Pos();
}
/** get page frame by phyiscal page number
@@ -1765,16 +1765,18 @@ bool SwFrame::OnFirstPage() const
void SwFrame::Calc(vcl::RenderContext* pRenderContext) const
{
- if ( !mbValidPos || !mbValidPrtArea || !mbValidSize )
+ if ( !isFrameAreaPositionValid() || !isFramePrintAreaValid() || !isFrameAreaSizeValid() )
+ {
const_cast<SwFrame*>(this)->PrepareMake(pRenderContext);
+ }
}
Point SwFrame::GetRelPos() const
{
- Point aRet( getSwFrame().Pos() );
+ Point aRet( geFrameArea().Pos() );
// here we cast since SwLayoutFrame is declared only as forwarded
- aRet -= GetUpper()->getSwPrint().Pos();
- aRet -= GetUpper()->getSwFrame().Pos();
+ aRet -= GetUpper()->getFramePrintArea().Pos();
+ aRet -= GetUpper()->geFrameArea().Pos();
return aRet;
}
@@ -1873,7 +1875,7 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor )
/* #109590# Only change table boxes if the frames are
valid. Needed because otherwise the table cursor after moving
table cells by dnd resulted in an empty tables cursor. */
- if ( pStart && pEnd && pStart->IsValid() && pEnd->IsValid())
+ if ( pStart && pEnd && pStart->isFrameAreaDefinitionValid() && pEnd->isFrameAreaDefinitionValid())
{
SwSelUnions aUnions;
::MakeSelUnions( aUnions, pStart, pEnd );
@@ -1893,7 +1895,7 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor )
while ( pRow )
{
- if ( pRow->getSwFrame().IsOver( rUnion.GetUnion() ) )
+ if ( pRow->geFrameArea().IsOver( rUnion.GetUnion() ) )
{
const SwLayoutFrame *pCell = pRow->FirstCell();
@@ -1995,7 +1997,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
// #i12836# enhanced pdf
SwRegionRects aRegion( !bIgnoreVisArea ?
pSh->VisArea() :
- getSwFrame() );
+ geFrameArea() );
if( !pStartPos->nNode.GetNode().IsContentNode() ||
!pStartPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) ||
( pStartPos->nNode != pEndPos->nNode &&
@@ -2387,8 +2389,8 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
}
else
{
- lLeft = aRectFnSet.GetLeft(pStartFrame->getSwFrame()) +
- aRectFnSet.GetLeft(pStartFrame->getSwPrint());
+ lLeft = aRectFnSet.GetLeft(pStartFrame->geFrameArea()) +
+ aRectFnSet.GetLeft(pStartFrame->getFramePrintArea());
lRight = aRectFnSet.GetRight(aEndFrame);
}
if( lLeft < aRectFnSet.GetLeft(aStFrame) )
@@ -2556,7 +2558,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
}
}
if( inSelection )
- Add( aRegion, pFly->getSwFrame() );
+ Add( aRegion, pFly->geFrameArea() );
else if ( !pFly->IsAnLower( pStartFrame ) &&
(rSur.GetSurround() != css::text::WrapTextMode_THROUGH &&
!rSur.IsContour()) )
@@ -2584,7 +2586,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
} while ( bSub && pTmp );
}
if ( bSub )
- Sub( aRegion, pFly->getSwFrame() );
+ Sub( aRegion, pFly->geFrameArea() );
}
}
}
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index a280697f3257..ce08a8107302 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -53,30 +53,57 @@
using namespace ::com::sun::star;
-SwFrameRect::SwFrameRect()
-: maFrameRect(),
- maPrintRect()
+SwFrameAreaDefinition::SwFrameAreaDefinition()
+: maFrameArea(),
+ maFramePrintArea(),
+ mbFrameAreaPositionValid(false),
+ mbFrameAreaSizeValid(false),
+ mbFramePrintAreaValid(false)
{
}
-SwFrameRect::FrameWriteAccess::~FrameWriteAccess()
+void SwFrameAreaDefinition::setFrameAreaPositionValid(bool bNew)
{
- if(mrTarget.maFrameRect != *this)
+ if(mbFrameAreaPositionValid != bNew)
{
- mrTarget.maFrameRect = *this;
+ mbFrameAreaPositionValid = bNew;
}
}
-SwFrameRect::PrintWriteAccess::~PrintWriteAccess()
+void SwFrameAreaDefinition::setFrameAreaSizeValid(bool bNew)
{
- if(mrTarget.maPrintRect != *this)
+ if(mbFrameAreaSizeValid != bNew)
{
- mrTarget.maPrintRect = *this;
+ mbFrameAreaSizeValid = bNew;
+ }
+}
+
+void SwFrameAreaDefinition::setFramePrintAreaValid(bool bNew)
+{
+ if(static_cast< bool >(mbFramePrintAreaValid) != bNew)
+ {
+ mbFramePrintAreaValid = bNew;
+ }
+}
+
+SwFrameAreaDefinition::FrameAreaWriteAccess::~FrameAreaWriteAccess()
+{
+ if(mrTarget.maFrameArea != *this)
+ {
+ mrTarget.maFrameArea = *this;
+ }
+}
+
+SwFrameAreaDefinition::FramePrintAreaWriteAccess::~FramePrintAreaWriteAccess()
+{
+ if(mrTarget.maFramePrintArea != *this)
+ {
+ mrTarget.maFramePrintArea = *this;
}
}
SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib )
-: SwFrameRect(),
+: SwFrameAreaDefinition(),
SwClient( pMod ),
SfxBroadcaster(),
mnFrameId( SwFrame::mnLastFrameId++ ),
@@ -95,9 +122,6 @@ SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib )
mbDerivedVert(false),
mbVertical(false),
mbVertLR(false),
- mbValidPos(false),
- mbValidPrtArea(false),
- mbValidSize(false),
mbValidLineNum(false),
mbFixSize(false),
mbCompletePaint(true),
@@ -479,7 +503,7 @@ void SwFrame::InvalidatePage( const SwPageFrame *pPage ) const
Size SwFrame::ChgSize( const Size& aNewSize )
{
mbFixSize = true;
- const Size aOldSize( getSwFrame().SSize() );
+ const Size aOldSize( geFrameArea().SSize() );
if ( aNewSize == aOldSize )
return aOldSize;
@@ -490,12 +514,12 @@ Size SwFrame::ChgSize( const Size& aNewSize )
SwRect aNew( Point(0,0), aNewSize );
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
(aFrm.*fnRect->fnSetWidth)( (aNew.*fnRect->fnGetWidth)() );
}
long nNew = (aNew.*fnRect->fnGetHeight)();
- long nDiff = nNew - (getSwFrame().*fnRect->fnGetHeight)();
+ long nDiff = nNew - (geFrameArea().*fnRect->fnGetHeight)();
if( nDiff )
{
@@ -504,7 +528,7 @@ Size SwFrame::ChgSize( const Size& aNewSize )
static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment() )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
(aFrm.*fnRect->fnSetHeight)( nNew );
}
@@ -512,7 +536,7 @@ Size SwFrame::ChgSize( const Size& aNewSize )
if ( nReal != nDiff )
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
(aFrm.*fnRect->fnSetHeight)( nNew - nDiff + nReal );
}
}
@@ -527,7 +551,7 @@ Size SwFrame::ChgSize( const Size& aNewSize )
else
Shrink( -nDiff );
- if ( GetUpper() && (getSwFrame().*fnRect->fnGetHeight)() != nNew )
+ if ( GetUpper() && (geFrameArea().*fnRect->fnGetHeight)() != nNew )
{
GetUpper()->InvalidateSize_();
}
@@ -536,18 +560,18 @@ Size SwFrame::ChgSize( const Size& aNewSize )
// 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.
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
(aFrm.*fnRect->fnSetHeight)( nNew );
}
}
}
else
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.SSize( aNewSize );
}
- if ( getSwFrame().SSize() != aOldSize )
+ if ( geFrameArea().SSize() != aOldSize )
{
SwPageFrame *pPage = FindPageFrame();
if ( GetNext() )
@@ -567,7 +591,7 @@ Size SwFrame::ChgSize( const Size& aNewSize )
InvalidatePage( pPage );
}
- return getSwFrame().SSize();
+ return geFrameArea().SSize();
}
/** Insert SwFrame into existing structure.
@@ -807,10 +831,10 @@ void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
pNxt->Prepare( PREP_FTN, nullptr, false );
}
- if ( getSwFrame().Height() )
- pParent->Grow( getSwFrame().Height() );
+ if ( geFrameArea().Height() )
+ pParent->Grow( geFrameArea().Height() );
- if ( getSwFrame().Width() != pParent->getSwPrint().Width() )
+ if ( geFrameArea().Width() != pParent->getFramePrintArea().Width() )
Prepare( PREP_FIXSIZE_CHG );
if ( GetPrev() )
@@ -820,8 +844,8 @@ void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
static_cast<SwContentFrame*>(GetPrev())->Prepare( PREP_FOLLOW_FOLLOWS );
else
{
- if ( GetPrev()->getSwFrame().Height() !=
- GetPrev()->getSwPrint().Height() + GetPrev()->getSwPrint().Top() )
+ if ( GetPrev()->geFrameArea().Height() !=
+ GetPrev()->getFramePrintArea().Height() + GetPrev()->getFramePrintArea().Top() )
{
// Take the border into account?
GetPrev()->InvalidatePrt_();
@@ -1044,7 +1068,7 @@ void SwContentFrame::Cut()
else
{
SwRectFnSet aRectFnSet(this);
- long nFrameHeight = aRectFnSet.GetHeight(getSwFrame());
+ long nFrameHeight = aRectFnSet.GetHeight(geFrameArea());
if( nFrameHeight )
pUp->Shrink( nFrameHeight );
}
@@ -1097,7 +1121,7 @@ void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
else
fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- if( (getSwFrame().*fnRect->fnGetWidth)() != (pParent->getSwPrint().*fnRect->fnGetWidth)())
+ if( (geFrameArea().*fnRect->fnGetWidth)() != (pParent->getFramePrintArea().*fnRect->fnGetWidth)())
InvalidateSize_();
InvalidatePos_();
const SwPageFrame *pPage = FindPageFrame();
@@ -1125,14 +1149,14 @@ void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
}
}
- if( (getSwFrame().*fnRect->fnGetHeight)() )
+ if( (geFrameArea().*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 = (getSwFrame().*fnRect->fnGetHeight)();
+ SwTwips nGrow = (geFrameArea().*fnRect->fnGetHeight)();
if( SwNeighbourAdjust::OnlyAdjust == nAdjust )
AdjustNeighbourhood( nGrow );
else
@@ -1154,7 +1178,7 @@ void SwLayoutFrame::Cut()
GetNext()->InvalidatePos_();
SwRectFnSet aRectFnSet(this);
- SwTwips nShrink = aRectFnSet.GetHeight(getSwFrame());
+ SwTwips nShrink = aRectFnSet.GetHeight(geFrameArea());
// Remove first, then shrink upper.
SwLayoutFrame *pUp = GetUpper();
@@ -1179,19 +1203,19 @@ void SwLayoutFrame::Cut()
nReal = -AdjustNeighbourhood( -nShrink );
if( nReal < nShrink )
{
- const SwTwips nOldHeight = aRectFnSet.GetHeight(getSwFrame());
+ const SwTwips nOldHeight = aRectFnSet.GetHeight(geFrameArea());
// seems as if this needs to be forwarded to the SwFrame already here,
// changing to zero seems temporary anyways
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetHeight( aFrm, 0 );
}
nReal += pUp->Shrink( nShrink - nReal );
{
- SwFrameRect::FrameWriteAccess aFrm(*this);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aRectFnSet.SetHeight( aFrm, nOldHeight );
}
}
@@ -1227,7 +1251,7 @@ SwTwips SwFrame::Grow( SwTwips nDist, bool bTst, bool bInfo )
{
SwRectFnSet aRectFnSet(this);
- SwTwips nPrtHeight = aRectFnSet.GetHeight(getSwPrint());
+ SwTwips nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea());
if( nPrtHeight > 0 && nDist > (LONG_MAX - nPrtHeight) )
nDist = LONG_MAX - nPrtHeight;
@@ -1251,9 +1275,9 @@ SwTwips SwFrame::Grow( SwTwips nDist, bool bTst, bool bInfo )
const SwTwips nReal = GrowFrame( nDist, bTst, bInfo );
if( !bTst )
{
- nPrtHeight = aRectFnSet.GetHeight(getSwPrint());
+ nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea());
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, nPrtHeight + ( IsContentFrame() ? nDist : nReal ) );
}
return nReal;
@@ -1288,13 +1312,13 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo )
}
SwRectFnSet aRectFnSet(this);
- SwTwips nReal = aRectFnSet.GetHeight(getSwFrame());
+ SwTwips nReal = aRectFnSet.GetHeight(geFrameArea());
ShrinkFrame( nDist, bTst, bInfo );
- nReal -= aRectFnSet.GetHeight(getSwFrame());
+ nReal -= aRectFnSet.GetHeight(geFrameArea());
if( !bTst )
{
- const SwTwips nPrtHeight = aRectFnSet.GetHeight(getSwPrint());
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ const SwTwips nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea());
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aRectFnSet.SetHeight( aPrt, nPrtHeight - ( IsContentFrame() ? nDist : nReal ) );
}
return nReal;
@@ -1347,9 +1371,9 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
SwViewShell *pViewShell = getRootFrame()->GetCurrShell();
SwLayoutFrame *pUp = GetUpper();
long nChg;
- const long nUpPrtBottom = pUp->getSwFrame().Height() -
- pUp->getSwPrint().Height() - pUp->getSwPrint().Top();
- SwRect aInva( pUp->getSwFrame() );
+ const long nUpPrtBottom = pUp->geFrameArea().Height() -
+ pUp->getFramePrintArea().Height() - pUp->getFramePrintArea().Top();
+ SwRect aInva( pUp->geFrameArea() );
if ( pViewShell )
{
aInva.Pos().X() = pViewShell->VisArea().Left();
@@ -1357,21 +1381,21 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
}
if ( nDiff > 0 )
{
- nChg = BROWSE_HEIGHT - pUp->getSwFrame().Height();
+ nChg = BROWSE_HEIGHT - pUp->geFrameArea().Height();
nChg = std::min( nDiff, nChg );
if ( !IsBodyFrame() )
{
SetCompletePaint();
- if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->getSwFrame().Height() )
+ if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->geFrameArea().Height() )
{
//First minimize Body, it will grow again later.
SwFrame *pBody = static_cast<SwFootnoteBossFrame*>(pUp)->FindBodyCont();
- const long nTmp = nChg - pBody->getSwPrint().Height();
+ const long nTmp = nChg - pBody->getFramePrintArea().Height();
if ( !bTst )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*pBody);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pBody);
aFrm.Height(std::max( 0L, aFrm.Height() - nChg ));
}
@@ -1397,10 +1421,10 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
nChg = nDiff;
long nInvaAdd = 0;
if ( pViewShell && !pUp->GetPrev() &&
- pUp->getSwFrame().Height() + nDiff < pViewShell->VisArea().Height() )
+ pUp->geFrameArea().Height() + nDiff < pViewShell->VisArea().Height() )
{
// This means that we have to invalidate adequately.
- nChg = pViewShell->VisArea().Height() - pUp->getSwFrame().Height();
+ nChg = pViewShell->VisArea().Height() - pUp->geFrameArea().Height();
nInvaAdd = -(nDiff - nChg);
}
@@ -1428,12 +1452,12 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if ( !bTst && nChg )
{
{
- SwFrameRect::FrameWriteAccess aFrm(*pUp);
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pUp);
aFrm.SSize().Height() += nChg;
}
{
- SwFrameRect::PrintWriteAccess aPrt(*pUp);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pUp);
aPrt.SSize().Height() += nChg;
}
@@ -1447,7 +1471,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->getSwFrame() );
+ pViewShell->InvalidateWindows( pUp->geFrameArea() );
if ( pUp->GetUpper() )
{
@@ -1458,13 +1482,13 @@ 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 = getSwFrame().Height();
- const long nOldPrtHeight = getSwPrint().Height();
+ const long nOldFrameHeight = geFrameArea().Height();
+ const long nOldPrtHeight = getFramePrintArea().Height();
const bool bOldComplete = IsCompletePaint();
if ( IsBodyFrame() )
{
- SwFrameRect::PrintWriteAccess aPrt(*this);
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.SSize().Height() = nOldFrameHeight;
}
@@ -1473,10 +1497,10 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
static_cast<SwRootFrame*>(pUp->GetUpper())->CheckViewLayout( nullptr, nullptr );
}
- SwFrameRect::FrameWriteAccess aFrm