From b2a574ec54c7e34789b401a540ff14511bf583ce Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 21 Jun 2019 12:52:29 +0200 Subject: simplify some getSupportedServiceNames Change-Id: I81195505d6006b6587f7b98c1545919083f0e588 Reviewed-on: https://gerrit.libreoffice.org/74497 Tested-by: Jenkins Reviewed-by: Noel Grandin --- lingucomponent/source/languageguessing/guesslang.cxx | 3 +-- lingucomponent/source/numbertext/numbertext.cxx | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'lingucomponent') diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index 8e2fc213d089..db8d67eaa6c1 100644 --- a/lingucomponent/source/languageguessing/guesslang.cxx +++ b/lingucomponent/source/languageguessing/guesslang.cxx @@ -328,8 +328,7 @@ Sequence SAL_CALL LangGuess_Impl::getSupportedServiceNames( ) Sequence LangGuess_Impl::getSupportedServiceNames_Static( ) { - OUString aName( SERVICENAME ); - return Sequence< OUString >( &aName, 1 ); + return { SERVICENAME }; } /** diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx index 094920bf5802..58896ea41bf2 100644 --- a/lingucomponent/source/numbertext/numbertext.cxx +++ b/lingucomponent/source/numbertext/numbertext.cxx @@ -170,11 +170,7 @@ Sequence SAL_CALL NumberText_Impl::getSupportedServiceNames() return getSupportedServiceNames_Static(); } -Sequence NumberText_Impl::getSupportedServiceNames_Static() -{ - OUString aName(SERVICENAME); - return Sequence(&aName, 1); -} +Sequence NumberText_Impl::getSupportedServiceNames_Static() { return { SERVICENAME }; } /** * Function to create a new component instance; is needed by factory helper implementation. -- cgit v1.2.3