summaryrefslogtreecommitdiff
path: root/chart2/source/model/main
diff options
context:
space:
mode:
authorKurt Nordback <kurt.nordback@protonmail.com>2024-07-17 17:07:05 -0600
committerTomaž Vajngerl <quikee@gmail.com>2024-11-26 01:34:07 +0100
commitb10d331c1c9801adbf6d014d9348bb0a4dad3d2c (patch)
tree7fa23c258510338aedc321294e6962555f2f9265 /chart2/source/model/main
parent7c7e7da1538c1ed0c65821e18233ec9dcdc6cd2b (diff)
tdf#161800 - I/O of '# of values in second plot' parameter not supported
Add support for input and output of 'split position' parameter (number of entries in second plot) for of-pie charts. In OOXML this uses the supported split-pos tag. For ODF I added an extension in loext namespace for this parameter. This commit also includes simple tests for the I/O functionality in OOXML and ODF. Change-Id: I00ff59db721867fa836eb99b6677350040d005dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170666 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'chart2/source/model/main')
-rw-r--r--chart2/source/model/main/Diagram.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index bbd5dd61fab2..c3c4e0be9cc6 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -98,6 +98,7 @@ enum
PROP_DIAGRAM_3DRELATIVEHEIGHT,
PROP_DIAGRAM_DATATABLEHBORDER,
PROP_DIAGRAM_OF_PIE_TYPE,
+ PROP_DIAGRAM_SPLIT_POS,
PROP_DIAGRAM_DATATABLEVBORDER,
PROP_DIAGRAM_DATATABLEOUTLINE,
PROP_DIAGRAM_EXTERNALDATA
@@ -188,6 +189,10 @@ void lcl_AddPropertiesToVector(
PROP_DIAGRAM_OF_PIE_TYPE,
cppu::UnoType<chart2::PieChartSubType>::get(),
beans::PropertyAttribute::MAYBEVOID );
+ rOutProperties.emplace_back( "SplitPos",
+ PROP_DIAGRAM_SPLIT_POS,
+ cppu::UnoType<sal_Int32>::get(),
+ beans::PropertyAttribute::MAYBEVOID );
rOutProperties.emplace_back( "ExternalData",
PROP_DIAGRAM_EXTERNALDATA,
cppu::UnoType<OUString>::get(),
@@ -209,6 +214,7 @@ const ::chart::tPropertyValueMap& StaticDiagramDefaults()
::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::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_DIAGRAM_SPLIT_POS, 2 );
::chart::SceneProperties::AddDefaultsToMap( aMap );
return aMap;
}();