[Libreoffice-commits] core.git: chart2/qa chart2/source comphelper/source configmgr/source connectivity/source

Arkadiy Illarionov (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 10 08:56:39 UTC 2019


 chart2/qa/extras/chart2export.cxx                                      |    4 -
 chart2/source/controller/accessibility/AccessibleChartView.cxx         |    2 
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx      |    2 
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx    |    4 -
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx         |   10 ++--
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx              |    2 
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx          |    6 +-
 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx      |   16 +++----
 chart2/source/controller/dialogs/DataBrowserModel.cxx                  |    2 
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx              |    6 +-
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx          |    8 +--
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx     |    4 -
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |    4 -
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx     |    4 -
 chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx         |    2 
 chart2/source/controller/main/ChartController.cxx                      |    2 
 chart2/source/controller/main/ChartDropTargetHelper.cxx                |    2 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx                |    4 -
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx                  |    2 
 chart2/source/model/filter/XMLFilter.cxx                               |    2 
 chart2/source/model/main/Axis.cxx                                      |    2 
 chart2/source/model/main/ChartModel.cxx                                |    2 
 chart2/source/model/main/ChartModel_Persistence.cxx                    |    2 
 chart2/source/model/main/Diagram.cxx                                   |    2 
 chart2/source/model/template/ChartTypeTemplate.cxx                     |   22 +++++-----
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx           |    2 
 chart2/source/model/template/DataInterpreter.cxx                       |    4 -
 chart2/source/model/template/PieChartTypeTemplate.cxx                  |    4 -
 chart2/source/model/template/StockChartTypeTemplate.cxx                |    8 +--
 chart2/source/model/template/StockDataInterpreter.cxx                  |    2 
 chart2/source/tools/AxisHelper.cxx                                     |    2 
 chart2/source/tools/CachedDataSequence.cxx                             |    6 +-
 chart2/source/tools/ChartModelHelper.cxx                               |    4 -
 chart2/source/tools/ConfigColorScheme.cxx                              |    2 
 chart2/source/tools/DataSeriesHelper.cxx                               |    8 +--
 chart2/source/tools/DataSourceHelper.cxx                               |    2 
 chart2/source/tools/DiagramHelper.cxx                                  |   16 +++----
 chart2/source/tools/ExplicitCategoriesProvider.cxx                     |    4 -
 chart2/source/tools/InternalDataProvider.cxx                           |    2 
 chart2/source/tools/RegressionCurveHelper.cxx                          |    4 -
 chart2/source/tools/TitleHelper.cxx                                    |    2 
 chart2/source/tools/WrappedPropertySet.cxx                             |    6 +-
 chart2/source/view/axes/VCartesianGrid.cxx                             |    4 -
 chart2/source/view/axes/VPolarGrid.cxx                                 |    2 
 chart2/source/view/charttypes/AreaChart.cxx                            |    2 
 chart2/source/view/charttypes/CandleStickChart.cxx                     |    2 
 chart2/source/view/charttypes/NetChart.cxx                             |    2 
 chart2/source/view/charttypes/VSeriesPlotter.cxx                       |    2 
 chart2/source/view/main/ChartView.cxx                                  |    6 +-
 chart2/source/view/main/Clipping.cxx                                   |    2 
 chart2/source/view/main/ShapeFactory.cxx                               |   16 +++----
 chart2/source/view/main/VDataSeries.cxx                                |    6 +-
 chart2/source/view/main/VTitle.cxx                                     |    2 
 comphelper/source/compare/AnyCompareFactory.cxx                        |    2 
 comphelper/source/container/enumerablemap.cxx                          |    2 
 comphelper/source/misc/docpasswordhelper.cxx                           |   10 ++--
 comphelper/source/misc/mimeconfighelper.cxx                            |    6 +-
 comphelper/source/property/ChainablePropertySetInfo.cxx                |    2 
 comphelper/source/property/MasterPropertySetInfo.cxx                   |    2 
 comphelper/source/xml/ofopxmlhelper.cxx                                |    6 +-
 configmgr/source/access.cxx                                            |    2 
 configmgr/source/configurationprovider.cxx                             |    2 
 connectivity/source/drivers/dbase/DTable.cxx                           |    2 
 connectivity/source/drivers/firebird/DatabaseMetaData.cxx              |    2 
 connectivity/source/drivers/jdbc/JConnection.cxx                       |    2 
 connectivity/source/drivers/jdbc/Reader.cxx                            |    2 
 connectivity/source/drivers/jdbc/tools.cxx                             |    2 
 connectivity/source/drivers/odbc/OResultSet.cxx                        |    8 +--
 connectivity/source/drivers/postgresql/pq_statement.cxx                |    2 
 69 files changed, 148 insertions(+), 148 deletions(-)

New commits:
commit 1eb8859813ff43b3753dcbab9e3e0bdfe7d72edb
Author:     Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Sat May 4 23:16:48 2019 +0300
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jun 10 10:55:57 2019 +0200

    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 at collabora.co.uk>

diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 2dafbaac8017..b238f35f715a 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -1353,7 +1353,7 @@ void checkGapWidth(Reference<beans::XPropertySet> const & xPropSet, sal_Int32 nV
     CPPUNIT_ASSERT(aAny.hasValue());
     uno::Sequence< sal_Int32 > aSequence;
     aAny >>= aSequence;
-    CPPUNIT_ASSERT(aSequence.getLength());
+    CPPUNIT_ASSERT(aSequence.hasElements());
     CPPUNIT_ASSERT_EQUAL(nValue, aSequence[0]);
 }
 
@@ -1363,7 +1363,7 @@ void checkOverlap(Reference<beans::XPropertySet> const & xPropSet, sal_Int32 nVa
     CPPUNIT_ASSERT(aAny.hasValue());
     uno::Sequence< sal_Int32 > aSequence;
     aAny >>= aSequence;
-    CPPUNIT_ASSERT(aSequence.getLength());
+    CPPUNIT_ASSERT(aSequence.hasElements());
     CPPUNIT_ASSERT_EQUAL(nValue, aSequence[0]);
 }
 
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index f034df4863c4..15ec18a6517b 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -241,7 +241,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
         }
     }
 
