summaryrefslogtreecommitdiffstats
path: root/chart2/source/tools/ChartTypeHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/tools/ChartTypeHelper.cxx')
-rw-r--r--chart2/source/tools/ChartTypeHelper.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index 323e68197969..e921f01c1581 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -18,6 +18,7 @@
*/
#include <ChartTypeHelper.hxx>
+#include <ChartType.hxx>
#include <DiagramHelper.hxx>
#include <servicenames_charttypes.hxx>
@@ -437,6 +438,26 @@ bool ChartTypeHelper::isSupportingDateAxis( const uno::Reference< chart2::XChart
return true;
}
+bool ChartTypeHelper::isSupportingDateAxis( const rtl::Reference< ChartType >& xChartType, sal_Int32 nDimensionIndex )
+{
+ if( nDimensionIndex!=0 )
+ return false;
+ if( xChartType.is() )
+ {
+ sal_Int32 nType = ChartTypeHelper::getAxisType( xChartType, nDimensionIndex );
+ if( nType != AxisType::CATEGORY )
+ return false;
+ OUString aChartTypeName = xChartType->getChartType();
+ if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_PIE) )
+ return false;
+ if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
+ return false;
+ if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) )
+ return false;
+ }
+ return true;
+}
+
bool ChartTypeHelper::isSupportingComplexCategory( const uno::Reference< chart2::XChartType >& xChartType )
{
if( xChartType.is() )