summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2020-05-06 14:08:37 +0200
committerLászló Németh <nemeth@numbertext.org>2020-05-13 13:02:01 +0200
commit8027cc622f8bd5260a59c360db359557cd287100 (patch)
tree7ae8b47f36abedae61d67ac595040a6fe0061a51 /chart2/source/tools
parentef1b75a60466dda61a9d28b03262f6db357142a5 (diff)
tdf#132757 UI: option to set Position Axis property of charts
Follow-up of commit 40d83914d43f60a196dfabddea0b52e2046b333a (tdf#127792 implement UNO chart attribute MajorOrigin). Change-Id: I68c35a4552a3915c045036d1f0f38804a00b7093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93566 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/ChartTypeHelper.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index a8efdeecd8ec..236d066f77d3 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -447,6 +447,22 @@ bool ChartTypeHelper::isSupportingComplexCategory( const uno::Reference< chart2:
return true;
}
+bool ChartTypeHelper::isSupportingCategoryPositioning( const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 nDimensionCount )
+{
+ if( xChartType.is() )
+ {
+ OUString aChartTypeName = xChartType->getChartType();
+ if (aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_AREA) ||
+ aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_LINE) ||
+ aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK))
+ return true;
+ else if (nDimensionCount == 2 &&
+ (aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_COLUMN) || aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_BAR)))
+ return true;
+ }
+ return false;
+}
+
bool ChartTypeHelper::noBordersForSimpleScheme( const uno::Reference< chart2::XChartType >& xChartType )
{
if(xChartType.is())