summaryrefslogtreecommitdiff
path: root/sw/source/core/inc
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-11-02 18:28:04 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-11-18 13:07:43 +0100
commit6675e6eaf999de94d49d7644d5877537fda83239 (patch)
tree588b33264a822271d2840d7d9c39dc31212f642e /sw/source/core/inc
parent995c75de956436606e4f313d60257285955586d8 (diff)
RotateFlyFrame3: Initial support added
First steps to get a rotated FlyFrame and content that only uses layouted sizes/positions and does not change the model data (except rotation). This works with persistence, after reload the rotation can be resetted with going back to the original FrameSize. Lot of stuff not yet working, experimental state. Change-Id: Ie29d501fe2e618a1cb4457d600ce97575ed372d0
Diffstat (limited to 'sw/source/core/inc')
-rw-r--r--sw/source/core/inc/flyfrms.hxx3
-rw-r--r--sw/source/core/inc/frame.hxx14
-rw-r--r--sw/source/core/inc/notxtfrm.hxx3
3 files changed, 20 insertions, 0 deletions
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 719eb01f07bd..91b4188fb48a 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -116,6 +116,9 @@ public:
and its anchor frame isn't inside another Writer fly frame.
*/
virtual bool IsFormatPossible() const override;
+
+ // RotateFlyFrame3 - Support for outer Frame of a SwGrfNode
+ virtual double getRotation() const override;
};
// Flys that are bound to LayoutFrames and not to Content
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index b69b942ad40e..dbef917b206e 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -196,6 +196,15 @@ public:
};
};
+// RotateFlyFrame3 - Helper method that rotates a FrameAreaDefinition content
+// around a given point. It takes care for FramePrintArea being relative to
+// FrameArea and creates the rotated BoundRects
+void rotateFrameAreaDefinitionAroundPoint(
+ SwRect& rFrameArea,
+ SwRect& rFramePrintArea,
+ const Point& rCenter,
+ double fRotation);
+
/**
* Base class of the Writer layout elements.
*
@@ -820,6 +829,11 @@ public:
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
void dumpChildrenAsXml(xmlTextWriterPtr writer) const;
bool IsCollapse() const;
+
+ // RotateFlyFrame3 - Support for handing out a rotation, currently
+ // only used for SwGrfNode in inner SwFrame of a SwFlyFrame, but may
+ // be used in the future. Default returns 0.0 (no rotation)
+ virtual double getRotation() const;
};
inline bool SwFrame::IsInDocBody() const
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 802c737eeb21..a1936193af44 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -57,6 +57,9 @@ public:
void StopAnimation( OutputDevice* = nullptr ) const;
bool HasAnimation() const;
+
+ // RotateFlyFrame3 - Support for inner frame of a SwGrfNode
+ virtual double getRotation() const override;
};
#endif