diff options
author | Armin Le Grand (Allotropia) <Armin.Le.Grand@me.com> | 2022-02-18 16:07:28 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2022-02-22 18:09:24 +0100 |
commit | eaaf5ef8f99404797ffbb44ceeebf8795d85f07e (patch) | |
tree | 12bce3931b78d2f009252a81cc219e342fcdd8e7 /include/oox | |
parent | 8187737a7844fe4669f80bf0e8ef0950148dc58f (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/oox')
-rw-r--r-- | include/oox/drawingml/shape.hxx | 13 | ||||
-rw-r--r-- | include/oox/ppt/pptimport.hxx | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 40c8319f67d3..59ed231378fe 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -57,6 +57,8 @@ namespace oox::vml { struct OleObjectInfo; } +class DiagramHelper; + namespace oox::drawingml { class Theme; @@ -100,6 +102,8 @@ struct LinkedTxbxAttr LinkedTxbxAttr(): id(0),seq(0){}; }; +class Diagram; + class OOX_DLLPUBLIC Shape : public std::enable_shared_from_this< Shape > { @@ -249,6 +253,11 @@ public: oox::core::NamedShapePairs& getDiagramFontHeights() { return maDiagramFontHeights; } + // Allows preparation of a local Diagram helper && propagate an eventually + // existing one to the data holder object later + void prepareDiagramHelper(const std::shared_ptr< Diagram >& rDiagramPtr, const std::shared_ptr<::oox::drawingml::Theme>& rTheme); + void propagateDiagramHelper(); + protected: enum FrameType @@ -392,6 +401,10 @@ private: /// For SmartArt, this contains groups of shapes: automatic font size is the same in each group. oox::core::NamedShapePairs maDiagramFontHeights; + + // temporary space for DiagramHelper in preparation for collecting data + // Note: I tried to use a unique_ptr here, but existing constuctor func does not allow that + DiagramHelper* mpDiagramHelper; }; } diff --git a/include/oox/ppt/pptimport.hxx b/include/oox/ppt/pptimport.hxx index 3b81f26ec5e8..b7b9e059e828 100644 --- a/include/oox/ppt/pptimport.hxx +++ b/include/oox/ppt/pptimport.hxx @@ -75,6 +75,7 @@ public: virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& rDescriptor ) override; ::Color getSchemeColor( sal_Int32 nToken ) const; + std::shared_ptr<::oox::drawingml::Theme> getCurrentThemePtr() const; #if OSL_DEBUG_LEVEL > 0 static XmlFilterBase* mpDebugFilterBase; |