diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-08-16 14:54:28 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-08-16 16:03:47 +0200 |
commit | 973424ab312bfe38caa486304f5d9dae2cd59069 (patch) | |
tree | c895af2d93d0e3d7117cdf54b953ab906c570c10 | |
parent | 003369b6d76225761373d46754890dd7f3c296c3 (diff) |
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in i18npool
Change-Id: I99563b620056e7cd665a2b3330d15c73d0144c7e
Reviewed-on: https://gerrit.libreoffice.org/77583
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
11 files changed, 13 insertions, 27 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index 0eb7737c9156..7fcd4a808c51 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -629,8 +629,7 @@ BreakIteratorImpl::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL BreakIteratorImpl::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.i18n.BreakIterator" }; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.BreakIterator" }; } } diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx index 35e70146c3f9..be07222a347f 100644 --- a/i18npool/source/calendar/calendarImpl.cxx +++ b/i18npool/source/calendar/calendarImpl.cxx @@ -365,10 +365,8 @@ CalendarImpl::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL CalendarImpl::getSupportedServiceNames() { - Sequence< OUString > aRet(2); - aRet[0] = "com.sun.star.i18n.LocaleCalendar"; - aRet[1] = "com.sun.star.i18n.LocaleCalendar2"; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.LocaleCalendar", + "com.sun.star.i18n.LocaleCalendar2" }; } } diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 05769bc65eb1..3a2ae64d598d 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -286,8 +286,7 @@ sal_Bool SAL_CALL cclass_Unicode::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL cclass_Unicode::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.i18n.CharacterClassification_Unicode" }; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.CharacterClassification_Unicode" }; } } diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx index c7db5f0f9df4..5693788316a8 100644 --- a/i18npool/source/characterclassification/characterclassificationImpl.cxx +++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx @@ -202,8 +202,7 @@ CharacterClassificationImpl::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL CharacterClassificationImpl::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.i18n.CharacterClassification" }; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.CharacterClassification" }; } } diff --git a/i18npool/source/characterclassification/unoscripttypedetector.cxx b/i18npool/source/characterclassification/unoscripttypedetector.cxx index 78324ba85756..dd6847b82c0c 100644 --- a/i18npool/source/characterclassification/unoscripttypedetector.cxx +++ b/i18npool/source/characterclassification/unoscripttypedetector.cxx @@ -78,8 +78,7 @@ UnoScriptTypeDetector::supportsService(const OUString& ServiceName) css::uno::Sequence< OUString > SAL_CALL UnoScriptTypeDetector::getSupportedServiceNames() { - css::uno::Sequence< OUString > aRet { "com.sun.star.i18n.ScriptTypeDetector" }; - return aRet; + return css::uno::Sequence< OUString > { "com.sun.star.i18n.ScriptTypeDetector" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index fb2edb5f7447..c099c17e8b04 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -219,8 +219,7 @@ sal_Bool SAL_CALL CollatorImpl::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL CollatorImpl::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.i18n.Collator" }; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.Collator" }; } } diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 6e563585506f..fb6c350e9809 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -1216,8 +1216,7 @@ NativeNumberSupplierService::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL NativeNumberSupplierService::getSupportedServiceNames() { - Sequence< OUString > aRet {implementationName, "com.sun.star.i18n.NativeNumberSupplier2"}; - return aRet; + return Sequence< OUString > {implementationName, "com.sun.star.i18n.NativeNumberSupplier2"}; } } diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx index 680d3ccfef1d..25f32dc5495c 100644 --- a/i18npool/source/numberformatcode/numberformatcode.cxx +++ b/i18npool/source/numberformatcode/numberformatcode.cxx @@ -258,8 +258,7 @@ sal_Bool SAL_CALL NumberFormatCodeMapper::supportsService(const OUString& rServi css::uno::Sequence< OUString > SAL_CALL NumberFormatCodeMapper::getSupportedServiceNames() { - css::uno::Sequence< OUString > aRet { "com.sun.star.i18n.NumberFormatMapper" }; - return aRet; + return css::uno::Sequence< OUString > { "com.sun.star.i18n.NumberFormatMapper" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx index 6033441c489c..b273c8a75bda 100644 --- a/i18npool/source/textconversion/textconversionImpl.cxx +++ b/i18npool/source/textconversion/textconversionImpl.cxx @@ -116,8 +116,7 @@ TextConversionImpl::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL TextConversionImpl::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.i18n.TextConversion" }; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.TextConversion" }; } } diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx index 084f991048c4..a67c4fc70f23 100644 --- a/i18npool/source/transliteration/transliterationImpl.cxx +++ b/i18npool/source/transliteration/transliterationImpl.cxx @@ -525,9 +525,7 @@ TransliterationImpl::transliterateRange( const OUString& str1, const OUString& s if (numCascade == 1) return bodyCascade[0]->transliterateRange(str1, str2); - Sequence< OUString > ostr(2); - ostr[0] = str1; - ostr[1] = str2; + Sequence< OUString > ostr{ str1, str2 }; return getRange(ostr, 2, 0); } @@ -650,8 +648,7 @@ TransliterationImpl::supportsService(const OUString& rServiceName) Sequence< OUString > SAL_CALL TransliterationImpl::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.i18n.Transliteration" }; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.Transliteration" }; } } diff --git a/i18npool/source/transliteration/transliteration_commonclass.cxx b/i18npool/source/transliteration/transliteration_commonclass.cxx index f235859199bb..439bfc93d1c1 100644 --- a/i18npool/source/transliteration/transliteration_commonclass.cxx +++ b/i18npool/source/transliteration/transliteration_commonclass.cxx @@ -128,8 +128,7 @@ sal_Bool SAL_CALL transliteration_commonclass::supportsService(const OUString& r Sequence< OUString > SAL_CALL transliteration_commonclass::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.i18n.Transliteration.l10n" }; - return aRet; + return Sequence< OUString > { "com.sun.star.i18n.Transliteration.l10n" }; } } |