tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in testtools and toolkit

Change-Id: I14b53c27906eb615e68482cbc3918be8da464212
Reviewed-on: https://gerrit.libreoffice.org/77624
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2019-08-17 13:30:19 +02:00
parent 1c3d143cd4
commit 5ad254ed24
9 changed files with 12 additions and 27 deletions
+1 -2
View File
@@ -76,8 +76,7 @@ static Sequence<T> cloneSequence(const Sequence<T>& val);
static Sequence< OUString > getSupportedServiceNames()
{
OUString aName( SERVICENAME );
return Sequence< OUString >( &aName, 1 );
return { SERVICENAME };
}
static bool check( bool b , char const * message )
+2 -4
View File
@@ -430,13 +430,11 @@ css::uno::Reference< css::uno::XInterface > create2(
}
OUString getImplementationName2() {
return
"comp.test.testtools.bridgetest.Constructors2";
return "comp.test.testtools.bridgetest.Constructors2";
}
css::uno::Sequence< OUString > getSupportedServiceNames2() {
css::uno::Sequence< OUString > s { "test.testtools.bridgetest.Constructors2" };
return s;
return { "test.testtools.bridgetest.Constructors2" };
}
::cppu::ImplementationEntry const entries[] = {
+1 -2
View File
@@ -69,8 +69,7 @@ namespace bridge_object
static Sequence< OUString > getSupportedServiceNames()
{
OUString aName( SERVICENAME );
return Sequence< OUString >( &aName, 1 );
return { SERVICENAME };
}
+1 -2
View File
@@ -47,8 +47,7 @@ namespace benchmark_object
inline static Sequence< OUString > getSupportedServiceNames()
{
OUString aName( SERVICENAME);
return Sequence< OUString >( &aName, 1 );
return { SERVICENAME };
}
+1 -2
View File
@@ -388,8 +388,7 @@ static void createInstance( Reference< T > & rxOut,
inline static Sequence< OUString > getSupportedServiceNames()
{
OUString aName( SERVICENAME );
return Sequence< OUString >( &aName, 1 );
return { SERVICENAME };
}
+1 -4
View File
@@ -292,10 +292,7 @@ namespace toolkit {
Sequence< OUString > SAL_CALL AnimatedImagesControlModel::getSupportedServiceNames()
{
Sequence< OUString > aServiceNames(2);
aServiceNames[0] = "com.sun.star.awt.AnimatedImagesControlModel";
aServiceNames[1] = "com.sun.star.awt.UnoControlModel";
return aServiceNames;
return { "com.sun.star.awt.AnimatedImagesControlModel", "com.sun.star.awt.UnoControlModel" };
}
@@ -327,9 +327,7 @@ private:
Sequence< OUString > SAL_CALL DefaultGridColumnModel::getSupportedServiceNames( )
{
const OUString aServiceName("com.sun.star.awt.grid.DefaultGridColumnModel");
const Sequence< OUString > aSeq( &aServiceName, 1 );
return aSeq;
return { "com.sun.star.awt.grid.DefaultGridColumnModel" };
}
+1 -3
View File
@@ -273,9 +273,7 @@ namespace toolkit
css::uno::Sequence< OUString > SAL_CALL GridColumn::getSupportedServiceNames( )
{
const OUString aServiceName("com.sun.star.awt.grid.GridColumn");
const Sequence< OUString > aSeq( &aServiceName, 1 );
return aSeq;
return { "com.sun.star.awt.grid.GridColumn" };
}
+3 -5
View File
@@ -115,11 +115,9 @@ protected:
Sequence< OUString > SAL_CALL SpinningProgressControlModel::getSupportedServiceNames()
{
Sequence< OUString > aServiceNames(3);
aServiceNames[0] = "com.sun.star.awt.SpinningProgressControlModel";
aServiceNames[1] = "com.sun.star.awt.AnimatedImagesControlModel";
aServiceNames[2] = "com.sun.star.awt.UnoControlModel";
return aServiceNames;
return { "com.sun.star.awt.SpinningProgressControlModel",
"com.sun.star.awt.AnimatedImagesControlModel",
"com.sun.star.awt.UnoControlModel" };
}
}