summaryrefslogtreecommitdiffstats
path: root/sw/source/core/layout/flyincnt.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 09:32:22 +0100
commitd64ea2264b5a13bfca8499e08f352af6740e71ff (patch)
tree10ac991e84ff6bb104f0f576a330c168ca0f8bad /sw/source/core/layout/flyincnt.cxx
parentcppcheck: unusedVariable (diff)
downloadcore-feature/RotateFlyFrame.tar.gz
core-feature/RotateFlyFrame.zip
RotateFlyFrame: Isolate SwFrame members maFrame and maPrt feature/RotateFlyFrame
To gain more control over changes of the Writer layout, isolated mentioned members and replaced all calls with inline methods for read access. Moved to own class to also identify 'private' accesses reliably. Added access dedicated classes for write access, the only allowed way to do changes. Adapted all usages and made test builds on logerrit and locally Change-Id: Ib0b7f852f5176744e860e2aad12dd13c9a906d68 RotateFlyFrame: Migrated from SwFrame::FrameWA to setFrame Change-Id: I01f7b828fe2134411cc76639e880da46b415d767 RotateFlyFrame: Migrated from SwFrame::PrintWA to setPrint Change-Id: Ieea3b467f296a190de5b5f47721bef148bebf60b RotateFlyFrame: Adapted to get/setSwFrame and get/setSwPrint Change-Id: I6cce40ec49dd5bd32d94fe06b9d2dabd368448be RotateFlyFrame: Adapted to get methods and WriteAccess helpers Change-Id: Ife3c1b2391ad7beae8c7f31f796b1454709ddd26 RotateFlyFrame: Moved change executers to cxx Moved SwFrameRect::FrameWriteAccess::~FrameWriteAccess() and SwFrameRect::PrintWriteAccess::~PrintWriteAccess() to implementation side and added compare op's for SwRcet to write only if needed Change-Id: I85d0e61009116f4b17d1ce0337e3f0d2cc031159 RotateFlyFrame: Moved change executers to cxx Moved SwFrameRect::FrameWriteAccess::~FrameWriteAccess() and SwFrameRect::PrintWriteAccess::~PrintWriteAccess() to implementation side and added compare op's for SwRcet to write only if needed Change-Id: I85d0e61009116f4b17d1ce0337e3f0d2cc031159
Diffstat (limited to 'sw/source/core/layout/flyincnt.cxx')
-rw-r--r--sw/source/core/layout/flyincnt.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 9d62960e6fd5..6544bad582ab 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -73,7 +73,12 @@ void SwFlyInContentFrame::SetRefPoint( const Point& rPoint,
aRef = rPoint;
SetCurrRelPos( rRelAttr );
SwRectFnSet aRectFnSet(GetAnchorFrame());
- aRectFnSet.SetPos( Frame(), rPoint + rRelPos );
+
+ {
+ SwFrameRect::FrameWriteAccess aFrm(*this);
+ aRectFnSet.SetPos( aFrm, rPoint + rRelPos );
+ }
+
// #i68520#
InvalidateObjRectWithSpaces();
if( pNotify )
@@ -130,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 ( !Frame().Height() )
+ if ( !getSwFrame().Height() )
{
Lock(); //don't format the anchor on the crook.
SwContentFrame *pContent = ContainsContent();
@@ -255,10 +260,11 @@ void SwFlyInContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
GetFormat()->getIDocumentSettingAccess().get( DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME ) )
{
SwFrame* pFrame = AnchorFrame();
- if ( Frame().Left() == (pFrame->Frame().Left()+pFrame->Prt().Left()) &&
- Frame().Width() > pFrame->Prt().Width() )
+ if ( getSwFrame().Left() == (pFrame->getSwFrame().Left()+pFrame->getSwPrint().Left()) &&
+ getSwFrame().Width() > pFrame->getSwPrint().Width() )
{
- Frame().Width( pFrame->Prt().Width() );
+ SwFrameRect::FrameWriteAccess aFrm(*this);
+ aFrm.Width( pFrame->getSwPrint().Width() );
mbValidPrtArea = false;
m_bWidthClipped = true;
}