tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in sfx2, stoc
Change-Id: I7138f702317d0e693438216732bf181f1972cdc1
Reviewed-on: https://gerrit.libreoffice.org/77648
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx
index ccca8d4..60d0cbe 100644
--- a/sfx2/source/appl/appdispatchprovider.cxx
+++ b/sfx2/source/appl/appdispatchprovider.cxx
@@ -112,10 +112,7 @@ sal_Bool SAL_CALL SfxAppDispatchProvider::supportsService( const OUString& sServ
css::uno::Sequence< OUString > SAL_CALL SfxAppDispatchProvider::getSupportedServiceNames()
{
css::uno::Sequence< OUString > seqServiceNames( 2 );
seqServiceNames.getArray()[0] = "com.sun.star.frame.ProtocolHandler";
seqServiceNames.getArray()[1] = "com.sun.star.frame.AppDispatchProvider";
return seqServiceNames;
return { "com.sun.star.frame.ProtocolHandler", "com.sun.star.frame.AppDispatchProvider" };
}
Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx
index 2434cab..607d4f0 100644
--- a/sfx2/source/appl/xpackcreator.cxx
+++ b/sfx2/source/appl/xpackcreator.cxx
@@ -158,10 +158,7 @@ sal_Bool SAL_CALL OPackageStructureCreator::supportsService( const OUString& Ser
uno::Sequence< OUString > SAL_CALL OPackageStructureCreator::getSupportedServiceNames()
{
uno::Sequence< OUString > aRet(2);
aRet[0] = "com.sun.star.embed.PackageStructureCreator";
aRet[1] = "com.sun.star.comp.embed.PackageStructureCreator";
return aRet;
return { "com.sun.star.embed.PackageStructureCreator", "com.sun.star.comp.embed.PackageStructureCreator" };
}
}
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 2e36f8f..1de9a2d 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -281,10 +281,7 @@ sal_Bool SAL_CALL BackingComp::supportsService( /*IN*/ const OUString& sServiceN
css::uno::Sequence< OUString > SAL_CALL BackingComp::getSupportedServiceNames()
{
css::uno::Sequence< OUString > lNames(2);
lNames[0] = "com.sun.star.frame.StartModule";
lNames[1] = "com.sun.star.frame.ProtocolHandler";
return lNames;
return { "com.sun.star.frame.StartModule", "com.sun.star.frame.ProtocolHandler" };
}
diff --git a/sfx2/source/doc/ownsubfilterservice.cxx b/sfx2/source/doc/ownsubfilterservice.cxx
index abe4b5c..598ff03 100644
--- a/sfx2/source/doc/ownsubfilterservice.cxx
+++ b/sfx2/source/doc/ownsubfilterservice.cxx
@@ -106,10 +106,7 @@ sal_Bool SAL_CALL OwnSubFilterService::supportsService( const OUString& ServiceN
uno::Sequence< OUString > SAL_CALL OwnSubFilterService::getSupportedServiceNames()
{
uno::Sequence< OUString > aRet(2);
aRet[0] = "com.sun.star.document.OwnSubFilter";
aRet[1] = "com.sun.star.comp.document.OwnSubFilter";
return aRet;
return { "com.sun.star.document.OwnSubFilter", "com.sun.star.comp.document.OwnSubFilter" };
}
}
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 499149c..e688569 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -765,10 +765,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::supportsService( const OUString& sService
/* XServiceInfo */
Sequence< OUString > SAL_CALL SfxFrameLoader_Impl::getSupportedServiceNames()
{
Sequence< OUString > seqServiceNames( 2 );
seqServiceNames.getArray() [0] = "com.sun.star.frame.SynchronousFrameLoader";
seqServiceNames.getArray() [1] = "com.sun.star.frame.OfficeFrameLoader";
return seqServiceNames ;
return { "com.sun.star.frame.SynchronousFrameLoader", "com.sun.star.frame.OfficeFrameLoader" };
}
}
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index 4832b4c..06332c7 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -68,10 +68,7 @@ static Mutex & getInitMutex();
static Sequence< OUString > loader_getSupportedServiceNames()
{
Sequence< OUString > seqNames(2);
seqNames.getArray()[0] = "com.sun.star.loader.Java";
seqNames.getArray()[1] = "com.sun.star.loader.Java2";
return seqNames;
return { "com.sun.star.loader.Java", "com.sun.star.loader.Java2" };
}
static OUString loader_getImplementationName()
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index 55d5366..38da29b 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -56,8 +56,7 @@ OUString proxyfac_getImplementationName()
Sequence< OUString > proxyfac_getSupportedServiceNames()
{
OUString str_name = SERVICE_NAME;
return Sequence< OUString >( &str_name, 1 );
return { SERVICE_NAME };
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 880b478..264285d 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -906,10 +906,7 @@ sal_Bool OServiceManager::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > OServiceManager::getSupportedServiceNames()
{
Sequence< OUString > seqNames(2);
seqNames[0] = "com.sun.star.lang.MultiServiceFactory";
seqNames[1] = "com.sun.star.lang.ServiceManager";
return seqNames;
return { "com.sun.star.lang.MultiServiceFactory", "com.sun.star.lang.ServiceManager" };
}
@@ -1377,10 +1374,7 @@ Sequence< OUString > ORegistryServiceManager::getAvailableServiceNames()
// XServiceInfo
Sequence< OUString > ORegistryServiceManager::getSupportedServiceNames()
{
Sequence< OUString > seqNames(2);
seqNames[0] = "com.sun.star.lang.MultiServiceFactory";
seqNames[1] = "com.sun.star.lang.RegistryServiceManager";
return seqNames;
return { "com.sun.star.lang.MultiServiceFactory", "com.sun.star.lang.RegistryServiceManager" };
}
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index b09bb7e..7faf7fe 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -148,10 +148,7 @@ Sequence< OUString > Test_Manager_Impl::getSupportedServiceNames() throw ()
Sequence< OUString > Test_Manager_Impl::getSupportedServiceNames_Static() throw ()
{
Sequence< OUString > aSNS( 2 );
aSNS.getArray()[0] = SERVICE_NAME;
aSNS.getArray()[1] = "com.sun.star.bridge.Bridge";
return aSNS;
return { SERVICE_NAME, "com.sun.star.bridge.Bridge" };
}