summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de (CIB)>2018-02-23 16:57:41 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de (CIB)>2018-03-21 13:26:23 +0100
commit67ba3505a86f06bcfdc9949bb5342344ed1e0aac (patch)
tree30afb032968c7fc8f49b85e47132948ecdceee64 /include
parentf95ae08de255f8aa5ba0a69c1fca4b640d4da475 (diff)
OperationSmiley: Added support for using same FillGeometry
It is now possible to use a single FillGeometry to fill objects that are made of multiple filled objects (e.g. CustomShapes) so that they look as using a single fill. This is used for CustomShapes, but may later be 'extended' to be used for more cases. The basic functionality was already in the primitives, but had to be added to SDrObject due to these being used for CustomShapeVisualization (currently - would be better to change this to primitives, too). Change-Id: I1d9fb158191a9ec663e46f3911213be2f3d88986
Diffstat (limited to 'include')
-rw-r--r--include/svx/svdobj.hxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index efc3bb220c66..3899295bbfd5 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -261,6 +261,27 @@ class SvxShape;
class SVX_DLLPUBLIC SdrObject: public SfxListener, public tools::WeakBase< SdrObject >
{
private:
+ // OperationSmiley: Allow at each SdrObject to set a FillGeometryDefiningShape,
+ // so that for SdrObjects where this is set, the definition of a defined FillStyle
+ // will use this, but the local geometry will be filled. This allows to fill
+ // multiple shapes with a unified fill, e.g think about CustomShapes.
+ // Currently this is *only* used for CustomShapes, but may be developed to get a
+ // common mechanism - usages for it are easy to be found. The current limitation
+ // to CustomShapes allows to to think about these SdrObjects to 'vanish' during the
+ // lifetime of 'this' - the SdrObjects without SdrPage and SdrModel are used as helper
+ // objects for SdrObjCustomShape and thus their lifetime is limited to the lifetime
+ // of this local object. For unifying this mechanism, some weak reference of
+ // SdrObjects would have to be thought about (not easy with the current implementation).
+ // So - allow *only* EnhancedCustomShape2d (which creates the visualizations for
+ // SdrObjCustomShape) to set this. Already allow unified read to use it - thus already
+ // allowing to implement as standard case for all kinds of SdrObjects.
+ friend class EnhancedCustomShape2d;
+ const SdrObject* mpFillGeometryDefiningShape;
+ void setFillGeometryDefiningShape(const SdrObject* pNew) { mpFillGeometryDefiningShape = pNew; }
+public:
+ const SdrObject* getFillGeometryDefiningShape() const { return mpFillGeometryDefiningShape; }
+
+private:
struct Impl;
Impl* mpImpl;