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-17 23:15:49 +0100
commitd1027af3c74529827d53e8cf7b0d42a0ee47d1ba (patch)
tree488efdfb60e5e9bd01af54679872a8b91b0e14c4 /include
parent9886a69c472f212d88f11cfa0f3835e5dcf485b2 (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 3e97a472084f..7bd547f20d71 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -270,11 +270,32 @@ public:
class SvxShape;
class SVX_DLLPUBLIC SdrObject: public SfxListener, public virtual tools::WeakBase
{
+private:
friend class SdrObjListIter;
friend class SdrVirtObj;
friend class SdrRectObj;
friend class SdrDelayBroadcastObjectChange;
+ // 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; }
+
public:
SdrObject();