-    if( rArguments.getLength() > 0 && xChartModel.is() && xChartView.is() )
+    if( rArguments.hasElements() && xChartModel.is() && xChartView.is() )
     {
         Reference< view::XSelectionSupplier > xNewSelectionSupplier;
         rArguments[0] >>= xNewSelectionSupplier;
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 4de7a7ff223e..c413fd514daa 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1314,7 +1314,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstanceW
     const OUString& ServiceSpecifier,
     const uno::Sequence< uno::Any >& Arguments )
 {
-    OSL_ENSURE( Arguments.getLength(), "createInstanceWithArguments: Warning: Arguments are ignored" );
+    OSL_ENSURE( Arguments.hasElements(), "createInstanceWithArguments: Warning: Arguments are ignored" );
 
     return createInstance( ServiceSpecifier );
 }
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index d71637368d2d..5702165bc763 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -434,11 +434,11 @@ DataSeriesPointWrapper::DataSeriesPointWrapper(const std::shared_ptr<Chart2Model
 
 void SAL_CALL DataSeriesPointWrapper::initialize( const uno::Sequence< uno::Any >& aArguments )
 {
-    OSL_PRECOND(aArguments.getLength() >= 1,"need at least 1 argument to initialize the DataSeriesPointWrapper: series reference + optional datapoint index");
+    OSL_PRECOND(aArguments.hasElements(),"need at least 1 argument to initialize the DataSeriesPointWrapper: series reference + optional datapoint index");
 
     m_nSeriesIndexInNewAPI = -1;//ignored in this case
     m_nPointIndex = -1;
-    if( aArguments.getLength() >= 1 )
+    if( aArguments.hasElements() )
     {
         aArguments[0] >>= m_xDataSeries;
         if( aArguments.getLength() >= 2 )
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index d7497ecec331..f7edd83c45ab 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -170,7 +170,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName
             if( xSeriesContainer.is() )
             {
                 Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
-                if(aSeriesSeq.getLength())
+                if(aSeriesSeq.hasElements())
                 {
                     xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
                     if(xPropSet.is())
@@ -208,7 +208,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty
             if( xSeriesContainer.is() )
             {
                 Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
-                if(aSeriesSeq.getLength())
+                if(aSeriesSeq.hasElements())
                 {
                     xPropSet.set(aSeriesSeq[0],uno::UNO_QUERY);
                     break;
@@ -270,7 +270,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValues( const uno::Sequence< OUStrin
 uno::Sequence< uno::Any > SAL_CALL MinMaxLineWrapper::getPropertyValues( const uno::Sequence< OUString >& rNameSeq )
 {
     Sequence< Any > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
@@ -316,7 +316,7 @@ beans::PropertyState SAL_CALL MinMaxLineWrapper::getPropertyState( const OUStrin
 uno::Sequence< beans::PropertyState > SAL_CALL MinMaxLineWrapper::getPropertyStates( const uno::Sequence< OUString >& rNameSeq )
 {
     Sequence< beans::PropertyState > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
@@ -363,7 +363,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertiesToDefault( const uno::Sequence< OU
 uno::Sequence< uno::Any > SAL_CALL MinMaxLineWrapper::getPropertyDefaults( const uno::Sequence< OUString >& rNameSeq )
 {
     Sequence< Any > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 3f3166cac029..f2086558180b 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -265,7 +265,7 @@ Reference< beans::XPropertySet > TitleWrapper::getFirstCharacterPropertySet()
     if( xTitle.is())
     {
         Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
-        if( aStrings.getLength() > 0 )
+        if( aStrings.hasElements() )
             xProp.set( aStrings[0], uno::UNO_QUERY );
     }
 
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 52a94d20b6c0..ecc5ebbe4a92 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -245,7 +245,7 @@ void SAL_CALL UpDownBarWrapper::setPropertyValues( const uno::Sequence< OUString
 uno::Sequence< uno::Any > SAL_CALL UpDownBarWrapper::getPropertyValues( const uno::Sequence< OUString >& rNameSeq )
 {
     Sequence< Any > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
@@ -283,7 +283,7 @@ beans::PropertyState SAL_CALL UpDownBarWrapper::getPropertyState( const OUString
 uno::Sequence< beans::PropertyState > SAL_CALL UpDownBarWrapper::getPropertyStates( const uno::Sequence< OUString >& rNameSeq )
 {
     Sequence< beans::PropertyState > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
@@ -330,7 +330,7 @@ void SAL_CALL UpDownBarWrapper::setPropertiesToDefault( const uno::Sequence< OUS
 uno::Sequence< uno::Any > SAL_CALL UpDownBarWrapper::getPropertyDefaults( const uno::Sequence< OUString >& rNameSeq )
 {
     Sequence< Any > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index efd80288411c..73f2fbc61ec1 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -173,7 +173,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
         case SCALE_PROP_STEPHELP:
         {
             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
-            if( rSubIncrements.getLength() == 0 )
+            if( !rSubIncrements.hasElements() )
                 rSubIncrements.realloc( 1 );
 
             double fStepHelp = 0;
@@ -199,7 +199,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
         case SCALE_PROP_STEPHELP_COUNT:
         {
             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
-            if( rSubIncrements.getLength() == 0 )
+            if( !rSubIncrements.hasElements() )
                 rSubIncrements.realloc( 1 );
             sal_Int32 nIntervalCount=0;
             if( rOuterValue>>=nIntervalCount )
@@ -239,7 +239,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
         case SCALE_PROP_AUTO_STEPHELP:
         {
             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
-            if( rSubIncrements.getLength() == 0 )
+            if( !rSubIncrements.hasElements() )
                 rSubIncrements.realloc( 1 );
 
             if( (rOuterValue >>= bBool) && bBool )
@@ -402,7 +402,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
             if( bLogarithmic )
             {
-                if( rSubIncrements.getLength() > 0 )
+                if( rSubIncrements.hasElements() )
                 {
                     sal_Int32 nIntervalCount = 0;
                     rSubIncrements[ 0 ].IntervalCount >>= nIntervalCount;
@@ -412,7 +412,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
             }
             else if( aScaleData.IncrementData.Distance.hasValue() )
             {
-                if( rSubIncrements.getLength() > 0 )
+                if( rSubIncrements.hasElements() )
                 {
                     double fStepMain = 0;
                     sal_Int32 nIntervalCount = 0;
@@ -441,7 +441,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
                 {
                     if( bLogarithmic )
                     {
-                        if( rSubIncrements.getLength() > 0 )
+                        if( rSubIncrements.hasElements() )
                         {
                             sal_Int32 nIntervalCount = aExplicitIncrement.SubIncrements[ 0 ].IntervalCount;
                             aRet <<= double(nIntervalCount);
@@ -467,7 +467,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
             sal_Int32 nIntervalCount = 0;
             bool bNeedToCalculateExplicitValues = true;
             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
-            if( rSubIncrements.getLength() > 0 )
+            if( rSubIncrements.hasElements() )
             {
                 if( (rSubIncrements[ 0 ].IntervalCount >>= nIntervalCount) && (nIntervalCount > 0) )
                     bNeedToCalculateExplicitValues = false;
@@ -499,7 +499,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
         case SCALE_PROP_AUTO_STEPHELP:
         {
             Sequence< chart2::SubIncrement >& rSubIncrements( aScaleData.IncrementData.SubIncrements );
-            if( rSubIncrements.getLength() > 0 )
+            if( rSubIncrements.hasElements() )
                 aRet <<= !rSubIncrements[ 0 ].IntervalCount.hasValue();
             else
                 aRet <<= true;
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index c0dea7817ebc..4748972d502b 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -845,7 +845,7 @@ void DataBrowserModel::updateFromModel()
                     if( xSource.is())
                     {
                         Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeqs( xSource->getDataSequences());
-                        if( aLSeqs.getLength() == 0 )
+                        if( !aLSeqs.hasElements() )
                             continue;
                         nHeaderEnd = nHeaderStart;
 
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 015224abecaf..6a8b618b3c8b 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -133,7 +133,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
             m_bProvidesStartingAngle = ChartTypeHelper::isSupportingStartingAngle( xChartType );
 
             m_bProvidesMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType )
-                                            .getLength();
+                                            .hasElements();
         }
     }
 
@@ -252,8 +252,8 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
         }
 
         if( bXValuesFound && bYValuesFound &&
-            aXValues.getLength() > 0 &&
-            aYValues.getLength() > 0 )
+            aXValues.hasElements() &&
+            aYValues.hasElements() )
         {
             RegressionCalculationHelper::tDoubleVectorPair aValues(
                 RegressionCalculationHelper::cleanup( aXValues, aYValues, RegressionCalculationHelper::isValid()));
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 3bf6b3aaa800..855a4b8d7253 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -255,7 +255,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
                 rOutItemSet.Put( SfxBoolItem( nWhichId, !lcl_hasTimeIntervalValue(rTimeIncrement.MinorTimeInterval) ) );
             else
                 rOutItemSet.Put( SfxBoolItem( nWhichId,
-                    ! ( rSubIncrements.getLength() > 0 && rSubIncrements[0].IntervalCount.hasValue() )));
+                    ! ( rSubIncrements.hasElements() && rSubIncrements[0].IntervalCount.hasValue() )));
             break;
 
         case SCHATTR_AXIS_HELP_TIME_UNIT:
@@ -279,7 +279,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
             }
             else
             {
-                if( rSubIncrements.getLength() > 0 && rSubIncrements[0].IntervalCount.hasValue())
+                if( rSubIncrements.hasElements() && rSubIncrements[0].IntervalCount.hasValue())
                 {
                     rOutItemSet.Put( SfxInt32Item( nWhichId,
                             *o3tl::doAccess<sal_Int32>(
@@ -607,7 +607,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
         case SCHATTR_AXIS_AUTO_STEP_HELP:
             if( lcl_isAutoMinor(rItemSet) )
             {
-                if( aScale.IncrementData.SubIncrements.getLength() > 0 &&
+                if( aScale.IncrementData.SubIncrements.hasElements() &&
                     aScale.IncrementData.SubIncrements[0].IntervalCount.hasValue() )
                 {
                         aScale.IncrementData.SubIncrements[0].IntervalCount.clear();
@@ -649,7 +649,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
                     aScale.TimeIncrement.MinorTimeInterval <<= aTimeInterval;
                     bSetScale = true;
                 }
-                else if( aScale.IncrementData.SubIncrements.getLength() > 0 )
+                else if( aScale.IncrementData.SubIncrements.hasElements() )
                 {
                     if( ! aScale.IncrementData.SubIncrements[0].IntervalCount.hasValue() ||
                         aScale.IncrementData.SubIncrements[0].IntervalCount != aValue )
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 343bd62d3e45..6be559c23639 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -409,7 +409,7 @@ bool DataPointItemConverter::ApplySpecialItem(
                 sal_Int32 nOld =0;
                 if( !(GetPropertySet()->getPropertyValue( "LabelPlacement" ) >>= nOld) )
                 {
-                    if( m_aAvailableLabelPlacements.getLength() )
+                    if( m_aAvailableLabelPlacements.hasElements() )
                         nOld = m_aAvailableLabelPlacements[0];
                 }
                 if( m_bOverwriteLabelsForAttributedDataPointsAlso )
@@ -641,7 +641,7 @@ void DataPointItemConverter::FillSpecialItem(
                 sal_Int32 nPlacement=0;
                 if( GetPropertySet()->getPropertyValue( "LabelPlacement" ) >>= nPlacement )
                     rOutItemSet.Put( SfxInt32Item( nWhichId, nPlacement ));
-                else if( m_aAvailableLabelPlacements.getLength() )
+                else if( m_aAvailableLabelPlacements.hasElements() )
                     rOutItemSet.Put( SfxInt32Item( nWhichId, m_aAvailableLabelPlacements[0] ));
             }
             catch( const uno::Exception& e )
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 6dd64d069a96..977eddbb0fb8 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -310,7 +310,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
 
         case SCHATTR_MISSING_VALUE_TREATMENT:
         {
-            if( m_aSupportedMissingValueTreatments.getLength() )
+            if( m_aSupportedMissingValueTreatments.hasElements() )
             {
                 sal_Int32 nNew = static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue();
                 if( m_nMissingValueTreatment != nNew )
@@ -411,7 +411,7 @@ void SeriesOptionsItemConverter::FillSpecialItem(
         }
         case SCHATTR_MISSING_VALUE_TREATMENT:
         {
-            if( m_aSupportedMissingValueTreatments.getLength() )
+            if( m_aSupportedMissingValueTreatments.hasElements() )
                 rOutItemSet.Put( SfxInt32Item( nWhichId, m_nMissingValueTreatment ));
             break;
         }
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index a913c93a2277..f759cd7306a9 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -369,7 +369,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
                 sal_Int32 nOld = 0;
                 if (!(GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld))
                 {
-                    if (maAvailableLabelPlacements.getLength())
+                    if (maAvailableLabelPlacements.hasElements())
                         nOld = maAvailableLabelPlacements[0];
                 }
                 if (mbDataSeries)
@@ -590,7 +590,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
                 sal_Int32 nPlacement = 0;
                 if (GetPropertySet()->getPropertyValue("LabelPlacement") >>= nPlacement)
                     rOutItemSet.Put(SfxInt32Item(nWhichId, nPlacement));
-                else if (maAvailableLabelPlacements.getLength())
+                else if (maAvailableLabelPlacements.hasElements())
                     rOutItemSet.Put(SfxInt32Item(nWhichId, maAvailableLabelPlacements[0]));
             }
             catch (const uno::Exception& e)
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index be5cdb2b9c95..9a5d60ed3afd 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -106,7 +106,7 @@ TitleItemConverter::TitleItemConverter(
     if( xTitle.is())
     {
         uno::Sequence< uno::Reference< chart2::XFormattedString > > aStringSeq( xTitle->getText());
-        if( aStringSeq.getLength() > 0 )
+        if( aStringSeq.hasElements() )
         {
             m_aConverters.emplace_back(
                 new FormattedStringsConverter( aStringSeq, rItemPool, pRefSize, rPropertySet ));
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 6c2e671a416d..0fd4cfc311d7 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -260,7 +260,7 @@ css::uno::Reference<css::chart2::XChartType> getChartType(
     Reference< chart2::XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY_THROW );
 
     Sequence< Reference< chart2::XCoordinateSystem > > xCooSysSequence( xCooSysContainer->getCoordinateSystems());
-    if (!xCooSysSequence.getLength()) {
+    if (!xCooSysSequence.hasElements()) {
         return css::uno::Reference<css::chart2::XChartType>();
     }
 
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx
index 60b64ec1e8fc..6ef4ff484539 100644
--- a/chart2/source/controller/main/ChartDropTargetHelper.cxx
+++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx
@@ -103,7 +103,7 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt )
         if( aDataHelper.HasFormat( SotClipboardFormatId::LINK ))
         {
             Sequence<sal_Int8> aBytes = aDataHelper.GetSequence(SotClipboardFormatId::LINK, OUString());
-            if (aBytes.getLength())
+            if (aBytes.hasElements())
             {
                 std::vector< OUString > aStrings( lcl_getStringsFromByteSequence( aBytes ));
                 if( aStrings.size() >= 3 && aStrings[0] == "soffice" )
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index e982f344dab0..ac48b0a7e9cb 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -390,14 +390,14 @@ css::uno::Reference<css::chart2::XChartType> getChartType(const css::uno::Refere
 
     css::uno::Sequence<css::uno::Reference<css::chart2::XCoordinateSystem>> xCooSysSequence(xCooSysContainer->getCoordinateSystems());
 
-    if (xCooSysSequence.getLength() == 0)
+    if (!xCooSysSequence.hasElements())
         return css::uno::Reference<css::chart2::XChartType>();
 
     css::uno::Reference<css::chart2::XChartTypeContainer> xChartTypeContainer(xCooSysSequence[0], css::uno::UNO_QUERY_THROW);
 
     css::uno::Sequence<css::uno::Reference<css::chart2::XChartType>> xChartTypeSequence(xChartTypeContainer->getChartTypes());
 
-    if (xChartTypeSequence.getLength() == 0)
+    if (!xChartTypeSequence.hasElements())
         return css::uno::Reference<css::chart2::XChartType>();
 
     return xChartTypeSequence[0];
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 67f52a5a3eff..3d4fc3ecc2dc 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -139,7 +139,7 @@ bool isTrendlineVisible(const css::uno::Reference<css::frame::XModel>& xModel,
     if (!xRegressionCurveContainer.is())
         return false;
 
-    return xRegressionCurveContainer->getRegressionCurves().getLength() != 0;
+    return xRegressionCurveContainer->getRegressionCurves().hasElements();
 }
 
 void setTrendlineVisible(const css::uno::Reference<css::frame::XModel>&
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index e4917d002df7..c2ec355441b7 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -699,7 +699,7 @@ ErrCode XMLFilter::impl_ExportStream(
         // set Base URL
         {
             uno::Reference< beans::XPropertySet > xInfoSet;
-            if( rFilterProperties.getLength() > 0 )
+            if( rFilterProperties.hasElements() )
                 rFilterProperties.getConstArray()[0] >>= xInfoSet;
             OSL_ENSURE( xInfoSet.is(), "missing infoset for export" );
             if( xInfoSet.is() )
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] );
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index e20d23494f63..c3710e45d7d4 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -84,7 +84,7 @@ void lcl_ensureCorrectLabelPlacement( const Reference< beans::XPropertySet >& xP
         {
             uno::Any aNewValue;
             //otherwise use the first supported one
-            if( rAvailablePlacements.getLength() )
+            if( rAvailablePlacements.hasElements() )
                 aNewValue <<=rAvailablePlacements[0];
             xProp->setPropertyValue( "LabelPlacement", aNewValue );
         }
@@ -110,7 +110,7 @@ void lcl_ensureCorrectMissingValueTreatment( const Reference< chart2::XDiagram >
         uno::Sequence < sal_Int32 > aAvailableMissingValueTreatment(
             ::chart::ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ) );
 
-        if( aAvailableMissingValueTreatment.getLength() )
+        if( aAvailableMissingValueTreatment.hasElements() )
             xDiaProp->setPropertyValue( "MissingValueTreatment", uno::Any( aAvailableMissingValueTreatment[0] ) );
         else
             xDiaProp->setPropertyValue( "MissingValueTreatment", uno::Any() );
@@ -321,7 +321,7 @@ sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
             xCooSysCnt->getCoordinateSystems());
 
         // need to have at least one coordinate system
-        bResult = (aCooSysSeq.getLength() > 0);
+        bResult = aCooSysSeq.hasElements();
         if( bResult )
         {
             Sequence< Reference< XChartType > > aFormerlyUsedChartTypes;
@@ -488,7 +488,7 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram
 
                         uno::Sequence < sal_Int32 > aAvailablePlacements( ChartTypeHelper::getSupportedLabelPlacements(
                             xChartType, isSwapXAndY(), xSeries ) );
-                        if(!aAvailablePlacements.getLength())
+                        if(!aAvailablePlacements.hasElements())
                             continue;
 
                         sal_Int32 nDefaultPlacement = aAvailablePlacements[0];
@@ -555,7 +555,7 @@ void ChartTypeTemplate::createCoordinateSystems(
     Sequence< Reference< XCoordinateSystem > > aCoordinateSystems(
         xOutCooSysCnt->getCoordinateSystems());
 
-    if( aCoordinateSystems.getLength())
+    if( aCoordinateSystems.hasElements())
     {
         bool bOk = true;
         for( sal_Int32 i=0; bOk && i<aCoordinateSystems.getLength(); ++i )
@@ -568,7 +568,7 @@ void ChartTypeTemplate::createCoordinateSystems(
     }
 
     //copy as much info from former coordinate system as possible:
-    if( aCoordinateSystems.getLength() )
+    if( aCoordinateSystems.hasElements() )
     {
         Reference< XCoordinateSystem > xOldCooSys( aCoordinateSystems[0] );
         sal_Int32 nMaxDimensionCount = std::min( xCooSys->getDimension(), xOldCooSys->getDimension() );
@@ -679,7 +679,7 @@ void ChartTypeTemplate::createAxes(
     const Sequence< Reference< XCoordinateSystem > > & rCoordSys )
 {
     //create missing axes
-    if( rCoordSys.getLength() > 0 )
+    if( rCoordSys.hasElements() )
     {
         Reference< XCoordinateSystem > xCooSys( rCoordSys[0] );
         if(!xCooSys.is())
@@ -713,7 +713,7 @@ void ChartTypeTemplate::adaptAxes(
 {
     //adapt properties of existing axes and remove superfluous axes
 
-    if( rCoordSys.getLength() > 0 )
+    if( rCoordSys.hasElements() )
     {
         for( sal_Int32 nCooSysIdx=0; nCooSysIdx < rCoordSys.getLength(); ++nCooSysIdx )
         {
@@ -789,7 +789,7 @@ void ChartTypeTemplate::createChartTypes(
     const Sequence< Reference< XCoordinateSystem > > & rCoordSys,
     const Sequence< Reference< XChartType > >& aOldChartTypesSeq )
 {
-    if( rCoordSys.getLength() == 0 ||
+    if( ! rCoordSys.hasElements() ||
         ! rCoordSys[0].is() )
         return;
 
@@ -797,7 +797,7 @@ void ChartTypeTemplate::createChartTypes(
     {
         sal_Int32 nCooSysIdx=0;
         Reference< XChartType > xCT;
-        if( aSeriesSeq.getLength() == 0 )
+        if( !aSeriesSeq.hasElements() )
         {
             // we need a new chart type
             xCT.set( getChartTypeForNewSeries( aOldChartTypesSeq ));
@@ -817,7 +817,7 @@ void ChartTypeTemplate::createChartTypes(
                     xCT.set( getChartTypeForNewSeries( aOldChartTypesSeq ));
                     Reference< XChartTypeContainer > xCTCnt( rCoordSys[nCooSysIdx], uno::UNO_QUERY_THROW );
                     Sequence< Reference< XChartType > > aCTSeq( xCTCnt->getChartTypes());
-                    if( aCTSeq.getLength())
+                    if( aCTSeq.hasElements())
                     {
                         aCTSeq[0] = xCT;
                         xCTCnt->setChartTypes( aCTSeq );
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index da606f6ce424..8b357a852e8b 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -161,7 +161,7 @@ void ColumnLineChartTypeTemplate::createChartTypes(
     const Sequence< Reference< XCoordinateSystem > > & rCoordSys,
     const Sequence< Reference< XChartType > >& aOldChartTypesSeq )
 {
-    if( rCoordSys.getLength() == 0 ||
+    if( ! rCoordSys.hasElements() ||
         ! rCoordSys[0].is() )
         return;
 
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index a0b1d9641f2f..e90b2f083ace 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -353,7 +353,7 @@ bool DataInterpreter::HasCategories(
 {
     bool bHasCategories = false;
 
-    if( rArguments.getLength() > 0 )
+    if( rArguments.hasElements() )
         GetProperty( rArguments, "HasCategories" ) >>= bHasCategories;
 
     for( sal_Int32 nLSeqIdx=0; ! bHasCategories && nLSeqIdx<rData.getLength(); ++nLSeqIdx )
@@ -365,7 +365,7 @@ bool DataInterpreter::HasCategories(
 bool DataInterpreter::UseCategoriesAsX( const Sequence< beans::PropertyValue > & rArguments )
 {
     bool bUseCategoriesAsX = true;
-    if( rArguments.getLength() > 0 )
+    if( rArguments.hasElements() )
         GetProperty( rArguments, "UseCategoriesAsX" ) >>= bUseCategoriesAsX;
     return bUseCategoriesAsX;
 }
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 25b97c2a3a90..56acc536f39e 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -261,7 +261,7 @@ void PieChartTypeTemplate::createChartTypes(
     const Sequence< Reference< chart2::XCoordinateSystem > > & rCoordSys,
     const Sequence< Reference< chart2::XChartType > >& /* aOldChartTypesSeq */ )
 {
-    if( rCoordSys.getLength() == 0 ||
+    if( ! rCoordSys.hasElements() ||
         ! rCoordSys[0].is() )
         return;
 
@@ -281,7 +281,7 @@ void PieChartTypeTemplate::createChartTypes(
         Reference< chart2::XChartTypeContainer > xCTCnt( rCoordSys[0], uno::UNO_QUERY_THROW );
         xCTCnt->setChartTypes( Sequence< Reference< chart2::XChartType > >( &xCT, 1 ));
 
-        if( aSeriesSeq.getLength() > 0 )
+        if( aSeriesSeq.hasElements() )
         {
             Reference< chart2::XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
             Sequence< Reference< chart2::XDataSeries > > aFlatSeriesSeq( FlattenSequence( aSeriesSeq ));
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 8b4f6552b1c4..807cc6dd7dfd 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -303,7 +303,7 @@ void StockChartTypeTemplate::createChartTypes(
     const Sequence< Reference< XCoordinateSystem > > & rCoordSys,
     const Sequence< Reference< XChartType > >& /* aOldChartTypesSeq */ )
 {
-    if( rCoordSys.getLength() < 1 )
+    if( !rCoordSys.hasElements() )
         return;
 
     try
@@ -333,7 +333,7 @@ void StockChartTypeTemplate::createChartTypes(
             aChartTypeVec.push_back( xCT );
 
             if( aSeriesSeq.getLength() > nSeriesIndex &&
-                aSeriesSeq[nSeriesIndex].getLength() > 0 )
+                aSeriesSeq[nSeriesIndex].hasElements() )
             {
                 Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
                 xDSCnt->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
@@ -355,7 +355,7 @@ void StockChartTypeTemplate::createChartTypes(
         }
 
         if( aSeriesSeq.getLength() > nSeriesIndex &&
-            aSeriesSeq[ nSeriesIndex ].getLength() > 0 )
+            aSeriesSeq[ nSeriesIndex ].hasElements() )
         {
             Reference< XDataSeriesContainer > xDSCnt( xCT, uno::UNO_QUERY_THROW );
             xDSCnt->setDataSeries( aSeriesSeq[ nSeriesIndex ] );
@@ -364,7 +364,7 @@ void StockChartTypeTemplate::createChartTypes(
 
         // Lines (remaining series)
         if( aSeriesSeq.getLength() > nSeriesIndex &&
-            aSeriesSeq[ nSeriesIndex ].getLength() > 0 )
+            aSeriesSeq[ nSeriesIndex ].hasElements() )
         {
             xCT.set(
                 xFact->createInstance(
diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx
index cb36912c67bd..d2ad7b296604 100644
--- a/chart2/source/model/template/StockDataInterpreter.cxx
+++ b/chart2/source/model/template/StockDataInterpreter.cxx
@@ -283,7 +283,7 @@ sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
     {
         OSL_ASSERT( aInterpretedData.Series.getLength() > (bHasVolume ? 1 : 0));
         Sequence< Reference< XDataSeries > > aSeries( aInterpretedData.Series[(bHasVolume ? 1 : 0)] );
-        if(!aSeries.getLength())
+        if(!aSeries.hasElements())
             return false;
         for( sal_Int32 i=0; i<aSeries.getLength(); ++i )
         {
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 0a1091a579c1..607bc41d187b 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -568,7 +568,7 @@ bool AxisHelper::isGridShown( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex,
     else
     {
         Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
-        if( aSubGrids.getLength() )
+        if( aSubGrids.hasElements() )
             bRet = AxisHelper::isGridVisible( aSubGrids[0] );
     }
 
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index 1341075e9f91..78641ccb9011 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -346,17 +346,17 @@ void SAL_CALL CachedDataSequence::initialize(const uno::Sequence< uno::Any > & _
 {
     ::comphelper::SequenceAsHashMap aMap(_aArguments);
     m_aNumericalSequence = aMap.getUnpackedValueOrDefault( "DataSequence" ,m_aNumericalSequence);
-    if ( m_aNumericalSequence.getLength() )
+    if ( m_aNumericalSequence.hasElements() )
         m_eCurrentDataType = NUMERICAL;
     else
     {
         m_aTextualSequence = aMap.getUnpackedValueOrDefault( "DataSequence" ,m_aTextualSequence);
-        if ( m_aTextualSequence.getLength() )
+        if ( m_aTextualSequence.hasElements() )
             m_eCurrentDataType = TEXTUAL;
         else
         {
             m_aMixedSequence = aMap.getUnpackedValueOrDefault( "DataSequence" ,m_aMixedSequence);
-            if ( m_aMixedSequence.getLength() )
+            if ( m_aMixedSequence.hasElements() )
                 m_eCurrentDataType = MIXED;
         }
     }
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index 8140adf1477b..6d59b6831911 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -110,7 +110,7 @@ uno::Reference< XCoordinateSystem > ChartModelHelper::getFirstCoordinateSystem(
     if( xCooSysCnt.is() )
     {
         uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() );
-        if( aCooSysSeq.getLength() )
+        if( aCooSysSeq.hasElements() )
             XCooSys = aCooSysSeq[0];
     }
     return XCooSys;
@@ -123,7 +123,7 @@ uno::Reference< XCoordinateSystem > ChartModelHelper::getFirstCoordinateSystem(
     if( xCooSysCnt.is() )
     {
         uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() );
-        if( aCooSysSeq.getLength() )
+        if( aCooSysSeq.hasElements() )
             XCooSys = aCooSysSeq[0];
     }
     return XCooSys;
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 84cf07235ddf..c833a311c056 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -93,7 +93,7 @@ uno::Any ChartConfigItem::getProperty( const OUString & aPropertyName )
 {
     Sequence< uno::Any > aValues(
         GetProperties( Sequence< OUString >( &aPropertyName, 1 )));
-    if( ! aValues.getLength())
+    if( ! aValues.hasElements())
         return uno::Any();
     return aValues[0];
 }
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<sal_Int32> aHiddenIndicesSeq;
             xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenIndicesSeq;
-            if( aHiddenIndicesSeq.getLength() )
+            if( aHiddenIndicesSeq.hasElements() )
             {
                 auto aHiddenIndices( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( aHiddenIndicesSeq ) );
                 std::sort( aHiddenIndices.begin(), aHiddenIndices.end() );
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 0631bd1f47b0..4b124aea28a4 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -182,7 +182,7 @@ uno::Sequence< beans::PropertyValue > DataSourceHelper::createArguments(
         beans::PropertyValue( "CellRangeRepresentation"
                               , -1, uno::Any( rRangeRepresentation )
                               , beans::PropertyState_DIRECT_VALUE );
-    if( rSequenceMapping.getLength() )
+    if( rSequenceMapping.hasElements() )
     {
         aArguments.realloc( aArguments.getLength() + 1 );
         aArguments[aArguments.getLength() - 1] =
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index f7249ceabf54..7720089ecbaa 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -279,7 +279,7 @@ void DiagramHelper::setStackMode(
             if( !xChartTypeContainer.is() )
                 continue;
             uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
-            if (!aChartTypeList.getLength())
+            if (!aChartTypeList.hasElements())
                 continue;
 
             uno::Reference< XChartType > xChartType( aChartTypeList[0] );
@@ -939,7 +939,7 @@ static void lcl_generateAutomaticCategoriesFromChartType(
             if( !xValueSeq.is() )
                 continue;
             rRet = xValueSeq->generateLabel( chart2::data::LabelOrigin_LONG_SIDE );
-            if( rRet.getLength() )
+            if( rRet.hasElements() )
                 return;
         }
     }
@@ -956,7 +956,7 @@ Sequence< OUString > DiagramHelper::generateAutomaticCategoriesFromCooSys( const
         for( sal_Int32 nN=0; nN<aChartTypes.getLength(); nN++ )
         {
             lcl_generateAutomaticCategoriesFromChartType( aRet, aChartTypes[nN] );
-            if( aRet.getLength() )
+            if( aRet.hasElements() )
                 return aRet;
         }
     }
@@ -1036,7 +1036,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c
                     //set a date format to the axis
                     const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper();
                     Sequence<sal_Int32> aKeySeq = xNumberFormats->queryKeys( util::NumberFormat::DATE,  rLocaleDataWrapper.getLanguageTag().getLocale(), true/*bCreate*/ );
-                    if( aKeySeq.getLength() )
+                    if( aKeySeq.hasElements() )
                     {
                         xAxisProps->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any(aKeySeq[0]));
                     }
@@ -1140,7 +1140,7 @@ sal_Int32 DiagramHelper::getDateNumberFormat( const Reference< util::XNumberForm
         {
             Sequence<sal_Int32> aKeySeq = xNumberFormats->queryKeys( util::NumberFormat::DATE,
                     rLanguageTag.getLocale(), true/*bCreate */);
-            if( aKeySeq.getLength() )
+            if( aKeySeq.hasElements() )
             {
                 nRet = aKeySeq[0];
             }
@@ -1186,7 +1186,7 @@ sal_Int32 DiagramHelper::getPercentNumberFormat( const Reference< util::XNumberF
         {
             Sequence<sal_Int32> aKeySeq = xNumberFormats->queryKeys( util::NumberFormat::PERCENT,
                     rLanguageTag.getLocale(), true/*bCreate*/ );
-            if( aKeySeq.getLength() )
+            if( aKeySeq.hasElements() )
             {
                 // This *assumes* the sequence is sorted as in
                 // NfIndexTableOffset and the first format is the integer 0%
@@ -1385,7 +1385,7 @@ bool lcl_moveSeriesOrCheckIfMoveIsAllowed(
                                             if( xOtherDataSeriesContainer.is() )
                                             {
                                                 uno::Sequence< uno::Reference< XDataSeries > > aOtherSeriesList( xOtherDataSeriesContainer->getDataSeries() );
-                                                if( 0 < aOtherSeriesList.getLength() )
+                                                if( aOtherSeriesList.hasElements() )
                                                 {
                                                     uno::Reference< XDataSeries > xExchangeSeries( aOtherSeriesList[0] );
                                                     aOtherSeriesList[0] = xGivenDataSeries;
@@ -1558,7 +1558,7 @@ sal_Int32 DiagramHelper::getCorrectedMissingValueTreatment(
     }
 
     //otherwise use the first supported one
-    if( aAvailableMissingValueTreatments.getLength() )
+    if( aAvailableMissingValueTreatments.hasElements() )
     {
         nResult = aAvailableMissingValueTreatments[0];
         return nResult;
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index 37d59ea2e500..b6652e25f11d 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -112,7 +112,7 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2:
                     }
                 }
             }
-            if( !m_aSplitCategoriesList.getLength() )
+            if( !m_aSplitCategoriesList.hasElements() )
             {
                 m_aSplitCategoriesList.realloc(1);
                 m_aSplitCategoriesList[0]=m_xOriginalCategories;
@@ -506,7 +506,7 @@ Sequence< OUString > const & ExplicitCategoriesProvider::getSimpleCategories()
                     SplitCategoriesProvider_ForLabeledDataSequences( m_aSplitCategoriesList, mrModel ), m_aComplexCats );
             }
         }
-        if(!m_aExplicitCategories.getLength())
+        if(!m_aExplicitCategories.hasElements())
             m_aExplicitCategories = DiagramHelper::generateAutomaticCategoriesFromCooSys( m_xCooSysModel );
         m_bIsExplicitCategoriesInited = true;
     }
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 9fdd59d66fbb..86c163e02c4e 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -915,7 +915,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
                 aData = m_aInternalData.getColumnValues(nIndex);
             else
                 aData = m_aInternalData.getRowValues(nIndex);
-            if( aData.getLength() )
+            if( aData.hasElements() )
             {
                 aResult.realloc( aData.getLength());
                 transform( aData.begin(), aData.end(),
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 475069bacdd9..5d3d41a0a0f0 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -217,8 +217,8 @@ void RegressionCurveHelper::initializeCurveCalculator(
     }
 
     if( bXValuesFound && bYValuesFound &&
-        aXValues.getLength() > 0 &&
-        aYValues.getLength() > 0 )
+        aXValues.hasElements() &&
+        aYValues.hasElements() )
         xOutCurveCalculator->recalculateRegression( aXValues, aYValues );
 }
 
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index a388d5e74677..c6b95d8c238a 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -354,7 +354,7 @@ void TitleHelper::setCompleteString( const OUString& rNewText
     uno::Sequence< uno::Reference< XFormattedString > > aNewStringList(1);
 
     uno::Sequence< uno::Reference< XFormattedString > >  aOldStringList = xTitle->getText();
-    if( aOldStringList.getLength() )
+    if( aOldStringList.hasElements() )
     {
         aNewStringList[0].set( aOldStringList[0] );
         aNewStringList[0]->setString( aNewText );
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index 75bb8b68594f..959fe5ef5d70 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -234,7 +234,7 @@ void SAL_CALL WrappedPropertySet::setPropertyValues( const Sequence< OUString >&
 Sequence< Any > SAL_CALL WrappedPropertySet::getPropertyValues( const Sequence< OUString >& rNameSeq )
 {
     Sequence< Any > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
@@ -306,7 +306,7 @@ const WrappedProperty* WrappedPropertySet::getWrappedProperty( sal_Int32 nHandle
 Sequence< beans::PropertyState > SAL_CALL WrappedPropertySet::getPropertyStates( const Sequence< OUString >& rNameSeq )
 {
     Sequence< beans::PropertyState > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
@@ -366,7 +366,7 @@ void SAL_CALL WrappedPropertySet::setPropertiesToDefault( const Sequence< OUStri
 Sequence< Any > SAL_CALL WrappedPropertySet::getPropertyDefaults( const Sequence< OUString >& rNameSeq )
 {
     Sequence< Any > aRetSeq;
-    if( rNameSeq.getLength() )
+    if( rNameSeq.hasElements() )
     {
         aRetSeq.realloc( rNameSeq.getLength() );
         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
diff --git a/chart2/source/view/axes/VCartesianGrid.cxx b/chart2/source/view/axes/VCartesianGrid.cxx
index 7699f1d493d0..45df4131faff 100644
--- a/chart2/source/view/axes/VCartesianGrid.cxx
+++ b/chart2/source/view/axes/VCartesianGrid.cxx
@@ -179,7 +179,7 @@ void VCartesianGrid::fillLinePropertiesFromGridModel( std::vector<VLinePropertie
                                      , const Sequence< Reference< beans::XPropertySet > > & rGridPropertiesList )
 {
     rLinePropertiesList.clear();
-    if( !rGridPropertiesList.getLength() )
+    if( !rGridPropertiesList.hasElements() )
         return;
 
     VLineProperties aLineProperties;
@@ -195,7 +195,7 @@ void VCartesianGrid::fillLinePropertiesFromGridModel( std::vector<VLinePropertie
 
 void VCartesianGrid::createShapes()
 {
-    if(!m_aGridPropertiesList.getLength())
+    if(!m_aGridPropertiesList.hasElements())
         return;
     //somehow equal to axis tickmarks
 
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index 78f13b463322..46d176b6d91b 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -218,7 +218,7 @@ void VPolarGrid::createShapes()
     OSL_PRECOND(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized");
     if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
         return;
-    if(!m_aGridPropertiesList.getLength())
+    if(!m_aGridPropertiesList.hasElements())
         return;
 
     //create all scaled tickmark values
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 2699121ed357..a50a4e39ba09 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -740,7 +740,7 @@ void AreaChart::createShapes()
                             sal_Int32& rIndex = pSeries->m_nPolygonIndex;
                             if( 0<= rIndex && rIndex < rPolygon.SequenceX.getLength() )
                             {
-                                if( rPolygon.SequenceX[ rIndex ].getLength() )
+                                if( rPolygon.SequenceX[ rIndex ].hasElements() )
                                     rIndex++; //start a new polygon for the next point if the current poly is not empty
                             }
                         }
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index d869d7ca44d1..4f84f2b01a33 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -272,7 +272,7 @@ void CandleStickChart::createShapes()
                             AddPointToPoly( aPoly, aPosRightLast, nLineIndex );
                         }
 
-                        if( aPoly.SequenceX.getLength() )
+                        if( aPoly.SequenceX.hasElements() )
                         {
                             uno::Reference< drawing::XShape > xShape =
                                 m_pShapeFactory->createLine2D( xPointGroupShape_Shapes,
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index c2d1026f5d9f..75a82ab18cfd 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -441,7 +441,7 @@ void NetChart::createShapes()
                             sal_Int32& rIndex = pSeries->m_nPolygonIndex;
                             if( 0<= rIndex && rIndex < rPolygon.SequenceX.getLength() )
                             {
-                                if( rPolygon.SequenceX[ rIndex ].getLength() )
+                                if( rPolygon.SequenceX[ rIndex ].hasElements() )
                                     rIndex++; //start a new polygon for the next point if the current poly is not empty
                             }
                         }
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 350254c14764..0a47f0ddcd88 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1399,7 +1399,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
         m_pPosHelper->transformScaledLogicToScene( aRegressionPoly );
 
         awt::Point aDefaultPos;
-        if( aRegressionPoly.SequenceX.getLength() && aRegressionPoly.SequenceX[0].getLength() )
+        if( aRegressionPoly.SequenceX.hasElements() && aRegressionPoly.SequenceX[0].hasElements() )
         {
             VLineProperties aVLineProperties;
             aVLineProperties.initFromPropertySet( xProperties );
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index f14dfd978a4d..bb73719ec708 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -906,7 +906,7 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel&
                     aExplicitIncrementDest.Distance = aExplicitIncrementSource.Distance;
 
                 bool bAutoMinorInterval = true;
-                if( aScale.IncrementData.SubIncrements.getLength() )
+                if( aScale.IncrementData.SubIncrements.hasElements() )
                     bAutoMinorInterval = !( aScale.IncrementData.SubIncrements[0].IntervalCount.hasValue() );
                 if( bAutoMinorInterval )
                 {
@@ -1865,7 +1865,7 @@ bool lcl_getPropertySwapXAndYAxis( const uno::Reference< XDiagram >& xDiagram )
     if( xCooSysContainer.is() )
     {
         uno::Sequence< uno::Reference< XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
-        if( aCooSysList.getLength() )
+        if( aCooSysList.hasElements() )
         {
             uno::Reference<beans::XPropertySet> xProp(aCooSysList[0], uno::UNO_QUERY );
             if( xProp.is()) try
@@ -2886,7 +2886,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService
 
 Reference< uno::XInterface > ChartView::createInstanceWithArguments( const OUString& ServiceSpecifier, const uno::Sequence< uno::Any >& Arguments )
 {
-    OSL_ENSURE( Arguments.getLength(), "ChartView::createInstanceWithArguments: arguments are ignored" );
+    OSL_ENSURE( Arguments.hasElements(), "ChartView::createInstanceWithArguments: arguments are ignored" );
     return createInstance( ServiceSpecifier );
 }
 
diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx
index 547539ded363..463b74975a91 100644
--- a/chart2/source/view/main/Clipping.cxx
+++ b/chart2/source/view/main/Clipping.cxx
@@ -215,7 +215,7 @@ void Clipping::clipPolygonAtRectangle( const drawing::PolyPolygonShape3D& rPolyg
     aResult.SequenceY.realloc(0);
     aResult.SequenceZ.realloc(0);
 
-    if(!rPolygon.SequenceX.getLength())
+    if(!rPolygon.SequenceX.hasElements())
         return;
 
     //need clipping?:
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index e54788dad0a9..e52ec392f756 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -701,7 +701,7 @@ uno::Reference<drawing::XShape>
 
 static void appendAndCloseBezierCoords( drawing::PolyPolygonBezierCoords& rReturn, const drawing::PolyPolygonBezierCoords& rAdd, bool bAppendInverse )
 {
-    if(!rAdd.Coordinates.getLength())
+    if(!rAdd.Coordinates.hasElements())
         return;
     sal_Int32 nAddCount = rAdd.Coordinates[0].getLength();
     if(!nAddCount)
@@ -1063,7 +1063,7 @@ uno::Reference< drawing::XShape >
     if( !xTarget.is() )
         return nullptr;
 
-    if( !rPolyPolygon.SequenceX.getLength())
+    if( !rPolyPolygon.SequenceX.hasElements())
         return nullptr;
 
     //create shape
@@ -1097,7 +1097,7 @@ uno::Reference< drawing::XShape >
             //so we need to translate the object via transformation matrix
 
             //Matrix for position
-            if (rPolyPolygon.SequenceZ.getLength()&& rPolyPolygon.SequenceZ[0].getLength())
+            if (rPolyPolygon.SequenceZ.hasElements()&& rPolyPolygon.SequenceZ[0].hasElements())
             {
                 basegfx::B3DHomMatrix aM;
                 aM.translate(0, 0, rPolyPolygon.SequenceZ[0][0]);
@@ -1908,7 +1908,7 @@ uno::Reference< drawing::XShape >
     if( !xTarget.is() )
         return nullptr;
 
-    if(!rPoints.SequenceX.getLength())
+    if(!rPoints.SequenceX.hasElements())
         return nullptr;
 
     //create shape
@@ -1983,7 +1983,7 @@ uno::Reference< drawing::XShape >
     if( !xTarget.is() )
         return nullptr;
 
-    if(!rPoints.getLength())
+    if(!rPoints.hasElements())
         return nullptr;
 
     //create shape
@@ -2433,7 +2433,7 @@ uno::Reference< drawing::XShape >
         if(bStackCharacters)
         {
             //if the characters should be stacked we use only the first character properties for code simplicity
-            if( xFormattedString.getLength()>0 )
+            if( xFormattedString.hasElements() )
             {
                 OUString aLabel;
                 for( sal_Int32 nN=0; nN<xFormattedString.getLength();nN++ )
@@ -2470,7 +2470,7 @@ uno::Reference< drawing::XShape >
             bool bHasRefPageSize =
                 ( xTextProperties->getPropertyValue( "ReferencePageSize") >>= aOldRefSize );
 
-            if( xFormattedString.getLength()>0 )
+            if( xFormattedString.hasElements() )
             {
                 uno::Reference< beans::XPropertySet > xTargetProps( xShape, uno::UNO_QUERY );
                 uno::Reference< beans::XPropertySet > xSourceProps( xFormattedString[0], uno::UNO_QUERY );
@@ -2648,7 +2648,7 @@ bool ShapeFactory::hasPolygonAnyLines( drawing::PolyPolygonShape3D& rPoly)
 bool ShapeFactory::isPolygonEmptyOrSinglePoint( drawing::PolyPolygonShape3D& rPoly)
 {
     // true, if empty polypolygon or one polygon with one point
-    return (rPoly.SequenceX.getLength() == 0) ||
+    return !rPoly.SequenceX.hasElements() ||
         ((rPoly.SequenceX.getLength() == 1) && (rPoly.SequenceX[0].getLength() <= 1));
 }
 
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 6d9b7d11196c..e93c2fc18676 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -267,7 +267,7 @@ VDataSeries::~VDataSeries()
 
 void VDataSeries::doSortByXValues()
 {
-    if( m_aValues_X.is() && m_aValues_X.Doubles.getLength() )
+    if( m_aValues_X.is() && m_aValues_X.Doubles.hasElements() )
     {
         //prepare a vector for sorting
         std::vector< std::vector< double > > aTmp;//outer vector are points, inner vector are the different values of the point
@@ -498,7 +498,7 @@ void VDataSeries::getMinMaxXValue(double& fMin, double& fMax) const
 
     uno::Sequence< double > aValuesX = getAllX();
 
-    if(aValuesX.getLength() > 0)
+    if(aValuesX.hasElements())
     {
         sal_Int32 i = 0;
         while ( i < aValuesX.getLength() && ::rtl::math::isNan(aValuesX[i]) )
@@ -619,7 +619,7 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe
                 return nLabelPlacement; //ok
 
         //otherwise use the first supported one
-        if( aAvailablePlacements.getLength() )
+        if( aAvailablePlacements.hasElements() )
         {
             nLabelPlacement = aAvailablePlacements[0];
             return nLabelPlacement;
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index 27febe8fde69..4d7077c6de31 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -105,7 +105,7 @@ void VTitle::createShapes(
         return;
 
     uno::Sequence< uno::Reference< XFormattedString > > aStringList = m_xTitle->getText();
-    if(aStringList.getLength()<=0)
+    if(!aStringList.hasElements())
         return;
 
     m_nXPos = rPos.X;
diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx
index 5ad36c5eb615..928456bd79f3 100644
--- a/comphelper/source/compare/AnyCompareFactory.cxx
+++ b/comphelper/source/compare/AnyCompareFactory.cxx
@@ -96,7 +96,7 @@ Reference< XAnyCompare > SAL_CALL AnyCompareFactory::createAnyCompareByName( con
 
 void SAL_CALL AnyCompareFactory::initialize( const Sequence< Any >& aArguments )
 {
-    if( aArguments.getLength() )
+    if( aArguments.hasElements() )
     {
         if( aArguments[0] >>= m_Locale )
         {
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index 4c97c6718cea..fef9a74f90b5 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -351,7 +351,7 @@ namespace comphelper
         m_aData.m_pValues.reset( new KeyedValues( *m_aData.m_pKeyCompare ) );
         m_aData.m_bMutable = bMutable;
 
-        if ( aInitialValues.getLength() )
+        if ( aInitialValues.hasElements() )
             impl_initValues_throw( aInitialValues );
 
         setInitialized();
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 9134e7d050a2..7bae3a77aaf0 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -60,7 +60,7 @@ static uno::Sequence< sal_Int8 > GeneratePBKDF2Hash( const OUString& aPassword,
 {
     uno::Sequence< sal_Int8 > aResult;
 
-    if ( !aPassword.isEmpty() && aSalt.getLength() && nCount && nHashLength )
+    if ( !aPassword.isEmpty() && aSalt.hasElements() && nCount && nHashLength )
     {
         OString aBytePass = OUStringToOString( aPassword, RTL_TEXTENCODING_UTF8 );
         // FIXME this is subject to the SHA1-bug tdf#114939 - see also
@@ -92,7 +92,7 @@ uno::Sequence< beans::PropertyValue > DocPasswordHelper::GenerateNewModifyPasswo
     sal_Int32 const nPBKDF2IterationCount = 100000;
 
     uno::Sequence< sal_Int8 > aNewHash = GeneratePBKDF2Hash(aPassword, aSalt, nPBKDF2IterationCount, 16);
-    if ( aNewHash.getLength() )
+    if ( aNewHash.hasElements() )
     {
         aResult.realloc( 4 );
         aResult[0].Name = "algorithm-name";
@@ -112,7 +112,7 @@ uno::Sequence< beans::PropertyValue > DocPasswordHelper::GenerateNewModifyPasswo
 bool DocPasswordHelper::IsModifyPasswordCorrect( const OUString& aPassword, const uno::Sequence< beans::PropertyValue >& aInfo )
 {
     bool bResult = false;
-    if ( !aPassword.isEmpty() && aInfo.getLength() )
+    if ( !aPassword.isEmpty() && aInfo.hasElements() )
     {
         OUString sAlgorithm;
         uno::Sequence< sal_Int8 > aSalt;
@@ -131,7 +131,7 @@ bool DocPasswordHelper::IsModifyPasswordCorrect( const OUString& aPassword, cons
                 aInfo[nInd].Value >>= aHash;
         }
 
-        if ( sAlgorithm == "PBKDF2" && aSalt.getLength() && nCount > 0 && aHash.getLength() )
+        if ( sAlgorithm == "PBKDF2" && aSalt.hasElements() && nCount > 0 && aHash.hasElements() )
         {
             uno::Sequence< sal_Int8 > aNewHash = GeneratePBKDF2Hash( aPassword, aSalt, nCount, aHash.getLength() );
             for ( sal_Int32 nInd = 0; nInd < aNewHash.getLength() && nInd < aHash.getLength() && aNewHash[nInd] == aHash[nInd]; nInd ++ )
@@ -446,7 +446,7 @@ OUString DocPasswordHelper::GetOoxHashAsBase64(
     // try media encryption data (skip, if result is OK or ABORT)
     if( eResult == DocPasswordVerifierResult::WrongPassword )
     {
-        if( rMediaEncData.getLength() > 0 )
+        if( rMediaEncData.hasElements() )
         {
             eResult = rVerifier.verifyEncryptionData( rMediaEncData );
             if( eResult == DocPasswordVerifierResult::OK )
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 5d7249c5f04b..24e5626e4593 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -422,7 +422,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByMedi
 {
     uno::Sequence< beans::NamedValue > aObject =
                                     GetObjectPropsByStringClassID( GetExplicitlyRegisteredObjClassID( aMediaType ) );
-    if ( aObject.getLength() )
+    if ( aObject.hasElements() )
         return aObject;
 
     OUString aDocumentName = GetDocServiceNameFromMediaType( aMediaType );
@@ -802,7 +802,7 @@ OUString MimeConfigurationHelper::GetExportFilterFromImportFilter( const OUStrin
                             SfxFilterFlags::EXPORT,
                             SfxFilterFlags::INTERNAL );
 
-                        if ( aExportFilterProps.getLength() )
+                        if ( aExportFilterProps.hasElements() )
                         {
                             SequenceAsHashMap aExpPropsHM( aExportFilterProps );
                             aExportFilterName = aExpPropsHM.getUnpackedValueOrDefault( "Name", OUString() );
@@ -849,7 +849,7 @@ uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter(
                         aFilterProps = aProps;
                         break;
                     }
-                    else if ( !aFilterProps.getLength() )
+                    else if ( !aFilterProps.hasElements() )
                         aFilterProps = aProps;
                 }
             }
diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx
index 241826c056c1..26cf2f6e3d70 100644
--- a/comphelper/source/property/ChainablePropertySetInfo.cxx
+++ b/comphelper/source/property/ChainablePropertySetInfo.cxx
@@ -45,7 +45,7 @@ ChainablePropertySetInfo::~ChainablePropertySetInfo()
 void ChainablePropertySetInfo::remove( const OUString& aName )
 {
     maMap.erase ( aName );
-    if ( maProperties.getLength() )
+    if ( maProperties.hasElements() )
          maProperties.realloc( 0 );
 }
 
diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx
index a64f3973c772..6aa017de92da 100644
--- a/comphelper/source/property/MasterPropertySetInfo.cxx
+++ b/comphelper/source/property/MasterPropertySetInfo.cxx
@@ -46,7 +46,7 @@ MasterPropertySetInfo::~MasterPropertySetInfo()
 
 void MasterPropertySetInfo::add( PropertyInfoHash &rHash, sal_uInt8 nMapId )
 {
-    if( maProperties.getLength() )
+    if( maProperties.hasElements() )
         maProperties.realloc( 0 );
 
     for( const auto& rObj : rHash )
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index f096c61ad248..21f097531363 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -379,7 +379,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
 
             m_aElementsSeq.push_back( aName );
 
-            if ( !m_aResultSeq.getLength() )
+            if ( !m_aResultSeq.hasElements() )
                 m_aResultSeq.realloc( 2 );
 
             return; // nothing to do
@@ -392,7 +392,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
 
             m_aElementsSeq.push_back( aName );
 
-            if ( !m_aResultSeq.getLength() )
+            if ( !m_aResultSeq.hasElements() )
                 m_aResultSeq.realloc( 2 );
 
             if ( m_aResultSeq.getLength() != 2 )
@@ -420,7 +420,7 @@ void SAL_CALL OFOPXMLHelper_Impl::startElement( const OUString& aName, const uno
 
             m_aElementsSeq.push_back( aName );
 
-            if ( !m_aResultSeq.getLength() )
+            if ( !m_aResultSeq.hasElements() )
                 m_aResultSeq.realloc( 2 );
 
             if ( m_aResultSeq.getLength() != 2 )
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 1f07df1b3d87..b2fcb3cf9ad0 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1206,7 +1206,7 @@ css::uno::Reference< css::uno::XInterface > Access::createInstanceWithArguments(
     css::uno::Sequence< css::uno::Any > const & aArguments)
 {
     assert(thisIs(IS_SET|IS_UPDATE));
-    if (aArguments.getLength() != 0) {
+    if (aArguments.hasElements()) {
         throw css::uno::Exception(
             ("configuration SimpleSetUpdate createInstanceWithArguments"
              " must not specify any arguments"),
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index 1adcadafdb77..a4da5152cd48 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -395,7 +395,7 @@ Factory::createInstanceWithArgumentsAndContext(
     css::uno::Sequence< css::uno::Any > const & Arguments,
     css::uno::Reference< css::uno::XComponentContext > const & Context)
 {
-    if (Arguments.getLength() == 0) {
+    if (!Arguments.hasElements()) {
         return css::configuration::theDefaultProvider::get(Context);
     } else {
         OUString locale;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index d8a65d0cd241..f5dd3b61fcd2 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2302,7 +2302,7 @@ namespace
             aProps[0].Value     <<= sNewName;
             Sequence< Any > aValues;
             aContent.executeCommand( "setPropertyValues",makeAny(aProps) ) >>= aValues;
-            if(aValues.getLength() && aValues[0].hasValue())
+            if(aValues.hasElements() && aValues[0].hasValue())
                 throw Exception("setPropertyValues returned non-zero", nullptr);
         }
         catch(const Exception&)
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index f3fad5ff3636..1b3a1692b0c8 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1319,7 +1319,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
             "WHERE ");
 
     // TODO: GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, SYNONYM
-    if ((types.getLength() == 0) || (types.getLength() == 1 && types[0].match(wld)))
+    if (!types.hasElements() || (types.getLength() == 1 && types[0].match(wld)))
     {
         // All table types? I.e. includes system tables.
         queryBuf.append("(RDB$RELATION_TYPE = 0 OR RDB$RELATION_TYPE = 1) ");
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 9a3dd6bf2955..4c600cf2e767 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -578,7 +578,7 @@ namespace
     bool lcl_setSystemProperties_nothrow( const java::sql::ConnectionLog& _rLogger,
         JNIEnv& _rEnv, const Sequence< NamedValue >& _rSystemProperties )
     {
-        if ( _rSystemProperties.getLength() == 0 )
+        if ( !_rSystemProperties.hasElements() )
             // nothing to do
             return true;
 
diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx
index 6d3b846f88f8..1c7bfe9660df 100644
--- a/connectivity/source/drivers/jdbc/Reader.cxx
+++ b/connectivity/source/drivers/jdbc/Reader.cxx
@@ -111,7 +111,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( css::uno::Sequence< sal_Int8 >& aD
 
     if (m_buf)
     {
-        if(aData.getLength() == 0)
+        if(!aData.hasElements())
         {
             aData.realloc(1);
             dst = aData.getArray();
diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx
index 29b68991b5f5..77265009d20b 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -183,7 +183,7 @@ jobject connectivity::convertTypeMapToJavaMap(const Reference< css::container::X
     if ( _rMap.is() )
     {
         css::uno::Sequence< OUString > aNames = _rMap->getElementNames();
-        if ( aNames.getLength() > 0 )
+        if ( aNames.hasElements() )
             ::dbtools::throwFeatureNotImplementedSQLException( "Type maps", nullptr );
     }
     return nullptr;
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index 8b5d7b82e477..c9755e762140 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1160,7 +1160,7 @@ Sequence<sal_Int8> OResultSet::impl_getBookmark(  )
 
         Sequence<sal_Int8> bookmark = OTools::getBytesValue(m_pStatement->getOwnConnection(),m_aStatementHandle,0,SQL_C_VARBOOKMARK,m_bWasNull,**this);
         m_aPosToBookmarks[bookmark] = m_nRowPos;
-        OSL_ENSURE(bookmark.getLength(),"Invalid bookmark from length 0!");
+        OSL_ENSURE(bookmark.hasElements(),"Invalid bookmark from length 0!");
         return bookmark;
     }
     else
@@ -1177,8 +1177,8 @@ sal_Bool SAL_CALL OResultSet::moveToBookmark( const  Any& bookmark )
     invalidateCache();
     Sequence<sal_Int8> aBookmark;
     bookmark >>= aBookmark;
-    OSL_ENSURE(aBookmark.getLength(),"Invalid bookmark from length 0!");
-    if(aBookmark.getLength())
+    OSL_ENSURE(aBookmark.hasElements(),"Invalid bookmark from length 0!");
+    if(aBookmark.hasElements())
     {
         SQLRETURN nReturn = setStmtOption<SQLLEN*, SQL_IS_POINTER>(SQL_ATTR_FETCH_BOOKMARK_PTR, reinterpret_cast<SQLLEN*>(aBookmark.getArray()));
 
@@ -1708,7 +1708,7 @@ bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nO
             ensureCacheForColumn(0);
             Sequence<sal_Int8> bookmark  = OTools::getBytesValue(m_pStatement->getOwnConnection(),m_aStatementHandle,0,SQL_C_VARBOOKMARK,m_bWasNull,**this);
             m_aPosToBookmarks[bookmark] = m_nRowPos;
-            OSL_ENSURE(bookmark.getLength(),"Invalid bookmark from length 0!");
+            OSL_ENSURE(bookmark.hasElements(),"Invalid bookmark from length 0!");
             m_aRow[0] = bookmark;
         }
         m_aRow[0].setBound(true);
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 7796cac8cc10..3f3e1c14a4fb 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -710,7 +710,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
         //       in postgresql doc
 
         Sequence< OUString > keyColumnNames = getPrimaryKeyColumnNames( connection, schemaName, tableName );
-        if( keyColumnNames.getLength() )
+        if( keyColumnNames.hasElements() )
         {
             OUStringBuffer buf( 128 );
             buf.append( "SELECT * FROM " );


More information about the Libreoffice-commits mailing list