diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-08-17 20:32:59 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-08-17 22:16:31 +0200 |
commit | cc70a9dec7730661aacd5fe7ed62f0a29ebf1084 (patch) | |
tree | 840ae6e913a7e810951b2348c8bfd3909b881c8e | |
parent | 7990680e92e4fba376ef4f9346d1bc53661bde30 (diff) |
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>
-rw-r--r-- | sfx2/source/appl/appdispatchprovider.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/appl/xpackcreator.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/backingcomp.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/ownsubfilterservice.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/view/frmload.cxx | 5 | ||||
-rw-r--r-- | stoc/source/javaloader/javaloader.cxx | 5 | ||||
-rw-r--r-- | stoc/source/proxy_factory/proxyfac.cxx | 3 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 10 | ||||
-rw-r--r-- | stoc/test/testsmgr_cpnt.cxx | 5 |
9 files changed, 10 insertions, 38 deletions
diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx index ccca8d4be667..60d0cbefa21e 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 2434cabbef7c..607d4f0993cd 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 2e36f8f18887..1de9a2daa698 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 abe4b5c63c44..598ff03bc18e 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 499149c54b83..e6885694a944 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 4832b4c346d6..06332c73329f 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 55d53661dccd..38da29b3485a 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 880b478ec847..264285d75174 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 b09bb7ea3a45..7faf7fea9686 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" }; } |