summaryrefslogtreecommitdiff
path: root/chart2/source/tools/DataSeriesHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/tools/DataSeriesHelper.cxx')
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx38
1 files changed, 0 insertions, 38 deletions
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 97de8cde4f7b..657572f069eb 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -633,44 +633,6 @@ bool hasAttributedDataPointDifferentValue( const Reference< chart2::XDataSeries
return false;
}
-bool areAllSeriesAttachedToSameAxis( const uno::Reference< chart2::XChartType >& xChartType, sal_Int32 & rOutAxisIndex )
-{
- try
- {
- uno::Reference< chart2::XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY_THROW );
- uno::Sequence< uno::Reference< chart2::XDataSeries > > aSeriesSeq( xDataSeriesContainer->getDataSeries());
-
- const sal_Int32 nSeriesCount( aSeriesSeq.getLength());
- // AxisIndex can only be 0 or 1
- sal_Int32 nSeriesAtFirstAxis = 0;
- sal_Int32 nSeriesAtSecondAxis = 0;
-
- for( sal_Int32 nI = 0; nI < nSeriesCount; ++nI )
- {
- uno::Reference< chart2::XDataSeries > xSeries( aSeriesSeq[nI], uno::UNO_QUERY );
- sal_Int32 nAxisIndex = DataSeriesHelper::getAttachedAxisIndex( xSeries );
- if( nAxisIndex == 0 )
- ++nSeriesAtFirstAxis;
- else if( nAxisIndex == 1 )
- ++nSeriesAtSecondAxis;
- }
- OSL_ENSURE( nSeriesAtFirstAxis + nSeriesAtSecondAxis == nSeriesCount, "Invalid axis index found" );
-
- if( nSeriesAtFirstAxis == nSeriesCount )
- rOutAxisIndex = 0;
- else if( nSeriesAtSecondAxis == nSeriesCount )
- rOutAxisIndex = 1;
-
- return ( nSeriesAtFirstAxis == nSeriesCount ||
- nSeriesAtSecondAxis == nSeriesCount );
- }
- catch( const uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- return false;
- }
-}
-
namespace
{