diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-04 23:16:48 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-10 10:55:57 +0200 |
commit | 1eb8859813ff43b3753dcbab9e3e0bdfe7d72edb (patch) | |
tree | 4e04ab9584a5ef874faf8141c962158c32448d35 /chart2/source/model/main | |
parent | ec905d131374f0860bac77c52873eed984b1966f (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model/main')
-rw-r--r-- | chart2/source/model/main/Axis.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel_Persistence.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/Diagram.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index 0de39f48ba0e..39f44bf4ee5c 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -345,7 +345,7 @@ Axis::Axis( const Axis & rOther ) : if( m_aScaleData.Categories.is()) ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder ); - if( rOther.m_aSubGridProperties.getLength() != 0 ) + if( rOther.m_aSubGridProperties.hasElements() ) lcl_CloneSubGrids( rOther.m_aSubGridProperties, m_aSubGridProperties ); ModifyListenerHelper::addListenerToAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder ); diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index a4d3268f95e3..607d0142d6c9 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -1163,7 +1163,7 @@ Reference< uno::XInterface > SAL_CALL ChartModel::createInstance( const OUString Reference< uno::XInterface > SAL_CALL ChartModel::createInstanceWithArguments( const OUString& rServiceSpecifier , const Sequence< Any >& Arguments ) { - OSL_ENSURE( Arguments.getLength(), "createInstanceWithArguments: Warning: Arguments are ignored" ); + OSL_ENSURE( Arguments.hasElements(), "createInstanceWithArguments: Warning: Arguments are ignored" ); return createInstance( rServiceSpecifier ); } diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index fab7b97fb7bf..642aceb626ae 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -87,7 +87,7 @@ T lcl_getProperty( const OUString & rPropName ) { T aResult; - if( rMediaDescriptor.getLength()) + if( rMediaDescriptor.hasElements()) { const beans::PropertyValue * pIt = rMediaDescriptor.getConstArray(); const beans::PropertyValue * pEndIt = pIt + + rMediaDescriptor.getLength(); diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 5c6e34bf0c38..c41bfe42c981 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -520,7 +520,7 @@ void SAL_CALL Diagram::setCoordinateSystems( { tCoordinateSystemContainerType aNew; tCoordinateSystemContainerType aOld; - if( aCoordinateSystems.getLength()>0 ) + if( aCoordinateSystems.hasElements() ) { OSL_ENSURE( aCoordinateSystems.getLength()<=1, "more than one coordinatesystem is not supported yet by the fileformat" ); aNew.push_back( aCoordinateSystems[0] ); |