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

in cppuhelper, desktop, drawinglayer, embeddedobj, extensions

Change-Id: I4c970f08c0723299f79c9e18bc71b7372a7092e4
Reviewed-on: https://gerrit.libreoffice.org/77636
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 9f235f4..8f49b4e 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -907,10 +907,7 @@ sal_Bool cppuhelper::ServiceManager::supportsService(
css::uno::Sequence< OUString >
cppuhelper::ServiceManager::getSupportedServiceNames()
{
    css::uno::Sequence< OUString > names(2);
    names[0] = "com.sun.star.lang.MultiServiceFactory";
    names[1] = "com.sun.star.lang.ServiceManager";
    return names;
    return { "com.sun.star.lang.MultiServiceFactory", "com.sun.star.lang.ServiceManager" };
}

css::uno::Reference< css::uno::XInterface >
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index acc3b70..6d4fe1a 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -328,8 +328,7 @@ sal_Bool RequestHandlerController::supportsService(

Sequence< OUString > SAL_CALL RequestHandlerController::getSupportedServiceNames()
{
    Sequence< OUString > aSeq( 0 );
    return aSeq;
    return { };
}

// XEventListener
diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx
index b41d177..cebfcb7 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -74,13 +74,11 @@ sal_Bool SAL_CALL LOKInteractionHandler::supportsService(OUString const & rServi

uno::Sequence< OUString > SAL_CALL LOKInteractionHandler::getSupportedServiceNames()
{
    uno::Sequence< OUString > aNames(3);
    aNames[0] = "com.sun.star.task.InteractionHandler";
    // added to indicate support for configuration.backend.MergeRecoveryRequest
    aNames[1] = "com.sun.star.configuration.backend.InteractionHandler";
    aNames[2] = "com.sun.star.uui.InteractionHandler";
    // for backwards compatibility
    return aNames;
    return { "com.sun.star.task.InteractionHandler",
             // added to indicate support for configuration.backend.MergeRecoveryRequest
             "com.sun.star.configuration.backend.InteractionHandler",
              // for backwards compatibility
             "com.sun.star.uui.InteractionHandler" };
}

void SAL_CALL LOKInteractionHandler::initialize(uno::Sequence<uno::Any> const & /*rArguments*/)
diff --git a/desktop/test/deployment/active/active_native.cxx b/desktop/test/deployment/active/active_native.cxx
index 0f12544..40ac55c 100644
--- a/desktop/test/deployment/active/active_native.cxx
+++ b/desktop/test/deployment/active/active_native.cxx
@@ -107,8 +107,7 @@ rtl::OUString Provider::static_getImplementationName() {

css::uno::Sequence< rtl::OUString > Provider::static_getSupportedServiceNames()
{
    rtl::OUString name("com.sun.star.test.deployment.active_native");
    return css::uno::Sequence< rtl::OUString >(&name, 1);
    return { "com.sun.star.test.deployment.active_native" };
}

css::uno::Reference< css::frame::XDispatch > Provider::queryDispatch(
diff --git a/desktop/test/deployment/passive/passive_native.cxx b/desktop/test/deployment/passive/passive_native.cxx
index 83b955a..4a631726 100644
--- a/desktop/test/deployment/passive/passive_native.cxx
+++ b/desktop/test/deployment/passive/passive_native.cxx
@@ -104,8 +104,7 @@ rtl::OUString Provider::static_getImplementationName() {

css::uno::Sequence< rtl::OUString > Provider::static_getSupportedServiceNames()
{
    rtl::OUString name("com.sun.star.test.deployment.passive_native");
    return css::uno::Sequence< rtl::OUString >(&name, 1);
    return { "com.sun.star.test.deployment.passive_native" };
}

css::uno::Reference< css::frame::XDispatch > Provider::queryDispatch(
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 6c71274..3834fa6 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -82,7 +82,7 @@ namespace drawinglayer
    {
        uno::Sequence< OUString > XPrimitive2DRenderer_getSupportedServiceNames()
        {
            return uno::Sequence< OUString > { "com.sun.star.graphic.Primitive2DTools" };
            return { "com.sun.star.graphic.Primitive2DTools" };
        }

        OUString XPrimitive2DRenderer_getImplementationName()
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx
index 1c02094..e5b855f 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -384,10 +384,7 @@ uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupportedService

uno::Sequence< OUString > OOoSpecialEmbeddedObjectFactory::impl_staticGetSupportedServiceNames()
{
    uno::Sequence< OUString > aRet(2);
    aRet[0] = "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory";
    aRet[1] = "com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory";
    return aRet;
    return { "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory", "com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory" };
}

OUString OOoSpecialEmbeddedObjectFactory::impl_staticGetImplementationName()
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 21676f7..04f2860 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -182,12 +182,7 @@ Sequence< OUString > BibliographyLoader::getSupportedServiceNames()
// ORegistryServiceManager_Static
Sequence< OUString > BibliographyLoader::getSupportedServiceNames_Static() throw(  )
{
    Sequence< OUString > aSNS( 2 );
    aSNS.getArray()[0] = "com.sun.star.frame.FrameLoader";
    //!
    aSNS.getArray()[1] = "com.sun.star.frame.Bibliography";
    //!
    return aSNS;
    return { "com.sun.star.frame.FrameLoader", "com.sun.star.frame.Bibliography" };
}

extern "C"