use comphelper::containerToSequence

in chart2, we remove a local equivalent of the method

Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
This commit is contained in:
Noel Grandin
2015-11-19 09:33:29 +02:00
parent f7b5f477bf
commit 2554efabb6
112 changed files with 202 additions and 503 deletions
+2 -4
View File
@@ -25,6 +25,7 @@
#include <sbunoobj.hxx>
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/sequence.hxx>
#include <algorithm>
#include <limits.h>
@@ -164,10 +165,7 @@ void SbPropertyValues::removeVetoableChangeListener(
Sequence< PropertyValue > SbPropertyValues::getPropertyValues() throw (css::uno::RuntimeException, std::exception)
{
Sequence<PropertyValue> aRet( m_aPropVals.size() );
for (size_t n = 0; n < m_aPropVals.size(); ++n)
aRet.getArray()[n] = m_aPropVals[n];
return aRet;
return comphelper::containerToSequence(m_aPropVals);
}
@@ -62,7 +62,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -389,7 +389,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -257,7 +257,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -228,7 +228,7 @@ uno::Sequence< Property > lcl_GetPropertySequence( DataSeriesPointWrapper::eType
::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
struct StaticSeriesWrapperPropertyArray_Initializer
@@ -478,7 +478,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -64,7 +64,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -260,7 +260,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -27,6 +27,7 @@
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <comphelper/sequence.hxx>
#include "LinePropertiesHelper.hxx"
#include "UserDefinedProperties.hxx"
@@ -82,7 +83,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -184,7 +184,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -26,6 +26,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <comphelper/sequence.hxx>
#include "LinePropertiesHelper.hxx"
#include "FillProperties.hxx"
@@ -64,7 +65,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -66,7 +66,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -39,6 +39,7 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <comphelper/sequence.hxx>
#include <rtl/ustring.hxx>
@@ -343,7 +344,7 @@ Reference< XDataSeries > lcl_CreateNewSeries(
aNewSequences.push_back( ::chart::DataSourceHelper::createLabeledDataSequence( xSeq ));
}
xSink->setData( ContainerToSequence( aNewSequences ));
xSink->setData( comphelper::containerToSequence( aNewSequences ));
}
}
@@ -506,7 +507,7 @@ void addNewSeriesToContainer(
++aIt;
aSeries.insert(aIt, xNewSeries);
xSeriesCnt->setDataSeries(ContainerToSequence(aSeries));
xSeriesCnt->setDataSeries(comphelper::containerToSequence(aSeries));
}
}
@@ -735,7 +736,7 @@ bool DialogModel::setData(
applyInterpretedData(
xInterpreter->interpretDataSource(
xDataSource, rArguments,
ContainerToSequence( aSeriesToReUse )),
comphelper::containerToSequence( aSeriesToReUse )),
aSeriesToReUse,
true /* bSetStyles */);
@@ -34,6 +34,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <comphelper/sequence.hxx>
namespace chart
{
@@ -146,7 +147,7 @@ uno::Sequence< uno::Type > CreationWizardUnoDlg::getTypes() throw(uno::RuntimeEx
aTypes.push_back( cppu::UnoType<frame::XTerminateListener>::get() );
aTypes.push_back( cppu::UnoType<ui::dialogs::XExecutableDialog>::get() );
aTypes.push_back( cppu::UnoType<beans::XPropertySet>::get() );
aTypeList = ::chart::ContainerHelper::ContainerToSequence( aTypes );
aTypeList = comphelper::containerToSequence( aTypes );
}
return aTypeList;
-19
View File
@@ -32,25 +32,6 @@ namespace chart
namespace ContainerHelper
{
/** converts a standard container into a sequence of the same type
input: standard container
output: css::uno::Sequence< container::value_type >
example:
::std::vector< sal_Int32 > aVector;
Sequence< sal_Int32 > aSequence( ContainerHelper::ContainerToSequence( aVector ));
*/
template< class Container >
::com::sun::star::uno::Sequence< typename Container::value_type >
ContainerToSequence( const Container & rCont )
{
::com::sun::star::uno::Sequence< typename Container::value_type > aResult( rCont.size());
::std::copy( rCont.begin(), rCont.end(), aResult.getArray());
return aResult;
}
/** converts a UNO sequence into a standard "Sequence" container. For
convenience see the methods SequenceToVector, etc. below.
+3 -2
View File
@@ -28,6 +28,7 @@
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/documentconstants.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <sot/storage.hxx>
#include <osl/diagnose.h>
@@ -117,7 +118,7 @@ uno::Reference< embed::XStorage > lcl_getWriteStorage(
else
aStorageArgs[0] <<= aMDHelper.URL;
aStorageArgs[1] <<= (embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE);
aStorageArgs[2] <<= ::chart::ContainerHelper::ContainerToSequence( aPropertiesForStorage );
aStorageArgs[2] <<= comphelper::containerToSequence( aPropertiesForStorage );
xStorage.set(
xStorageFact->createInstanceWithArguments( aStorageArgs ),
@@ -181,7 +182,7 @@ uno::Reference< embed::XStorage > lcl_getReadStorage(
Sequence< uno::Any > aStorageArgs( 3 );
aStorageArgs[0] <<= xStream;
aStorageArgs[1] <<= (embed::ElementModes::READ | embed::ElementModes::NOCREATE);
aStorageArgs[2] <<= ::chart::ContainerHelper::ContainerToSequence( aPropertiesForStorage );
aStorageArgs[2] <<= comphelper::containerToSequence( aPropertiesForStorage );
xStorage.set(
xStorageFact->createInstanceWithArguments( aStorageArgs ), uno::UNO_QUERY_THROW );
}
+1 -1
View File
@@ -286,7 +286,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -95,7 +95,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -298,7 +298,7 @@ void SAL_CALL BaseCoordinateSystem::removeChartType( const Reference< chart2::XC
Sequence< Reference< chart2::XChartType > > SAL_CALL BaseCoordinateSystem::getChartTypes()
throw (uno::RuntimeException, std::exception)
{
return ContainerHelper::ContainerToSequence( m_aChartTypes );
return comphelper::containerToSequence( m_aChartTypes );
}
void SAL_CALL BaseCoordinateSystem::setChartTypes( const Sequence< Reference< chart2::XChartType > >& aChartTypes )
+1 -1
View File
@@ -61,7 +61,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+5 -5
View File
@@ -71,7 +71,7 @@ struct StaticDataSeriesInfoHelper : public rtl::StaticWithInit< ::cppu::OPropert
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -274,7 +274,7 @@ void SAL_CALL DataSeries::getFastPropertyValue
// special handling for get. set is not possible for this property
if( nHandle == DataSeriesProperties::PROP_DATASERIES_ATTRIBUTED_DATA_POINTS )
{
// ToDo: only add those property sets that are really modified
// TODO: only add those property sets that are really modified
uno::Sequence< sal_Int32 > aSeq( m_aAttributedDataPoints.size());
sal_Int32 * pIndexArray = aSeq.getArray();
sal_Int32 i = 0;
@@ -331,7 +331,7 @@ Reference< beans::XPropertySet >
Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences;
{
MutexGuard aGuard( GetMutex() );
aSequences = ContainerHelper::ContainerToSequence( m_aDataSequences );
aSequences = comphelper::containerToSequence( m_aDataSequences );
}
::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
@@ -440,7 +440,7 @@ Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSeries:
throw (uno::RuntimeException, std::exception)
{
MutexGuard aGuard( GetMutex() );
return ContainerHelper::ContainerToSequence( m_aDataSequences );
return comphelper::containerToSequence( m_aDataSequences );
}
// ____ XRegressionCurveContainer ____
@@ -491,7 +491,7 @@ uno::Sequence< uno::Reference< chart2::XRegressionCurve > > SAL_CALL DataSeries:
throw (uno::RuntimeException, std::exception)
{
MutexGuard aGuard( GetMutex() );
return ContainerHelper::ContainerToSequence( m_aRegressionCurves );
return comphelper::containerToSequence( m_aRegressionCurves );
}
void SAL_CALL DataSeries::setRegressionCurves(
+2 -2
View File
@@ -250,7 +250,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -561,7 +561,7 @@ uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > SAL_CALL Diagram::g
throw (uno::RuntimeException, std::exception)
{
MutexGuard aGuard( GetMutex() );
return ContainerHelper::ContainerToSequence( m_aCoordSystems );
return comphelper::containerToSequence( m_aCoordSystems );
}
void SAL_CALL Diagram::setCoordinateSystems(
+1 -1
View File
@@ -73,7 +73,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+1 -1
View File
@@ -101,7 +101,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+1 -1
View File
@@ -157,7 +157,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+1 -1
View File
@@ -86,7 +86,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+1 -1
View File
@@ -60,7 +60,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+1 -1
View File
@@ -204,7 +204,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+1 -1
View File
@@ -88,7 +88,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -92,7 +92,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -100,7 +100,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -70,7 +70,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -72,7 +72,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -149,13 +149,13 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
OSL_ASSERT( xSeries.is() );
Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
OSL_ASSERT( xSink.is() );
xSink->setData( ContainerHelper::ContainerToSequence( aNewData ) );
xSink->setData( comphelper::containerToSequence( aNewData ) );
aSeriesVec.push_back( xSeries );
}
Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
aSeries[0] = ContainerHelper::ContainerToSequence( aSeriesVec );
aSeries[0] = comphelper::containerToSequence( aSeriesVec );
return InterpretedData( aSeries, xCategories );
}
@@ -123,7 +123,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -243,7 +243,7 @@ uno::Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedMandatoryRo
aMandRoles.push_back( "values-last");
return ContainerHelper::ContainerToSequence( aMandRoles );
return comphelper::containerToSequence( aMandRoles );
}
Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedOptionalRoles()
@@ -265,7 +265,7 @@ Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedOptionalRoles()
aOptRoles.push_back( "values-max");
}
return ContainerHelper::ContainerToSequence( aOptRoles );
return comphelper::containerToSequence( aOptRoles );
}
OUString SAL_CALL CandleStickChartType::getRoleOfSequenceForSeriesLabel()
+1 -1
View File
@@ -183,7 +183,7 @@ Sequence< Reference< chart2::XDataSeries > > SAL_CALL ChartType::getDataSeries()
{
SolarMutexGuard g;
return ContainerHelper::ContainerToSequence( m_aDataSeries );
return comphelper::containerToSequence( m_aDataSeries );
}
void SAL_CALL ChartType::setDataSeries( const Sequence< Reference< chart2::XDataSeries > >& aDataSeries )
@@ -600,7 +600,7 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames()
}
}
return ContainerHelper::ContainerToSequence( aServices );
return comphelper::containerToSequence( aServices );
}
// ____ XServiceInfo ____
@@ -274,7 +274,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagramData(
{
// interpret new data and re-use existing series
Sequence< Reference< XDataSeries > > aFlatSeriesSeq(
::chart::ContainerHelper::ContainerToSequence( DiagramHelper::getDataSeriesFromDiagram( xDiagram )));
comphelper::containerToSequence( DiagramHelper::getDataSeriesFromDiagram( xDiagram )));
const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.getLength();
Reference< chart2::XDataInterpreter > xInterpreter( getDataInterpreter());
chart2::InterpretedData aData =
@@ -98,7 +98,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -97,7 +97,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -132,7 +132,7 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
}
Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
aSeries[0] = ContainerToSequence( aSeriesVec );
aSeries[0] = comphelper::containerToSequence( aSeriesVec );
return InterpretedData( aSeries, xCategories );
}
@@ -308,7 +308,7 @@ Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
}
}
return Reference< data::XDataSource >( DataSourceHelper::createDataSource( ContainerToSequence( aResultVec ) ) );
return Reference< data::XDataSource >( DataSourceHelper::createDataSource( comphelper::containerToSequence( aResultVec ) ) );
}
// convenience methods
@@ -111,7 +111,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -116,7 +116,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -99,7 +99,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -125,7 +125,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -115,7 +115,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -118,7 +118,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -127,7 +127,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -394,7 +394,7 @@ void StockChartTypeTemplate::createChartTypes(
}
Reference< XChartTypeContainer > xCTCnt( rCoordSys[ 0 ], uno::UNO_QUERY_THROW );
xCTCnt->setChartTypes( ::chart::ContainerHelper::ContainerToSequence(aChartTypeVec) );
xCTCnt->setChartTypes( comphelper::containerToSequence(aChartTypeVec) );
}
catch( const uno::Exception & ex )
{
@@ -133,13 +133,13 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
OSL_ASSERT( xSeries.is() );
Reference< data::XDataSink > xSink( xSeries, uno::UNO_QUERY );
OSL_ASSERT( xSink.is() );
xSink->setData( ContainerHelper::ContainerToSequence( aNewData ) );
xSink->setData( comphelper::containerToSequence( aNewData ) );
aSeriesVec.push_back( xSeries );
}
Sequence< Sequence< Reference< XDataSeries > > > aSeries(1);
aSeries[0] = ContainerHelper::ContainerToSequence( aSeriesVec );
aSeries[0] = comphelper::containerToSequence( aSeriesVec );
return InterpretedData( aSeries, xCategories );
}
+3 -2
View File
@@ -45,6 +45,7 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include <comphelper/sequence.hxx>
#include <map>
@@ -870,7 +871,7 @@ Sequence< Reference< XAxis > > AxisHelper::getAllAxesOfDiagram(
}
}
return ContainerHelper::ContainerToSequence( aAxisVector );
return comphelper::containerToSequence( aAxisVector );
}
Sequence< Reference< beans::XPropertySet > > AxisHelper::getAllGrids( const Reference< XDiagram >& xDiagram )
@@ -898,7 +899,7 @@ Sequence< Reference< beans::XPropertySet > > AxisHelper::getAllGrids( const Refe
}
}
return ContainerHelper::ContainerToSequence( aGridVector );
return comphelper::containerToSequence( aGridVector );
}
void AxisHelper::getAxisOrGridPossibilities( Sequence< sal_Bool >& rPossibilityList
+2 -1
View File
@@ -40,6 +40,7 @@
#include <com/sun/star/i18n/ScriptType.hpp>
#include <comphelper/InlineContainer.hxx>
#include <comphelper/sequence.hxx>
#include <unotools/lingucfg.hxx>
#include <i18nlangtag/mslangid.hxx>
@@ -490,7 +491,7 @@ awt::FontDescriptor CharacterProperties::createFontDescriptorFromPropertySet(
( "CharWordMode") // WordLineMode
;
uno::Sequence< OUString > aPropNameSeq( ContainerHelper::ContainerToSequence( aPropNames ));
uno::Sequence< OUString > aPropNameSeq( comphelper::containerToSequence( aPropNames ));
uno::Sequence< uno::Any > aValues( xMultiPropSet->getPropertyValues( aPropNameSeq ));
sal_Int32 i=0;
+2 -1
View File
@@ -24,6 +24,7 @@
#include <unotools/configitem.hxx>
#include <sal/macros.h>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <set>
@@ -88,7 +89,7 @@ void ChartConfigItem::ImplCommit()
void ChartConfigItem::addPropertyNotification( const OUString & rPropertyName )
{
m_aPropertiesToNotify.insert( rPropertyName );
EnableNotification( ContainerHelper::ContainerToSequence( m_aPropertiesToNotify ));
EnableNotification( comphelper::containerToSequence<OUString>( m_aPropertiesToNotify ));
}
uno::Any ChartConfigItem::getProperty( const OUString & aPropertyName )
+2 -2
View File
@@ -260,7 +260,7 @@ Reference< chart2::data::XDataSource >
getDataSource( const Sequence< Reference< chart2::XDataSeries > > & aSeries )
{
return Reference< chart2::data::XDataSource >(
new DataSource(ContainerHelper::ContainerToSequence(getAllDataSequences(aSeries))));
new DataSource(comphelper::containerToSequence(getAllDataSequences(aSeries))));
}
namespace
@@ -529,7 +529,7 @@ void deleteSeries(
if( aIt != aSeries.end())
{
aSeries.erase( aIt );
xSeriesCnt->setDataSeries( ContainerHelper::ContainerToSequence( aSeries ));
xSeriesCnt->setDataSeries( comphelper::containerToSequence( aSeries ));
}
}
catch( const uno::Exception & ex )
+6 -9
View File
@@ -243,7 +243,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR
::std::vector< Reference< chart2::XDataSeries > > xSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
uno::Reference< chart2::data::XDataSource > xSeriesSource(
DataSeriesHelper::getDataSource( ContainerHelper::ContainerToSequence(xSeriesVector) ) );
DataSeriesHelper::getDataSource( comphelper::containerToSequence(xSeriesVector) ) );
Sequence< Reference< chart2::data::XLabeledDataSequence > > aDataSeqences( xSeriesSource->getDataSequences() );
//the first x-values is always the next sequence //todo ... other x-values get lost for old format
@@ -260,10 +260,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR
aResultVector.push_back( aDataSeqences[nN] );
}
Sequence< Reference< chart2::data::XLabeledDataSequence > > aResultSequence( aResultVector.size() );
::std::copy( aResultVector.begin(), aResultVector.end(), aResultSequence.getArray() );
return new DataSource( aResultSequence );
return new DataSource( comphelper::containerToSequence(aResultVector) );
}
uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges(
@@ -287,7 +284,7 @@ uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges(
}
}
return ContainerHelper::ContainerToSequence( aResult );
return comphelper::containerToSequence( aResult );
}
uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges( const uno::Reference< frame::XModel > & xChartModel )
@@ -325,7 +322,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
}
return uno::Reference< chart2::data::XDataSource >(
new DataSource( ContainerHelper::ContainerToSequence( aResult )));
new DataSource( comphelper::containerToSequence( aResult )));
}
uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
@@ -351,7 +348,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
}
return uno::Reference< chart2::data::XDataSource >(
new DataSource( ContainerHelper::ContainerToSequence( aResult )));
new DataSource( comphelper::containerToSequence( aResult )));
}
bool DataSourceHelper::detectRangeSegmentation(
@@ -537,7 +534,7 @@ Sequence< OUString > DataSourceHelper::getRangesFromDataSource( const Reference<
aResult.push_back( xValues->getSourceRangeRepresentation());
}
}
return ContainerHelper::ContainerToSequence( aResult );
return comphelper::containerToSequence( aResult );
}
} //namespace chart
+3 -2
View File
@@ -58,6 +58,7 @@
#include <svl/zformat.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <comphelper/sequence.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -753,7 +754,7 @@ Sequence< Sequence< Reference< XDataSeries > > >
}
}
}
return ContainerHelper::ContainerToSequence( aResult );
return comphelper::containerToSequence( aResult );
}
Reference< XChartType >
@@ -1266,7 +1267,7 @@ Sequence< Reference< XChartType > >
}
}
return ContainerHelper::ContainerToSequence( aResult );
return comphelper::containerToSequence( aResult );
}
bool DiagramHelper::areChartTypesCompatible( const Reference< ::chart2::XChartType >& xFirstType,
+1 -1
View File
@@ -440,7 +440,7 @@ void SAL_CALL ErrorBar::setData( const uno::Sequence< uno::Reference< chart2::da
uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > SAL_CALL ErrorBar::getDataSequences()
throw (uno::RuntimeException, std::exception)
{
return ContainerHelper::ContainerToSequence( m_aDataSequences );
return comphelper::containerToSequence( m_aDataSequences );
}
uno::Sequence< OUString > ErrorBar::getSupportedServiceNames_Static()
+6 -6
View File
@@ -720,7 +720,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
, lcl_aCategoriesRoleName ) ) );
}
//don't add the created sequences to the map as they are used temporarily only ...
return new DataSource( ContainerHelper::ContainerToSequence(aComplexCategories) );
return new DataSource( comphelper::containerToSequence(aComplexCategories) );
}
OSL_ASSERT( aRangeRepresentation == lcl_aCompleteRange );
@@ -772,7 +772,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData
aResultLSeqVec.push_back( *aIt );
}
return new DataSource( ContainerHelper::ContainerToSequence(aResultLSeqVec) );
return new DataSource( comphelper::containerToSequence(aResultLSeqVec) );
}
Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments(
@@ -893,7 +893,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
? m_aInternalData.getComplexColumnLabel( nIndex )
: m_aInternalData.getComplexRowLabel( nIndex );
if( !aComplexLabel.empty() )
aResult = ContainerHelper::ContainerToSequence(aComplexLabel);
aResult = comphelper::containerToSequence(aComplexLabel);
}
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
@@ -902,7 +902,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
? m_aInternalData.getComplexRowLabel( nPointIndex )
: m_aInternalData.getComplexColumnLabel( nPointIndex );
if( !aComplexCategory.empty() )
aResult = ContainerHelper::ContainerToSequence(aComplexCategory);
aResult = comphelper::containerToSequence(aComplexCategory);
}
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
{
@@ -1305,7 +1305,7 @@ Sequence< Sequence< Type > > lcl_convertVectorVectorToSequenceSequence( const ve
{
aRet.realloc(nOuterCount);
for( sal_Int32 nN=0; nN<nOuterCount; nN++)
aRet[nN]= ContainerHelper::ContainerToSequence( rIn[nN] );
aRet[nN]= comphelper::containerToSequence( rIn[nN] );
}
return aRet;
}
@@ -1332,7 +1332,7 @@ Sequence< Sequence< OUString > > lcl_convertComplexAnyVectorToStringSequence( co
{
aRet.realloc(nOuterCount);
for( sal_Int32 nN=0; nN<nOuterCount; nN++)
aRet[nN]= lcl_AnyToStringSequence( ContainerHelper::ContainerToSequence( rIn[nN] ) );
aRet[nN]= lcl_AnyToStringSequence( comphelper::containerToSequence( rIn[nN] ) );
}
return aRet;
}
+2 -1
View File
@@ -22,6 +22,7 @@
#include "ContainerHelper.hxx"
#include <cppuhelper/queryinterface.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/sequence.hxx>
#include <vector>
#include <algorithm>
@@ -111,7 +112,7 @@ Sequence< uno::Type > SAL_CALL
aTypes.push_back( LCL_PROP_CPPUTYPE( beans::XMultiPropertyStates ));
aTypes.push_back( LCL_PROP_CPPUTYPE( XStyleSupplier ));
aTypeList = ::chart::ContainerHelper::ContainerToSequence( aTypes );
aTypeList = comphelper::containerToSequence( aTypes );
}
return aTypeList;
+2 -1
View File
@@ -29,6 +29,7 @@
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <comphelper/sequence.hxx>
#define PREFERED_DEFAULT_COLOR 0x0000ff
@@ -292,7 +293,7 @@ void RangeHighlighter::fillRangesForDataPoint( const Reference< uno::XInterface
nPreferredColor,
sal_False ));
}
m_aSelectedRanges = ContainerHelper::ContainerToSequence( aHilightedRanges );
m_aSelectedRanges = comphelper::containerToSequence( aHilightedRanges );
}
}
}
+1 -1
View File
@@ -156,7 +156,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
+1 -1
View File
@@ -152,7 +152,7 @@ private:
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
return comphelper::containerToSequence( aProperties );
}
};
@@ -38,6 +38,7 @@
#include <com/sun/star/chart2/AxisType.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <comphelper/sequence.hxx>
#include <rtl/math.hxx>
@@ -218,7 +219,7 @@ Sequence< Reference< beans::XPropertySet > > VCoordinateSystem::getGridListFromA
aRet.insert( aRet.end(), aSubGrids.begin(), aSubGrids.end() );
}
return ContainerHelper::ContainerToSequence( aRet );
return comphelper::containerToSequence( aRet );
}
void VCoordinateSystem::impl_adjustDimension( sal_Int32& rDimensionIndex )
@@ -78,6 +78,7 @@
#include <com/sun/star/drawing/TextFitToSizeType.hpp>
#include <svx/unoshape.hxx>
#include <comphelper/sequence.hxx>
#include <functional>
#include <map>
@@ -2063,7 +2064,7 @@ uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
}
}
}
return ContainerHelper::ContainerToSequence( aRetVector );
return comphelper::containerToSequence( aRetVector );
}
namespace
+2 -3
View File
@@ -33,6 +33,7 @@
#include <comphelper/string.hxx>
#include <comphelper/stl_types.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/i18n/CharType.hpp>
@@ -265,9 +266,7 @@ uno::Sequence< OUString >
vec.push_back(kw);
}
} while (idx >= 0);
uno::Sequence< OUString > kws(vec.size());
std::copy(vec.begin(), vec.end(), kws.begin());
return kws;
return comphelper::containerToSequence(vec);
}
OString join(const OString& rSeparator, const std::vector<OString>& rSequence)
+2 -6
View File
@@ -10,6 +10,7 @@
#include <officecfg/Office/Common.hxx>
#include <svx/svxdlg.hxx>
#include <cuires.hrc>
#include <comphelper/sequence.hxx>
#include "tsaurls.hxx"
@@ -52,12 +53,7 @@ IMPL_LINK_NOARG_TYPED(TSAURLsDialog, OKHdl_Impl, Button*, void)
{
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
css::uno::Sequence<OUString> aNewValue(m_aURLs.size());
size_t n(0);
for (auto i = m_aURLs.cbegin(); i != m_aURLs.cend(); ++i)
aNewValue[n++] = *i;
officecfg::Office::Common::Security::Scripting::TSAURLs::set(aNewValue, batch);
officecfg::Office::Common::Security::Scripting::TSAURLs::set(comphelper::containerToSequence<OUString>(m_aURLs), batch);
batch->commit();
EndDialog(RET_OK);
@@ -412,9 +412,7 @@ Sequence< Type > OConnection::getTypes() throw (RuntimeException, std::exception
if ( !m_bSupportsGroups )
aNormalizedTypes.erase( cppu::UnoType<XGroupsSupplier>::get() );
Sequence< Type > aSupportedTypes( aNormalizedTypes.size() );
::std::copy( aNormalizedTypes.begin(), aNormalizedTypes.end(), aSupportedTypes.getArray() );
return aSupportedTypes;
return comphelper::containerToSequence<Type>(aNormalizedTypes);
}
Sequence< sal_Int8 > OConnection::getImplementationId() throw (RuntimeException, std::exception)
+2 -6
View File
@@ -1706,9 +1706,7 @@ bool OApplicationController::onContainerSelect(ElementType _eType)
SelectionByElementType::iterator pendingSelection = m_aPendingSelection.find( _eType );
if ( pendingSelection != m_aPendingSelection.end() )
{
Sequence< OUString > aSelected( pendingSelection->second.size() );
::std::copy( pendingSelection->second.begin(), pendingSelection->second.end(), aSelected.getArray() );
getContainer()->selectElements( aSelected );
getContainer()->selectElements( comphelper::containerToSequence(pendingSelection->second) );
m_aPendingSelection.erase( pendingSelection );
}
@@ -2861,9 +2859,7 @@ sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw
{
if ( sel->first == m_eCurrentType )
{
Sequence< OUString > aSelected( sel->second.size() );
::std::copy( sel->second.begin(), sel->second.end(), aSelected.getArray() );
getContainer()->selectElements( aSelected );
getContainer()->selectElements( comphelper::containerToSequence(sel->second) );
}
else
{
+1 -2
View File
@@ -552,8 +552,7 @@ bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_f
::std::vector< OUString > aNames( aPropertyValues.getNames() );
::std::sort(aNames.begin(), aNames.end());
Sequence< OUString > aPropNames( aNames.size() );
::std::copy( aNames.begin(), aNames.end(), aPropNames.getArray() );
Sequence< OUString > aPropNames( comphelper::containerToSequence(aNames) );
Sequence< Any > aPropValues( aNames.size() );
::std::transform( aNames.begin(), aNames.end(), aPropValues.getArray(), SelectValueByName( aPropertyValues ) );
+1 -7
View File
@@ -659,14 +659,8 @@ void OComboBoxModel::loadData( bool _bForce )
return;
}
// Create css::uno::Sequence<OUString> for ListBox
css::uno::Sequence<OUString> aStringSeq(aStringList.size());
OUString* pStringAry = aStringSeq.getArray();
for (sal_Int32 i = 0; i<aStringSeq.getLength(); ++i)
pStringAry[i] = aStringList[i];
// Set String-Sequence at ListBox
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringSeq ) );
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( comphelper::containerToSequence(aStringList) ) );
}
+1 -2
View File
@@ -466,8 +466,7 @@ namespace frm
}
// fill the list items into our peer
Sequence< OUString> aStringSeq( aProposals.size() );
::std::copy( aProposals.begin(), aProposals.end(), aStringSeq.getArray() );
Sequence< OUString> aStringSeq( comphelper::containerToSequence(aProposals) );
const Reference< XComboBox > xComboBox( getPeer(), UNO_QUERY_THROW );
xComboBox->addItems( aStringSeq, 0 );
+1 -3
View File
@@ -1019,9 +1019,7 @@ Sequence< Type > OFormattedModel::getSupportedBindingTypes()
aTypes.push_front(cppu::UnoType< sal_Bool >::get() );
break;
}
Sequence< Type > aTypesRet( aTypes.size() );
::std::copy( aTypes.begin(), aTypes.end(), aTypesRet.getArray() );
return aTypesRet;
return comphelper::containerToSequence<Type>(aTypes);
}
Any OFormattedModel::getDefaultForReset() const
+1 -3
View File
@@ -177,9 +177,7 @@ namespace frm
aTypes.push_front( cppu::UnoType<OUString>::get() );
// push_front, because this is the preferred type
Sequence< Type > aTypesRet( aTypes.size() );
::std::copy( aTypes.begin(), aTypes.end(), aTypesRet.getArray() );
return aTypesRet;
return comphelper::containerToSequence<Type>(aTypes);
}
+2 -3
View File
@@ -20,6 +20,7 @@
#include "componenttools.hxx"
#include <com/sun/star/container/XChild.hpp>
#include <comphelper/sequence.hxx>
#include <algorithm>
#include <iterator>
@@ -80,9 +81,7 @@ namespace frm
TypeBag::TypeSequence TypeBag::getTypes() const
{
TypeSequence aTypes( m_aTypes.size() );
::std::copy( m_aTypes.begin(), m_aTypes.end(), aTypes.getArray() );
return aTypes;
return comphelper::containerToSequence<css::uno::Type>(m_aTypes);
}
+1 -6
View File
@@ -64,12 +64,7 @@ public:
aNames.push_back( xNamed->getName() );
}
// copy names to Sequence and return
css::uno::Sequence<OUString> aResult( aNames.size() );
OUString* pStrings = aResult.getArray();
std::copy( aNames.begin(), aNames.end(), pStrings );
return aResult;
return comphelper::containerToSequence(aNames);
}
protected:
+2 -5
View File
@@ -22,6 +22,7 @@
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <vcl/svapp.hxx>
#include <comphelper/sequence.hxx>
namespace framework{
@@ -186,11 +187,7 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::operator[]( sal_uInt32
css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > FrameContainer::getAllElements() const
{
SolarMutexGuard g;
sal_Int32 nPosition = 0;
css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > lElements ( (sal_uInt32)m_aContainer.size() );
for (TFrameContainer::const_iterator pItem=m_aContainer.begin(); pItem!=m_aContainer.end(); ++pItem)
lElements[nPosition++] = *pItem;
return lElements;
return comphelper::containerToSequence(m_aContainer);
}
/**-***************************************************************************************************************
@@ -751,10 +751,7 @@ throw (css::uno::RuntimeException, lang::IllegalAccessException)
ImageList* pImageList = implts_getUserImageList( ImageType(i));
pImageList->GetImageNames( aUserImageNames );
Sequence< OUString > aRemoveList( aUserImageNames.size() );
const sal_uInt32 nCount = aUserImageNames.size();
for ( sal_uInt32 j = 0; j < nCount; j++ )
aRemoveList[j] = aUserImageNames[j];
Sequence< OUString > aRemoveList( comphelper::containerToSequence(aUserImageNames) );
// Remove images
removeImages( sal_Int16( i ), aRemoveList );
+2 -8
View File
@@ -28,6 +28,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <unotools/localfilehelper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/Locale.hpp>
@@ -404,14 +405,7 @@ uno::Sequence< uno::Reference< XDictionary > > SAL_CALL
DictionaryVec_t& rDicList = GetOrCreateDicList();
uno::Sequence< uno::Reference< XDictionary > > aDics( rDicList.size() );
uno::Reference< XDictionary > *pDic = aDics.getArray();
sal_Int32 n = (sal_uInt16) aDics.getLength();
for (sal_Int32 i = 0; i < n; i++)
pDic[i] = rDicList[i];
return aDics;
return comphelper::containerToSequence(rDicList);
}
uno::Reference< XDictionary > SAL_CALL
@@ -31,6 +31,7 @@
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
using namespace ::oox::core;
using namespace ::com::sun::star;
@@ -258,10 +259,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
PropertyMap aPath;
Sequence< EnhancedCustomShapeSegment > aSegments( maSegments.size() );
for ( i = 0; i < maSegments.size(); i++ )
aSegments[ i ] = maSegments[ i ];
aPath.setProperty( PROP_Segments, aSegments);
aPath.setProperty( PROP_Segments, comphelper::containerToSequence(maSegments) );
if ( maTextRect.has() ) {
Sequence< EnhancedCustomShapeTextFrame > aTextFrames(1);
+6 -12
View File
@@ -87,6 +87,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/random.hxx>
#include <comphelper/sequence.hxx>
#include <xmloff/SchXMLSeriesHelper.hxx>
#include "ColorPropertySet.hxx"
#include <set>
@@ -207,16 +208,15 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
}
Reference< chart2::data::XDataSource > lcl_createDataSource(
const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aData )
const std::vector< Reference< chart2::data::XLabeledDataSequence > > & aData )
{
Reference< uno::XComponentContext > xContext(
comphelper::getProcessComponentContext() );
Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
Reference< chart2::data::XDataSink > xSink(
xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.chart2.data.DataSource", xContext ),
uno::UNO_QUERY_THROW );
if( xSink.is())
xSink->setData( aData );
xSink->setData( comphelper::containerToSequence(aData) );
return Reference< chart2::data::XDataSource >( xSink, uno::UNO_QUERY );
}
@@ -239,10 +239,7 @@ Sequence< Reference< chart2::data::XLabeledDataSequence > > lcl_getAllSeriesSequ
}
}
Sequence< Reference< chart2::data::XLabeledDataSequence > > aRet( aContainer.size());
::std::copy( aContainer.begin(), aContainer.end(), aRet.getArray());
return aRet;
return comphelper::containerToSequence(aContainer);
}
Reference< chart2::data::XLabeledDataSequence >
@@ -291,10 +288,7 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c
aLabeledSeqVector.push_back( aSeriesSeqVector[nN] );
}
Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( aLabeledSeqVector.size() );
::std::copy( aLabeledSeqVector.begin(), aLabeledSeqVector.end(), aSeq.getArray() );
return lcl_createDataSource( aSeq );
return lcl_createDataSource( aLabeledSeqVector );
}
bool lcl_isSeriesAttachedToFirstAxis(
+3 -14
View File
@@ -10,6 +10,7 @@
#include "oox/helper/grabbagstack.hxx"
#include <com/sun/star/uno/Sequence.hxx>
#include <comphelper/sequence.hxx>
namespace oox
{
@@ -37,14 +38,7 @@ PropertyValue GrabBagStack::getRootProperty()
PropertyValue aProperty;
aProperty.Name = mCurrentElement.maName;
Sequence<PropertyValue> aSequence(mCurrentElement.maPropertyList.size());
PropertyValue* pSequence = aSequence.getArray();
std::vector<PropertyValue>::iterator i;
for (i = mCurrentElement.maPropertyList.begin(); i != mCurrentElement.maPropertyList.end(); ++i)
*pSequence++ = *i;
aProperty.Value = makeAny(aSequence);
aProperty.Value = makeAny(comphelper::containerToSequence(mCurrentElement.maPropertyList));
return aProperty;
}
@@ -67,12 +61,7 @@ void GrabBagStack::push(const OUString& aKey)
void GrabBagStack::pop()
{
OUString aName = mCurrentElement.maName;
Sequence<PropertyValue> aSequence(mCurrentElement.maPropertyList.size());
PropertyValue* pSequence = aSequence.getArray();
std::vector<PropertyValue>::iterator i;
for (i = mCurrentElement.maPropertyList.begin(); i != mCurrentElement.maPropertyList.end(); ++i)
*pSequence++ = *i;
Sequence<PropertyValue> aSequence(comphelper::containerToSequence(mCurrentElement.maPropertyList));
mCurrentElement = mStack.top();
mStack.pop();
appendElement(aName, makeAny(aSequence));
+2 -5
View File
@@ -27,6 +27,7 @@
#include <com/sun/star/text/XTextAppend.hpp>
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <comphelper/sequence.hxx>
namespace oox {
namespace vml {
@@ -120,11 +121,7 @@ void TextBox::convert(uno::Reference<drawing::XShape> xShape) const
aPropertyValue.Value = uno::makeAny(rFont.moColor.get().toUInt32(16));
aPropVec.push_back(aPropertyValue);
}
uno::Sequence<beans::PropertyValue> aPropSeq(aPropVec.size());
beans::PropertyValue* pValues = aPropSeq.getArray();
for (std::vector<beans::PropertyValue>::iterator i = aPropVec.begin(); i != aPropVec.end(); ++i)
*pValues++ = *i;
xTextAppend->appendTextPortion(aIt->maText, aPropSeq);
xTextAppend->appendTextPortion(aIt->maText, comphelper::containerToSequence(aPropVec));
}
// Remove the last character of the shape text, if it would be a newline.
+2 -6
View File
@@ -20,6 +20,7 @@
#include <ManifestReader.hxx>
#include <ManifestImport.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
@@ -59,12 +60,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL ManifestReader::readManifestSeque
aParserInput.sSystemId = "META-INF/manifest.xml";
xParser->setDocumentHandler ( xFilter );
xParser->parseStream( aParserInput );
aManifestSequence.realloc ( aManVector.size() );
Sequence < PropertyValue > * pSequence = aManifestSequence.getArray();
::std::vector < Sequence < PropertyValue > >::const_iterator aIter = aManVector.begin();
::std::vector < Sequence < PropertyValue > >::const_iterator aEnd = aManVector.end();
while( aIter != aEnd )
*pSequence++ = (*aIter++);
aManifestSequence = comphelper::containerToSequence(aManVector);
}
catch (SAXParseException& e)
{
+2 -10
View File
@@ -79,6 +79,7 @@
#include <comphelper/documentconstants.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
using namespace std;
using namespace osl;
@@ -1017,16 +1018,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq
pEntry->nSize = pEntry->nCompressedSize = -1;
pEntry->nTime = ZipOutputStream::getCurrentDosTime();
// Convert vector into a uno::Sequence
uno::Sequence < uno::Sequence < PropertyValue > > aManifestSequence ( aManList.size() );
sal_Int32 nInd = 0;
for ( vector < uno::Sequence < PropertyValue > >::const_iterator aIter = aManList.begin(), aEnd = aManList.end();
aIter != aEnd;
++aIter, ++nInd )
{
aManifestSequence[nInd] = ( *aIter );
}
xWriter->writeManifestSequence ( xManOutStream, aManifestSequence );
xWriter->writeManifestSequence ( xManOutStream, comphelper::containerToSequence(aManList) );
sal_Int32 nBufferLength = static_cast < sal_Int32 > ( pBuffer->getPosition() );
pBuffer->realloc( nBufferLength );
+2 -5
View File
@@ -39,6 +39,7 @@
#include <com/sun/star/script/Converter.hpp>
#include <com/sun/star/script/InvocationAdapterFactory.hpp>
#include <com/sun/star/reflection/theCoreReflection.hpp>
#include <comphelper/sequence.hxx>
using com::sun::star::uno::Reference;
@@ -636,11 +637,7 @@ bool Runtime::pyIterUnpack( PyObject *const pObj, Any &a ) const
items.push_back( pyObject2Any( rItem.get() ) );
}
while( (pItem = PyIter_Next( pObj )) );
Sequence<Any> aSeq( items.size() );
::std::list<Any>::iterator it = items.begin();
for( int i = 0; it != items.end(); ++it )
aSeq[i++] = *it;
a <<= aSeq;
a <<= comphelper::containerToSequence<Any>(items);
return true;
}
@@ -932,8 +932,7 @@ uno::Any GeometryHandler::getConstantValue(bool _bToControlValue,sal_uInt16 _nRe
{
::std::vector< OUString > aList;
tools::StringListResource aRes(ModuleRes(_nResId),aList);
uno::Sequence< OUString > aSeq(aList.size());
::std::copy( aList.begin(), aList.end(), aSeq.getArray() );
uno::Sequence< OUString > aSeq(comphelper::containerToSequence(aList));
uno::Reference< inspection::XStringRepresentation > xConversionHelper = inspection::StringRepresentation::createConstant( m_xContext,m_xTypeConverter,_sConstantName,aSeq);
if ( _bToControlValue )
+3 -7
View File
@@ -19,8 +19,10 @@
#include <com/sun/star/ui/ItemType.hpp>
#include <fstream>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <vcl/graph.hxx>
#include <map>
using namespace com::sun::star;
typedef std::map< sal_Int16, OUString > IdToString;
@@ -301,13 +303,7 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere
sProps[ 0 ].Value = uno::makeAny( ui::ItemType::SEPARATOR_LINE );
toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
}
uno::Sequence< beans::PropertyValue > sProps( props.size() );
beans::PropertyValue* pProp = sProps.getArray();
for ( std::vector< css::beans::PropertyValue >::iterator it = props.begin(); it != props.end(); ++it, ++pProp )
*pProp = *it;
toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( comphelper::containerToSequence(props) ) );
}
return true;
}
+6 -27
View File
@@ -57,6 +57,7 @@
#include <com/sun/star/text/XText.hpp>
#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <rtl/math.hxx>
#include <boost/checked_delete.hpp>
@@ -104,14 +105,6 @@ const SfxItemPropertyMapEntry* lcl_GetDataSequencePropertyMap()
return aDataSequencePropertyMap_Impl;
}
template< typename T >
css::uno::Sequence< T > lcl_VectorToSequence( const ::std::vector< T > & rCont )
{
css::uno::Sequence< T > aResult( rCont.size());
::std::copy( rCont.begin(), rCont.end(), aResult.getArray());
return aResult;
}
struct lcl_appendTableNumber : public ::std::unary_function< SCTAB, void >
{
explicit lcl_appendTableNumber( OUStringBuffer & rBuffer ) :
@@ -1794,7 +1787,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
SolarMutexGuard aGuard;
OSL_ENSURE( m_pDocument, "No Document -> no detectArguments" );
if(!m_pDocument ||!xDataSource.is())
return lcl_VectorToSequence( aResult );
return comphelper::containerToSequence( aResult );
sal_Int32 nDataInRows = 0;
sal_Int32 nDataInCols = 0;
@@ -1980,7 +1973,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
uno::Reference< chart2::data::XDataSource > xCompareDataSource;
try
{
xCompareDataSource.set( this->createDataSource( lcl_VectorToSequence( aResult ) ) );
xCompareDataSource.set( this->createDataSource( comphelper::containerToSequence( aResult ) ) );
}
catch( const lang::IllegalArgumentException & )
{
@@ -2039,12 +2032,12 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
{
aResult.push_back(
beans::PropertyValue( OUString("SequenceMapping"), -1,
uno::makeAny( lcl_VectorToSequence(aSequenceMappingVector) )
uno::makeAny( comphelper::containerToSequence(aSequenceMappingVector) )
, beans::PropertyState_DIRECT_VALUE ));
}
}
return lcl_VectorToSequence( aResult );
return comphelper::containerToSequence( aResult );
}
sal_Bool SAL_CALL ScChart2DataProvider::createDataSequenceByRangeRepresentationPossible( const OUString& aRangeRepresentation )
@@ -2414,21 +2407,7 @@ uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence> > SAL_CALL
ScChart2DataSource::getDataSequences() throw ( uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
LabeledList::const_iterator aItr(m_aLabeledSequences.begin());
LabeledList::const_iterator aEndItr(m_aLabeledSequences.end());
uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aRet(m_aLabeledSequences.size());
sal_Int32 i = 0;
while (aItr != aEndItr)
{
aRet[i] = *aItr;
++i;
++aItr;
}
return aRet;
return comphelper::containerToSequence< uno::Reference< chart2::data::XLabeledDataSequence> >(m_aLabeledSequences);
}
void ScChart2DataSource::AddLabeledSequence(const uno::Reference < chart2::data::XLabeledDataSequence >& xNew)
+3 -8
View File
@@ -20,6 +20,7 @@
#include <ooo/vba/excel/XRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <vector>
#include "unonames.hxx"
@@ -28,6 +29,7 @@
#include "vbaworkbook.hxx"
#include "vbastyles.hxx"
#include "vbaglobals.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -191,14 +193,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons
aProperty.Name = STYLENAME;
aProperty.Value = uno::makeAny( sStyleName );
// convert vector to sequence
uno::Sequence< beans::PropertyValue > aPropertyValueList(aPropertyValueVector.size());
VecPropValues::iterator it = aPropertyValueVector.begin();
VecPropValues::iterator it_end = aPropertyValueVector.end();
for ( sal_Int32 index=0; it != it_end; ++it )
aPropertyValueList[ index++ ] = *it;
mxSheetConditionalEntries->addNew(aPropertyValueList);
mxSheetConditionalEntries->addNew(comphelper::containerToSequence(aPropertyValueVector));
for (sal_Int32 i = mxSheetConditionalEntries->getCount()-1; i >= 0; i--)
{
uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW );
+1 -8
View File
@@ -416,14 +416,7 @@ ScriptEventHelper::getEventListeners()
}
}
Sequence< OUString > sEventMethodNames( eventMethods.size() );
std::list< OUString >::const_iterator it = eventMethods.begin();
OUString* pDest = sEventMethodNames.getArray();
for ( ; it != eventMethods.end(); ++it, ++pDest )
*pDest = *it;
return sEventMethodNames;
return comphelper::containerToSequence<OUString>(eventMethods);
}
Sequence< ScriptEventDescriptor >
@@ -168,12 +168,7 @@ Sequence<Reference<XResourceId> > SAL_CALL Configuration::getResources (
aResources.push_back(*iResource);
}
// Copy the resources from the vector into a new sequence.
Sequence<Reference<XResourceId> > aResult (aResources.size());
for (size_t nIndex=0; nIndex<aResources.size(); ++nIndex)
aResult[nIndex] = aResources[nIndex];
return aResult;
return comphelper::containerToSequence(aResources);
}
sal_Bool SAL_CALL Configuration::hasResource (const Reference<XResourceId>& rxResourceId)
+1 -6
View File
@@ -479,13 +479,8 @@ void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow
PropertyState_DIRECT_VALUE));
}
// Convert vector into uno Sequence.
Sequence< PropertyValue > aPropertySequence (aProperties.size());
for (int nIndex=0,nCount=aProperties.size();nIndex<nCount; ++nIndex)
aPropertySequence[nIndex] = aProperties[nIndex];
if( getSlideAPI( nCurrentSlideNumber, xSlide, xAnimNode ) )
xShow->displaySlide( xSlide, xDrawPages, xAnimNode, aPropertySequence );
xShow->displaySlide( xSlide, xDrawPages, xAnimNode, comphelper::containerToSequence(aProperties) );
}
}
+2 -5
View File
@@ -676,11 +676,8 @@ IPropertyArrayHelper & DrawController::getInfoHelper()
if (mpPropertyArrayHelper.get() == nullptr)
{
::std::vector<beans::Property> aProperties;
FillPropertyTable (aProperties);
Sequence<beans::Property> aPropertySequence (aProperties.size());
for (size_t i=0; i<aProperties.size(); i++)
aPropertySequence[i] = aProperties[i];
mpPropertyArrayHelper.reset(new OPropertyArrayHelper(aPropertySequence, sal_False));
FillPropertyTable(aProperties);
mpPropertyArrayHelper.reset(new OPropertyArrayHelper(comphelper::containerToSequence(aProperties), sal_False));
}
return *mpPropertyArrayHelper.get();
@@ -27,6 +27,7 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <uno/mapping.hxx>
#include <osl/thread.h>
@@ -1633,19 +1634,7 @@ Sequence< OUString > ImplementationRegistration::getImplementations(
if (!implNames.empty())
{
std::list<OUString>::const_iterator iter = implNames.begin();
Sequence<OUString> seqImpl(implNames.size());
OUString *pImplNames = seqImpl.getArray();
sal_Int32 index = 0;
while (iter != implNames.end())
{
pImplNames[index] = *iter;
index++;
++iter;
}
Sequence<OUString> seqImpl(comphelper::containerToSequence<OUString>(implNames));
xImpl->closeKey();
return seqImpl;
}
@@ -33,6 +33,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -860,14 +861,7 @@ Sequence< OUString > OServiceManager::getUniqueAvailableServiceNames(
aNameSet.insert( (*aIt++).first );
*/
Sequence< OUString > aNames( aNameSet.size() );
OUString * pArray = aNames.getArray();
sal_Int32 i = 0;
HashSet_OWString::iterator next = aNameSet.begin();
while( next != aNameSet.end() )
pArray[i++] = (*next++);
return aNames;
return comphelper::containerToSequence<OUString>(aNameSet);
}
// XMultiComponentFactory
@@ -24,6 +24,7 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
@@ -177,25 +178,6 @@ static ::rtl::ByteSequence getBufFromAsciiLine( const OUString& line )
}
static Sequence< OUString > copyVectorToSequence( const vector< OUString >& original )
{
Sequence< OUString > newOne ( original.size() );
for( size_t i = 0; i < original.size() ; i++ )
newOne[i] = original[i];
return newOne;
}
static vector< OUString > copySequenceToVector( const Sequence< OUString >& original )
{
vector< OUString > newOne ( original.getLength() );
for( int i = 0; i < original.getLength() ; i++ )
newOne[i] = original[i];
return newOne;
}
PassMap StorageItem::getInfo()
{
PassMap aResult;
@@ -618,7 +600,7 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, b
}
}
return UserRecord( aRecord.GetUserName(), copyVectorToSequence( aPasswords ) );
return UserRecord( aRecord.GetUserName(), comphelper::containerToSequence( aPasswords ) );
}
@@ -658,7 +640,7 @@ void SAL_CALL PasswordContainer::addPersistent( const OUString& Url, const OUStr
void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserName, const Sequence< OUString >& Passwords, char Mode, const Reference< XInteractionHandler >& aHandler ) throw(RuntimeException, std::exception)
{
NamePassRecord aRecord( UserName );
::std::vector< OUString > aStorePass = copySequenceToVector( Passwords );
::std::vector< OUString > aStorePass = comphelper::sequenceToContainer< std::vector<OUString>, OUString>( Passwords );
if( Mode == PERSISTENT_RECORD )
aRecord.SetPersPasswords( EncodePasswords( aStorePass, GetMasterPassword( aHandler ) ) );
@@ -1035,7 +1017,7 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
{
sal_Int32 oldLen = aUsers.getLength();
aUsers.realloc( oldLen + 1 );
aUsers[ oldLen ] = UserRecord( aNPIter->GetUserName(), copyVectorToSequence( DecodePasswords( aNPIter->GetPersPasswords(), GetMasterPassword( xHandler ) ) ) );
aUsers[ oldLen ] = UserRecord( aNPIter->GetUserName(), comphelper::containerToSequence( DecodePasswords( aNPIter->GetPersPasswords(), GetMasterPassword( xHandler ) ) ) );
}
if( aUsers.getLength() )
+2 -13
View File
@@ -20,6 +20,7 @@
#include "syscreds.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
using namespace com::sun::star;
@@ -185,19 +186,7 @@ void SysCredentialsConfig::writeCfg()
OSL_ENSURE( m_bCfgInited, "SysCredentialsConfig::writeCfg : not initialized!" );
uno::Sequence< OUString > aURLs( m_aCfgContainer.size() );
StringSet::const_iterator it = m_aCfgContainer.begin();
const StringSet::const_iterator end = m_aCfgContainer.end();
sal_Int32 n = 0;
while ( it != end )
{
aURLs[ n ] = *it;
++it;
++n;
}
m_aConfigItem.setSystemCredentialsURLs( aURLs );
m_aConfigItem.setSystemCredentialsURLs( comphelper::containerToSequence<OUString>(m_aCfgContainer) );
}
OUString SysCredentialsConfig::find( OUString const & aURL )
+2 -10
View File
@@ -37,6 +37,7 @@
#include <vcl/window.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/sequence.hxx>
#include <sot/filelist.hxx>
#include <cppuhelper/implbase.hxx>
@@ -421,16 +422,7 @@ Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors() thr
{
}
Sequence< DataFlavor > aRet( mpFormats->size() );
DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
sal_uInt32 nCurPos = 0;
while( aIter != aEnd )
{
aRet[ nCurPos++ ] = *aIter++;
}
return aRet;
return comphelper::containerToSequence<DataFlavor>(*mpFormats);
}
+2 -4
View File
@@ -51,6 +51,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/component_context.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/childwin.hxx>
@@ -396,10 +397,7 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection )
Reference< XObjectInspector > xInspector( m_xBrowserController, UNO_QUERY_THROW );
// tell it the objects to inspect
Sequence< Reference< XInterface > > aSelection( _rSelection.size() );
::std::copy( _rSelection.begin(), _rSelection.end(), aSelection.getArray() );
xInspector->inspect( aSelection );
xInspector->inspect( comphelper::containerToSequence< Reference< XInterface > >(_rSelection) );
}
catch( const VetoException& )
{
+2 -12
View File
@@ -22,6 +22,7 @@
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
#include <svl/style.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <svx/svdmodel.hxx>
@@ -247,18 +248,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames( )
aNameSet.insert(aApiName);
}
uno::Sequence< OUString > aSeq( aNameSet.size() );
OUString* pNames = aSeq.getArray();
std::set< OUString >::iterator aIter( aNameSet.begin() );
const std::set< OUString >::iterator aEnd( aNameSet.end() );
while( aIter != aEnd )
{
*pNames++ = *aIter++;
}
return aSeq;
return comphelper::containerToSequence<OUString>(aNameSet);
}
sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName )
+2 -12
View File
@@ -24,6 +24,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
@@ -226,18 +227,7 @@ Sequence< OUString > SAL_CALL NamespaceMap::getElementNames() throw (RuntimeExce
while( aIter.next( aPrefix, aURL ) )
aPrefixSet.insert( aPrefix );
Sequence< OUString > aSeq( aPrefixSet.size() );
OUString* pPrefixes = aSeq.getArray();
std::set< OUString >::iterator aPrefixIter( aPrefixSet.begin() );
const std::set< OUString >::iterator aEnd( aPrefixSet.end() );
while( aPrefixIter != aEnd )
{
*pPrefixes++ = *aPrefixIter++;
}
return aSeq;
return comphelper::containerToSequence<OUString>(aPrefixSet);
}
sal_Bool SAL_CALL NamespaceMap::hasByName( const OUString& aName ) throw (RuntimeException, std::exception)
+2 -12
View File
@@ -24,6 +24,7 @@
#include <com/sun/star/drawing/PointSequence.hpp>
#include <svl/style.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <svl/itempool.hxx>
@@ -356,18 +357,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames()
// search model pool for line ends
createNamesForPool( mpModelPool, XATTR_LINEEND, aNameSet );
uno::Sequence< OUString > aSeq( aNameSet.size() );
OUString* pNames = aSeq.getArray();
std::set< OUString >::iterator aIter( aNameSet.begin() );
const std::set< OUString >::iterator aEnd( aNameSet.end() );
while( aIter != aEnd )
{
*pNames++ = *aIter++;
}
return aSeq;
return comphelper::containerToSequence<OUString>(aNameSet);
}
sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName )

Some files were not shown because too many files have changed in this diff Show More