diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 11:03:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 12:03:50 +0200 |
commit | 2fffaf6f05d829e345ad8b391646a6e8df9a9a26 (patch) | |
tree | ec1b7343262433ee2ea9ab6e5197b6fd2327b685 /chart2/source/tools/DataSeriesHelper.cxx | |
parent | f74da1315a5b2ec232a66944e41ff90231b383be (diff) |
loplugin:unusedmethods
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb
Reviewed-on: https://gerrit.libreoffice.org/40391
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/tools/DataSeriesHelper.cxx')
-rw-r--r-- | chart2/source/tools/DataSeriesHelper.cxx | 38 |
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 { |