summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/laycache.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-26 14:55:41 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-10-30 12:13:17 +0100
commit3444a3086c8fe8966953434a7fbe76802df8a149 (patch)
treed57600acfdd778f1487f3079094b25d2998ecb37 /sw/source/core/layout/laycache.cxx
parent75d4e779e408bd532ddeda2b18923806c920b4a7 (diff)
Adapted to get methods and WriteAccess helpers
Change-Id: Ife3c1b2391ad7beae8c7f31f796b1454709ddd26
Diffstat (limited to 'sw/source/core/layout/laycache.cxx')
-rw-r--r--sw/source/core/layout/laycache.cxx25
1 files changed, 12 insertions, 13 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 60ce7c3576b9..32e2643deb3b 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -806,10 +806,11 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
mrpFrame->InsertBehind( mrpLay, mrpPrv );
- SwRect aFrm(mrpFrame->getSwFrame());
- aFrm.Pos() = mrpLay->getSwFrame().Pos();
- aFrm.Pos().Y() += 1;
- mrpFrame->setSwFrame(aFrm);
+ {
+ SwFrameRect::FrameWriteAccess aFrm(*mrpFrame);
+ aFrm.Pos() = mrpLay->getSwFrame().Pos();
+ aFrm.Pos().Y() += 1;
+ }
mrpPrv = mrpFrame;
if( mrpFrame->IsTabFrame() )
@@ -881,9 +882,8 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
CheckFlyCache_( pLastPage );
if( mrpPrv && mrpPrv->IsTextFrame() && !mrpPrv->GetValidSizeFlag() )
{
- SwRect aFrm(mrpPrv->getSwFrame());
+ SwFrameRect::FrameWriteAccess aFrm(*mrpPrv);
aFrm.Height( mrpPrv->GetUpper()->getSwPrint().Height() );
- mrpPrv->setSwFrame(aFrm);
}
bRet = true;
@@ -916,10 +916,11 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
pSct->Init();
}
- SwRect aFrm(pSct->getSwFrame());
- aFrm.Pos() = mrpLay->getSwFrame().Pos();
- aFrm.Pos().Y() += 1; //because of the notifications
- pSct->setSwFrame(aFrm);
+ {
+ SwFrameRect::FrameWriteAccess aFrm(*pSct);
+ aFrm.Pos() = mrpLay->getSwFrame().Pos();
+ aFrm.Pos().Y() += 1; //because of the notifications
+ }
mrpLay = pSct;
if ( mrpLay->Lower() && mrpLay->Lower()->IsLayoutFrame() )
@@ -1018,7 +1019,7 @@ void SwLayHelper::CheckFlyCache_( SwPageFrame* pPage )
if ( pFly->getSwFrame().Left() == FAR_AWAY )
{
// we get the stored information
- SwRect aFrm(pFly->getSwFrame());
+ SwFrameRect::FrameWriteAccess aFrm(*pFly);
aFrm.Pos().X() = pFlyCache->Left() + pPage->getSwFrame().Left();
aFrm.Pos().Y() = pFlyCache->Top() + pPage->getSwFrame().Top();
@@ -1027,8 +1028,6 @@ void SwLayHelper::CheckFlyCache_( SwPageFrame* pPage )
aFrm.Width( pFlyCache->Width() );
aFrm.Height( pFlyCache->Height() );
}
-
- pFly->setSwFrame(aFrm);
}
++aFlyCacheSetIt;