From 1eb8859813ff43b3753dcbab9e3e0bdfe7d72edb Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sat, 4 May 2019 23:16:48 +0300 Subject: Use hasElements to check Sequence emptiness in chart2..connectivity Similar to clang-tidy readability-container-size-empty Change-Id: I41824e8a4ef38d6a35a0ac4421cffcbcd17308e1 Reviewed-on: https://gerrit.libreoffice.org/71802 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/tools/DataSeriesHelper.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chart2/source/tools/DataSeriesHelper.cxx') diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 480c6dafa596..ad60f8914c54 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -334,7 +334,7 @@ OUString getLabelForLabeledDataSequence( chart2::data::LabelOrigin_SHORT_SIDE ) ); // no labels returned is interpreted as: auto-generation not // supported by sequence - if( aLabels.getLength() ) + if( aLabels.hasElements() ) aResult=aLabels[0]; else { @@ -645,7 +645,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque try { xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenValues; - if( !aHiddenValues.getLength() ) + if( !aHiddenValues.hasElements() ) return true; } catch( const uno::Exception& ) @@ -653,7 +653,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque return true; } } - return xDataSequence->getData().getLength(); + return xDataSequence->getData().hasElements(); } } @@ -689,7 +689,7 @@ sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Refere { Sequence aHiddenIndicesSeq; xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenIndicesSeq; - if( aHiddenIndicesSeq.getLength() ) + if( aHiddenIndicesSeq.hasElements() ) { auto aHiddenIndices( comphelper::sequenceToContainer>( aHiddenIndicesSeq ) ); std::sort( aHiddenIndices.begin(), aHiddenIndices.end() ); -- cgit