summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/laycache.cxx
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 10:41:43 +0100
commitf55a9b77b8bfe6fc5e0fbceb0c89aed66660e107 (patch)
tree4ab09c0b426c702fccbded3eb58848d2e0622015 /sw/source/core/layout/laycache.cxx
parent420452e56c2f18b85e6a59dbba80c06d96e28abd (diff)
RotateFlyFrame2: Unified FrameAreaDefinition
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
Diffstat (limited to 'sw/source/core/layout/laycache.cxx')
-rw-r--r--sw/source/core/layout/laycache.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 32e2643deb3b..8c973912e99f 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->getFrameArea().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->getFrameArea();
+ sal_Int32 nX = rRct.Left() - pPage->getFrameArea().Left();
+ sal_Int32 nY = rRct.Top() - pPage->getFrameArea().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->getFrameArea().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->getFrameArea().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->getFrameArea().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->getFrameArea().Left();
+ aFrm.Pos().Y() = pFlyCache->Top() + pPage->getFrameArea().Top();
if ( mpImpl->IsUseFlyCache() )
{