summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-05-04 23:16:48 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-10 10:55:57 +0200
commit1eb8859813ff43b3753dcbab9e3e0bdfe7d72edb (patch)
tree4e04ab9584a5ef874faf8141c962158c32448d35 /chart2
parentec905d131374f0860bac77c52873eed984b1966f (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')
-rw-r--r--chart2/qa/extras/chart2export.cxx4
-rw-r--r--chart2/source/controller/accessibility/AccessibleChartView.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx10
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx16
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx6
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx8
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartController.cxx2
-rw-r--r--chart2/source/controller/main/ChartDropTargetHelper.cxx2
-rw-r--r--chart2/source/controller/sidebar/ChartElementsPanel.cxx4
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.cxx2
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx2
-rw-r--r--chart2/source/model/main/Axis.cxx2
-rw-r--r--chart2/source/model/main/ChartModel.cxx2
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx2
-rw-r--r--chart2/source/model/main/Diagram.cxx2
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx22
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.cxx2
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx4
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.cxx4
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.cxx8
-rw-r--r--chart2/source/model/template/StockDataInterpreter.cxx2
-rw-r--r--chart2/source/tools/AxisHelper.cxx2
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx6
-rw-r--r--chart2/source/tools/ChartModelHelper.cxx4
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx2
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx8
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx2
-rw-r--r--chart2/source/tools/DiagramHelper.cxx16
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx4
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx2
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx4
-rw-r--r--chart2/source/tools/TitleHelper.cxx2
-rw-r--r--chart2/source/tools/WrappedPropertySet.cxx6
-rw-r--r--chart2/source/view/axes/VCartesianGrid.cxx4
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx2
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx2
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.cxx2
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx2
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx6
-rw-r--r--chart2/source/view/main/Clipping.cxx2
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx16
-rw-r--r--chart2/source/view/main/VDataSeries.cxx6
-rw-r--r--chart2/source/view/main/VTitle.cxx2
53 files changed, 121 insertions, 121 deletions
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;