summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/laycache.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-25 13:46:44 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-30 12:13:13 +0100
commit94cf44656492e408ef6c7f6e18deffe519f22018 (patch)
treead2b58c382245cc3d45b6a85a209f0d339143f38 /sw/source/core/layout/laycache.cxx
parent6f45913394a931f2053c7b1cba52bdfd79a3093b (diff)
Isolated SwFrame members maFrane and maPrt
To gain more control over changes of the Writer layout, isolated mentioned members and replaced all calls with inline methods for read and/or write access. Moved to own class to also identify 'private' accesses reliably. Change-Id: Ib0b7f852f5176744e860e2aad12dd13c9a906d68
Diffstat (limited to 'sw/source/core/layout/laycache.cxx')
-rw-r--r--sw/source/core/layout/laycache.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index fb3b14b403b7..e6e44a7ce007 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -281,7 +281,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
{
if (SwFlyFrame *pFly = dynamic_cast<SwFlyFrame*>(pAnchoredObj))
{
- if( pFly->Frame().Left() != FAR_AWAY &&
+ if( pFly->FrameRA().Left() != FAR_AWAY &&
!pFly->GetAnchorFrame()->FindFooterOrHeader() )
{
const SwContact *pC =
@@ -294,9 +294,9 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
aIo.OpenRec( SW_LAYCACHE_IO_REC_FLY );
aIo.OpenFlagRec( 0, 0 );
aIo.CloseFlagRec();
- SwRect &rRct = pFly->Frame();
- sal_Int32 nX = rRct.Left() - pPage->Frame().Left();
- sal_Int32 nY = rRct.Top() - pPage->Frame().Top();
+ const SwRect& rRct = pFly->FrameRA();
+ sal_Int32 nX = rRct.Left() - pPage->FrameRA().Left();
+ sal_Int32 nY = rRct.Top() - pPage->FrameRA().Top();
aIo.GetStream().WriteUInt16( nPageNum ).WriteUInt32( nOrdNum )
.WriteInt32( nX ).WriteInt32( nY )
.WriteInt32( rRct.Width() )
@@ -805,8 +805,8 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
if( bSplit )
{
mrpFrame->InsertBehind( mrpLay, mrpPrv );
- mrpFrame->Frame().Pos() = mrpLay->Frame().Pos();
- mrpFrame->Frame().Pos().Y() += 1;
+ mrpFrame->FrameWA().Pos() = mrpLay->FrameRA().Pos();
+ mrpFrame->FrameWA().Pos().Y() += 1;
mrpPrv = mrpFrame;
if( mrpFrame->IsTabFrame() )
{
@@ -876,7 +876,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
CheckFlyCache_( pLastPage );
if( mrpPrv && mrpPrv->IsTextFrame() && !mrpPrv->GetValidSizeFlag() )
- mrpPrv->Frame().Height( mrpPrv->GetUpper()->Prt().Height() );
+ mrpPrv->FrameWA().Height( mrpPrv->GetUpper()->PrintRA().Height() );
bRet = true;
mrpPrv = nullptr;
@@ -904,8 +904,8 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
pSct->InsertBehind( mrpLay, nullptr );
if( bInit )
pSct->Init();
- pSct->Frame().Pos() = mrpLay->Frame().Pos();
- pSct->Frame().Pos().Y() += 1; //because of the notifications
+ pSct->FrameWA().Pos() = mrpLay->FrameRA().Pos();
+ pSct->FrameWA().Pos().Y() += 1; //because of the notifications
mrpLay = pSct;
if ( mrpLay->Lower() && mrpLay->Lower()->IsLayoutFrame() )
@@ -1001,17 +1001,17 @@ void SwLayHelper::CheckFlyCache_( SwPageFrame* pPage )
const SwFlyCache* pFlyCache = *aFlyCacheSetIt;
SwFlyFrame* pFly = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(*aFlySetIt))->GetFlyFrame();
- if ( pFly->Frame().Left() == FAR_AWAY )
+ if ( pFly->FrameRA().Left() == FAR_AWAY )
{
// we get the stored information
- pFly->Frame().Pos().X() = pFlyCache->Left() +
- pPage->Frame().Left();
- pFly->Frame().Pos().Y() = pFlyCache->Top() +
- pPage->Frame().Top();
+ pFly->FrameWA().Pos().X() = pFlyCache->Left() +
+ pPage->FrameRA().Left();
+ pFly->FrameWA().Pos().Y() = pFlyCache->Top() +
+ pPage->FrameRA().Top();
if ( mpImpl->IsUseFlyCache() )
{
- pFly->Frame().Width( pFlyCache->Width() );
- pFly->Frame().Height( pFlyCache->Height() );
+ pFly->FrameWA().Width( pFlyCache->Width() );
+ pFly->FrameWA().Height( pFlyCache->Height() );
}
}