diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-11-14 18:07:32 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-11-18 13:07:46 +0100 |
commit | 1059e234f4b3b3f6b770b2e4d973923e54e7045b (patch) | |
tree | fa1da45be1f2e4c3880a747ddde3f35c1e2da687 /sw/source/core/layout/flylay.cxx | |
parent | 7d391f9a563041aae416c7017dcec36bbf4dfb2c (diff) |
RotateFlyFrame3: Made interactions work properly
Have now created working interactive Rotation, Scale, Move
and Crop. Using as much of the old code as possible since
it does corrections based on BorderWidth/s stuff and similar.
To do so, need to back-transform and execute in unrotated/
untransformed state as much as possible. Had some problems
with SwVirtFlyDrawObj::NbcMove usages and hacks there, had
to restructure some of these.
Change-Id: Ibedf6d834f96b2f8e9c1ace2a0c984aa26cedc74
Diffstat (limited to 'sw/source/core/layout/flylay.cxx')
-rw-r--r-- | sw/source/core/layout/flylay.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 10c519fea697..8a8c714ef351 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -156,7 +156,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) const int nLoopControlMax = 10; // RotateFlyFrame3 - outer frame - const double fRotation(getFrameRotation()); + const double fRotation(getLocalFrameRotation()); const bool bRotated(!basegfx::fTools::equalZero(fRotation)); if(bRotated) @@ -166,7 +166,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) // needed. Reset to BoundAreas will be done below automatically if(isTransformableSwFrame()) { - getTransformableSwFrame()->resetAreaDefinitionsToUntransformed(); + getTransformableSwFrame()->restoreFrameAreas(); } } @@ -264,7 +264,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) getTransformableSwFrame()->createFrameAreaTransformations( fRotation, aB2DCenter); - getTransformableSwFrame()->resetAreaDefinitionsToTransformed(); + getTransformableSwFrame()->adaptFrameAreasToTransformations(); } else { @@ -323,17 +323,17 @@ void SwFlyFreeFrame::transform_translate(const Point& rOffset) rOffset.X(), rOffset.Y())); // transform using TransformableSwFrame - getTransformableSwFrame()->doTransform(aTransform); + getTransformableSwFrame()->transform(aTransform); } } // RotateFlyFrame3 - outer frame -double getFrameRotation_from_SwNoTextFrame(const SwNoTextFrame& rNoTextFrame) +double getLocalFrameRotation_from_SwNoTextFrame(const SwNoTextFrame& rNoTextFrame) { - return rNoTextFrame.getFrameRotation(); + return rNoTextFrame.getLocalFrameRotation(); } -double SwFlyFreeFrame::getFrameRotation() const +double SwFlyFreeFrame::getLocalFrameRotation() const { // SwLayoutFrame::Lower() != SwFrame::GetLower(), but SwFrame::GetLower() // calls SwLayoutFrame::Lower() when it's a SwLayoutFrame - so use GetLower() @@ -341,7 +341,7 @@ double SwFlyFreeFrame::getFrameRotation() const if(nullptr != pSwNoTextFrame) { - return getFrameRotation_from_SwNoTextFrame(*pSwNoTextFrame); + return getLocalFrameRotation_from_SwNoTextFrame(*pSwNoTextFrame); } // no rotation |