summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2024-05-29 16:42:53 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2024-06-01 19:05:12 +0200
commit97265258cc102def076f057857cef3022325ab8f (patch)
treeb1322fe37b585975057952375682cc647cb5a66b /include
parent9265dd87222763453784938553f9be41277acd6a (diff)
Advanced Diagram support: Load fill DiagramModel
In the case the input file does have a graphical representation of the Diagram as image file, the DiagramModel was not fully loaded. For being able to edit the Diagram in the future it is necessary to re-create the geometry, thus a full model is needed. Needed to know at recreation if this is the first time the geometry gets self-created using the layout/creation mechanism to decide if to apply the style or use the saved/reapplyable data from secure/restoreDataFromShapeToModelAfterDiagramImport mechanism, added that. Change-Id: Icb7590306ab59728e83b800b8637333e0d372de5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168223 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/shape.hxx5
-rw-r--r--include/svx/diagram/IDiagramHelper.hxx10
2 files changed, 13 insertions, 2 deletions
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 6937e9057b48..894d42ca89c3 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -266,7 +266,10 @@ public:
// Allows preparation of a local Diagram helper && propagate an eventually
// existing one to the data holder object later
- SAL_DLLPRIVATE void prepareDiagramHelper(const std::shared_ptr< Diagram >& rDiagramPtr, const std::shared_ptr<::oox::drawingml::Theme>& rTheme);
+ SAL_DLLPRIVATE void prepareDiagramHelper(
+ const std::shared_ptr< Diagram >& rDiagramPtr,
+ const std::shared_ptr<::oox::drawingml::Theme>& rTheme,
+ bool bSelfCreated);
SAL_DLLPRIVATE void propagateDiagramHelper();
// for Writer it is necessary to migrate an existing helper to a new Shape
diff --git a/include/svx/diagram/IDiagramHelper.hxx b/include/svx/diagram/IDiagramHelper.hxx
index e93056f70049..67142c26e2a7 100644
--- a/include/svx/diagram/IDiagramHelper.hxx
+++ b/include/svx/diagram/IDiagramHelper.hxx
@@ -80,11 +80,15 @@ private:
// a newly created oox::drawingml::Theme object
bool mbForceThemePtrRecreation; // false
+ // if true, content was self-created using addTo/addShape
+ // and the layouting stuff
+ bool mbSelfCreated;
+
protected:
void anchorToSdrObjGroup(SdrObjGroup& rTarget);
public:
- IDiagramHelper();
+ IDiagramHelper(bool bSelfCreated);
virtual ~IDiagramHelper();
// re-create XShapes
@@ -111,6 +115,10 @@ public:
bool UseDiagramModelData() const { return mbUseDiagramModelData; }
bool ForceThemePtrRecreation() const { return mbForceThemePtrRecreation; };
+ // get/set SelfCreated flag
+ bool isSelfCreated() const { return mbSelfCreated; }
+ void setSelfCreated() { mbSelfCreated = true; }
+
static void AddAdditionalVisualization(const SdrObjGroup& rTarget, SdrHdlList& rHdlList);
};