diff options
author | Kurt Nordback <kurt.nordback@protonmail.com> | 2023-12-01 11:18:31 -0700 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-02-19 01:29:36 +0100 |
commit | 1cda27cf69054b006aa1b16cab8f56339274588b (patch) | |
tree | 7e517f2396e969ac4201ed52cf9846ef28a1ddd4 /chart2/source/model | |
parent | bbc9ac1f08a5ee4b9f65eaf10110df328d95de95 (diff) |
tdf#50934: OfPie inport from OOXML, plus initial work for export
Change-Id: Ie17b583af28d274b3e7817c646dd4f5873e03fef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model')
-rw-r--r-- | chart2/source/model/main/Diagram.cxx | 8 | ||||
-rw-r--r-- | chart2/source/model/template/PieChartType.hxx | 1 | ||||
-rw-r--r-- | chart2/source/model/template/PieChartTypeTemplate.cxx | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 2a4b63c73401..1ef884c796f9 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -51,6 +51,7 @@ #include <com/sun/star/chart2/StackingDirection.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> #include <com/sun/star/chart2/RelativeSize.hpp> +#include <com/sun/star/chart2/PieChartSubType.hpp> #include <com/sun/star/chart/MissingValueTreatment.hpp> #include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> @@ -97,6 +98,7 @@ enum PROP_DIAGRAM_MISSING_VALUE_TREATMENT, PROP_DIAGRAM_3DRELATIVEHEIGHT, PROP_DIAGRAM_DATATABLEHBORDER, + PROP_DIAGRAM_OF_PIE_TYPE, PROP_DIAGRAM_DATATABLEVBORDER, PROP_DIAGRAM_DATATABLEOUTLINE, PROP_DIAGRAM_EXTERNALDATA @@ -183,6 +185,10 @@ void lcl_AddPropertiesToVector( PROP_DIAGRAM_3DRELATIVEHEIGHT, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::MAYBEVOID ); + rOutProperties.emplace_back( "SubPieType", + PROP_DIAGRAM_OF_PIE_TYPE, + cppu::UnoType<chart2::PieChartSubType>::get(), + beans::PropertyAttribute::MAYBEVOID ); rOutProperties.emplace_back( "ExternalData", PROP_DIAGRAM_EXTERNALDATA, cppu::UnoType<OUString>::get(), @@ -202,6 +208,8 @@ const ::chart::tPropertyValueMap& StaticDiagramDefaults() ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false ); ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_DIAGRAM_STARTING_ANGLE, 90 ); ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_DIAGRAM_3DRELATIVEHEIGHT, 100 ); + ::chart::PropertyHelper::setPropertyValueDefault< chart2::PieChartSubType >( aMap, PROP_DIAGRAM_OF_PIE_TYPE, + chart2::PieChartSubType_NONE); ::chart::SceneProperties::AddDefaultsToMap( aMap ); return aMap; }(); diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx index 5a1e46f43d88..083bd78facd3 100644 --- a/chart2/source/model/template/PieChartType.hxx +++ b/chart2/source/model/template/PieChartType.hxx @@ -19,6 +19,7 @@ #pragma once #include <ChartType.hxx> +#include <com/sun/star/chart2/PieChartSubType.hpp> namespace chart { diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 322b75243fb9..20880808d10b 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -100,8 +100,7 @@ enum PROP_PIE_TEMPLATE_USE_RINGS, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT } - , + | beans::PropertyAttribute::MAYBEDEFAULT }, { "SubPieType", PROP_PIE_TEMPLATE_SUB_PIE_TYPE, cppu::UnoType<chart2::PieChartSubType>::get(), |