Kaydet (Commit) 4eec79bb authored tarafından Armin Le Grand's avatar Armin Le Grand

RotateFlyFrame: Isolate SwFrame members maFrame and maPrt

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
üst 3444a308
......@@ -148,8 +148,8 @@ public:
public:
FrameWriteAccess(SwFrameRect& rTarget) : SwRect(rTarget.getSwFrame()), mrTarget(rTarget) {}
~FrameWriteAccess() { mrTarget.maFrameRect = *this; }
void setSwRect(const SwRect& rNew) { *(reinterpret_cast< SwRect* >(this)) = rNew; }
~FrameWriteAccess();
void setSwRect(const SwRect& rNew) { *reinterpret_cast< SwRect* >(this) = rNew; }
};
// same for print
......@@ -163,8 +163,8 @@ public:
public:
PrintWriteAccess(SwFrameRect& rTarget) : SwRect(rTarget.getSwPrint()), mrTarget(rTarget) {}
~PrintWriteAccess() { mrTarget.maPrintRect = *this; }
void setSwRect(const SwRect& rNew) { *(reinterpret_cast< SwRect* >(this)) = rNew; }
~PrintWriteAccess();
void setSwRect(const SwRect& rNew) { *reinterpret_cast< SwRect* >(this) = rNew; }
};
};
......
......@@ -59,6 +59,22 @@ SwFrameRect::SwFrameRect()
{
}
SwFrameRect::FrameWriteAccess::~FrameWriteAccess()
{
if(mrTarget.maFrameRect != *this)
{
mrTarget.maFrameRect = *this;
}
}
SwFrameRect::PrintWriteAccess::~PrintWriteAccess()
{
if(mrTarget.maPrintRect != *this)
{
mrTarget.maPrintRect = *this;
}
}
SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib )
: SwFrameRect(),
SwClient( pMod ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment