summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <Armin.Le.Grand@me.com>2022-02-18 16:07:28 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-02-22 18:09:24 +0100
commiteaaf5ef8f99404797ffbb44ceeebf8795d85f07e (patch)
tree12bce3931b78d2f009252a81cc219e342fcdd8e7 /include/svx
parent8187737a7844fe4669f80bf0e8ef0950148dc58f (diff)
Advanced Diagram support: first additions/reorganizations
To allow advanced Diagram/SmartArt support in the future this is a first step to organize imported SmartArt Data in a way that will allow to re-layout loaded SmartArts, under re-usage of the oox::Theme (held available). It is designed to work without holding available the original XML snippets defining the imported Diagram in any way, also for performance reasons. It tries to re-use some of the already basically added functionality, including the systematic layouting using the generic layout algorithm, plus some already available text extraction. Before being sure that the former state can be completely replaced this is optoinal and used when SAL_ENABLE_ADVANCED_SMART_ART is defined. Some new stuff is already done but e.g. the redefined reLayout method will not (yet) be triggered. It works and reliably produces a re-layouted identical version, also preserving transformations. Change-Id: I08cfbae04afa663d0589530aae549216d853128d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130171 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/svdogrp.hxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx
index eb2f620334b9..1616355c81ce 100644
--- a/include/svx/svdogrp.hxx
+++ b/include/svx/svdogrp.hxx
@@ -26,6 +26,21 @@
// Forward declarations
class SfxItemSet;
+class SdrObjGroup;
+
+// Helper class to allow administer advanced Diagram related
+// data and functionality
+class SVXCORE_DLLPUBLIC DiagramHelper
+{
+protected:
+ void anchorToSdrObjGroup(SdrObjGroup& rTarget);
+
+public:
+ DiagramHelper();
+ virtual ~DiagramHelper();
+
+ virtual void reLayout() = 0;
+};
// SdrObjGroup
class SVXCORE_DLLPUBLIC SdrObjGroup final : public SdrObject, public SdrObjList
@@ -37,6 +52,15 @@ private:
Point maRefPoint; // Reference point inside the object group
+ // Allow *only* DiagramHelper itself to set this internal reference to
+ // tightly control usage
+ friend class DiagramHelper;
+ std::unique_ptr<DiagramHelper> mp_DiagramHelper;
+
+public:
+ bool isDiagram() const { return bool(mp_DiagramHelper); }
+ DiagramHelper* getDiagramHelper() { return mp_DiagramHelper.get(); }
+
private:
// protected destructor - due to final, make private
virtual ~SdrObjGroup() override;