diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-12-11 20:31:28 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-12-16 16:11:40 +0100 |
commit | 3184cfc493c6931725dce1de19ac958067b1fd25 (patch) | |
tree | 26913d99fb8f7368132b24d42027d09d662401f4 /include | |
parent | fbe77e5d61ca63a688c12be721e760935d78e780 (diff) |
tdf#128621 OOXML Chart: export embedded shapes in chart
Use ShapeExport to export additional shapes (userShapes)
in Chart.
Change-Id: Ic70a7f84c4ac028b6f09a69bec2cf4949944b16c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107605
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/export/chartexport.hxx | 2 | ||||
-rw-r--r-- | include/oox/export/drawingml.hxx | 10 | ||||
-rw-r--r-- | include/oox/token/relationship.hxx | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index b900c68b51a2..b6ed39c72dbb 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <oox/dllapi.h> #include <oox/export/drawingml.hxx> +#include <oox/export/shapes.hxx> #include <oox/export/utils.hxx> #include <oox/token/tokens.hxx> #include <rtl/ustring.hxx> @@ -140,6 +141,7 @@ private: const OUString* pSubText = nullptr ); void exportPlotArea( const css::uno::Reference< css::chart::XChartDocument >& rChartDoc ); + void exportAdditionalShapes( const css::uno::Reference<css::chart::XChartDocument >& rChartDoc ); void exportFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); void exportSolidFill(const css::uno::Reference<css::beans::XPropertySet>& xPropSet); void exportGradientFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 9f87e54c1361..afd1d994eafd 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -141,6 +141,8 @@ private: static int mnImageCounter; static int mnWdpImageCounter; static std::map<OUString, OUString> maWdpCache; + static sal_Int32 mnDrawingMLCount; + static sal_Int32 mnVmlCount; /// To specify where write eg. the images to (like 'ppt', or 'word' - according to the OPC). DocumentType meDocumentType; @@ -293,12 +295,20 @@ public: void writeDiagramRels(const css::uno::Sequence<css::uno::Sequence<css::uno::Any>>& xRelSeq, const css::uno::Reference<css::io::XOutputStream>& xOutStream, const OUString& sGrabBagProperyName, int nDiagramId); + static void WriteFromTo(const css::uno::Reference<css::drawing::XShape>& rXShape, const css::awt::Size& aPageSize, + const sax_fastparser::FSHelperPtr& pDrawing); + static bool IsGroupShape( const css::uno::Reference< css::drawing::XShape >& rXShape ); static bool IsDiagram(const css::uno::Reference<css::drawing::XShape>& rXShape); sal_Int32 getBulletMarginIndentation (const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,sal_Int16 nLevel, std::u16string_view propName); static void ResetCounters(); + static void ResetMlCounters(); + + static sal_Int32 getNewDrawingUniqueId() { return ++mnDrawingMLCount; } + static sal_Int32 getNewVMLUniqueId() { return ++mnVmlCount; } + // A Helper to decide the script type for given text in order to call WriteRunProperties. static sal_Int16 GetScriptType(const OUString& rStr); diff --git a/include/oox/token/relationship.hxx b/include/oox/token/relationship.hxx index adffd4b6617e..fbba99768711 100644 --- a/include/oox/token/relationship.hxx +++ b/include/oox/token/relationship.hxx @@ -20,6 +20,7 @@ enum class Relationship { ACTIVEXCONTROLBINARY, CHART, + CHARTUSERSHAPES, COMMENTS, COMMENTAUTHORS, CONTROL, |