From b1d8262dad9939ffbf38f288d0ec60727e3742fb Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 17 Aug 2019 15:53:39 +0200 Subject: 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 --- desktop/source/app/officeipcthread.cxx | 3 +-- desktop/source/lib/lokinteractionhandler.cxx | 12 +++++------- desktop/test/deployment/active/active_native.cxx | 3 +-- desktop/test/deployment/passive/passive_native.cxx | 3 +-- 4 files changed, 8 insertions(+), 13 deletions(-) (limited to 'desktop') diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index acc3b7034077..6d4fe1a3c525 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 b41d17737b16..cebfcb72f579 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 const & /*rArguments*/) diff --git a/desktop/test/deployment/active/active_native.cxx b/desktop/test/deployment/active/active_native.cxx index 0f12544b6a6b..40ac55caa736 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 83b955a00313..4a631726aa1f 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( -- cgit