diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-12 12:13:42 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-13 10:02:02 +0200 |
commit | 1bf1c56ce05a08e09c3f7def4962ef7f7ae885d9 (patch) | |
tree | 7d6548ff3ab14564b8dcca89d170cb1e81391da2 /chart2/source/tools | |
parent | ca7f34acabfbb92e76aa367458056a75bd99991b (diff) |
Remove ContainerHelper.hxx
Use comphelper::sequenceToContainer instead of ContainerHelper::SequenceToVector
Change-Id: I4834255a1349ac7a29127a84a54fcfa98d678d00
Reviewed-on: https://gerrit.libreoffice.org/72186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r-- | chart2/source/tools/DataSeriesHelper.cxx | 9 | ||||
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 5 | ||||
-rw-r--r-- | chart2/source/tools/ErrorBar.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/InternalDataProvider.cxx | 7 | ||||
-rw-r--r-- | chart2/source/tools/PropertyHelper.cxx | 4 | ||||
-rw-r--r-- | chart2/source/tools/RegressionEquation.cxx | 7 |
6 files changed, 16 insertions, 19 deletions
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 389a10ededb8..480c6dafa596 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -19,7 +19,6 @@ #include <DataSeriesHelper.hxx> #include <DataSource.hxx> -#include <ContainerHelper.hxx> #include <unonames.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -517,8 +516,8 @@ void deleteSeries( try { Reference< chart2::XDataSeriesContainer > xSeriesCnt( xChartType, uno::UNO_QUERY_THROW ); - std::vector< Reference< chart2::XDataSeries > > aSeries( - ContainerHelper::SequenceToVector( xSeriesCnt->getDataSeries())); + auto aSeries( + comphelper::sequenceToContainer<std::vector< Reference< chart2::XDataSeries > > >( xSeriesCnt->getDataSeries())); std::vector< Reference< chart2::XDataSeries > >::iterator aIt = std::find( aSeries.begin(), aSeries.end(), xSeries ); if( aIt != aSeries.end()) @@ -692,7 +691,7 @@ sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Refere xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenIndicesSeq; if( aHiddenIndicesSeq.getLength() ) { - std::vector< sal_Int32 > aHiddenIndices( ContainerHelper::SequenceToVector( aHiddenIndicesSeq ) ); + auto aHiddenIndices( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( aHiddenIndicesSeq ) ); std::sort( aHiddenIndices.begin(), aHiddenIndices.end() ); sal_Int32 nHiddenCount = static_cast<sal_Int32>(aHiddenIndices.size()); @@ -777,7 +776,7 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { - std::vector< sal_Int32 > aIndices( ContainerHelper::SequenceToVector( aAttributedDataPointIndexList ) ); + auto aIndices( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( aAttributedDataPointIndexList ) ); std::vector< sal_Int32 >::iterator aIt = std::find( aIndices.begin(), aIndices.end(), nPointIndex ); if( aIt != aIndices.end()) xProp = xSeries->getDataPointByIndex(nPointIndex); diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 07f00bee436e..f7249ceabf54 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -20,7 +20,6 @@ #include <DiagramHelper.hxx> #include <DataSeriesHelper.hxx> #include <AxisHelper.hxx> -#include <ContainerHelper.hxx> #include <ChartTypeHelper.hxx> #include <ChartModel.hxx> #include <ChartModelHelper.hxx> @@ -1237,8 +1236,8 @@ bool DiagramHelper::areChartTypesCompatible( const Reference< ::chart2::XChartTy if( !xFirstType.is() || !xSecondType.is() ) return false; - std::vector< OUString > aFirstRoles( ContainerHelper::SequenceToVector( xFirstType->getSupportedMandatoryRoles() ) ); - std::vector< OUString > aSecondRoles( ContainerHelper::SequenceToVector( xSecondType->getSupportedMandatoryRoles() ) ); + auto aFirstRoles( comphelper::sequenceToContainer<std::vector< OUString >>( xFirstType->getSupportedMandatoryRoles() ) ); + auto aSecondRoles( comphelper::sequenceToContainer<std::vector< OUString >>( xSecondType->getSupportedMandatoryRoles() ) ); std::sort( aFirstRoles.begin(), aFirstRoles.end() ); std::sort( aSecondRoles.begin(), aSecondRoles.end() ); return ( aFirstRoles == aSecondRoles ); diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx index 268c4988c904..f03887dc25d1 100644 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -18,7 +18,6 @@ */ #include <ErrorBar.hxx> -#include <ContainerHelper.hxx> #include <EventListenerHelper.hxx> #include <CloneHelper.hxx> #include <ModifyListenerHelper.hxx> @@ -443,7 +442,7 @@ void SAL_CALL ErrorBar::setData( const uno::Sequence< uno::Reference< chart2::da { ModifyListenerHelper::removeListenerFromAllElements( m_aDataSequences, m_xModifyEventForwarder ); EventListenerHelper::removeListenerFromAllElements( m_aDataSequences, this ); - m_aDataSequences = ContainerHelper::SequenceToVector( aData ); + m_aDataSequences = comphelper::sequenceToContainer<tDataSequenceContainer>( aData ); EventListenerHelper::addListenerToAllElements( m_aDataSequences, this ); ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder ); } diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index a919375a7a85..9fdd59d66fbb 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -25,7 +25,6 @@ #include <LabeledDataSequence.hxx> #include <DataSource.hxx> #include <XMLRangeHelper.hxx> -#include <ContainerHelper.hxx> #include <CommonFunctors.hxx> #include <UncachedDataSequence.hxx> #include <DataSourceHelper.hxx> @@ -132,7 +131,7 @@ struct lcl_internalizeSeries if( xValues.is() ) { - std::vector< double > aValues( ContainerHelper::SequenceToVector( xValues->getNumericalData())); + auto aValues( comphelper::sequenceToContainer<std::vector< double >>( xValues->getNumericalData())); if( m_bDataInColumns ) m_rInternalData.setColumnValues( nNewIndex, aValues ); else @@ -931,7 +930,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation void SAL_CALL InternalDataProvider::setDataByRangeRepresentation( const OUString& aRange, const Sequence< uno::Any >& aNewData ) { - vector< uno::Any > aNewVector( ContainerHelper::SequenceToVector(aNewData) ); + auto aNewVector( comphelper::sequenceToContainer<vector< uno::Any >>(aNewData) ); if( aRange.match( lcl_aLabelRangePrefix ) ) { sal_uInt32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32(); @@ -1283,7 +1282,7 @@ vector< vector< Type > > lcl_convertSequenceSequenceToVectorVector( const Sequen { aRet.resize(nOuterCount); for( sal_Int32 nN=0; nN<nOuterCount; nN++) - aRet[nN]= ContainerHelper::SequenceToVector( rIn[nN] ); + aRet[nN]= comphelper::sequenceToContainer<vector< Type >>( rIn[nN] ); } return aRet; } diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx index 6ed262206cbf..b874f53027b3 100644 --- a/chart2/source/tools/PropertyHelper.cxx +++ b/chart2/source/tools/PropertyHelper.cxx @@ -18,9 +18,9 @@ */ #include <PropertyHelper.hxx> -#include <ContainerHelper.hxx> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <comphelper/sequence.hxx> #include <osl/diagnose.h> #include <tools/diagnose_ex.h> @@ -118,7 +118,7 @@ OUString lcl_addNamedPropertyUniqueNameToTable( try { Reference< container::XNameAccess > xNameAccess( xNameContainer, uno::UNO_QUERY_THROW ); - std::vector< OUString > aNames( ::chart::ContainerHelper::SequenceToVector( xNameAccess->getElementNames())); + auto aNames( comphelper::sequenceToContainer<std::vector< OUString >>( xNameAccess->getElementNames())); std::vector< OUString >::const_iterator aIt( std::find_if( aNames.begin(), aNames.end(), lcl_EqualsElement( rValue, xNameAccess ))); diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx index 927b06d4b0e9..5212c8d842d8 100644 --- a/chart2/source/tools/RegressionEquation.cxx +++ b/chart2/source/tools/RegressionEquation.cxx @@ -23,7 +23,6 @@ #include <UserDefinedProperties.hxx> #include <CharacterProperties.hxx> #include <PropertyHelper.hxx> -#include <ContainerHelper.hxx> #include <ModifyListenerHelper.hxx> #include <unonames.hxx> #include <cppuhelper/supportsservice.hxx> @@ -293,10 +292,12 @@ void SAL_CALL RegressionEquation::setText( const uno::Sequence< uno::Reference< { MutexGuard aGuard( m_aMutex ); ModifyListenerHelper::removeListenerFromAllElements( - ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); + comphelper::sequenceToContainer<std::vector<uno::Reference< chart2::XFormattedString > > >( m_aStrings ), + m_xModifyEventForwarder ); m_aStrings = Strings; ModifyListenerHelper::addListenerToAllElements( - ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); + comphelper::sequenceToContainer<std::vector<uno::Reference< chart2::XFormattedString > > >( m_aStrings ), + m_xModifyEventForwarder ); fireModifyEvent(); } |