diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-11-16 11:35:58 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-11-16 14:07:45 +0100 |
commit | 51eb969cb77f8b54681033f4959b15ce32116b56 (patch) | |
tree | db2c03214965a7575df5bf0c0c5aa970f40be57b /editeng | |
parent | 742f59eaa38a3f13b6110573b1428de45c55b035 (diff) |
Replace comphelper::ServiceInfoHelper::addToSequence
Change-Id: I325e16fdf9bbbc6f2ba2d06c417da5eeb0d48023
Reviewed-on: https://gerrit.libreoffice.org/82975
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/uno/unotext.cxx | 9 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 29 |
2 files changed, 20 insertions, 18 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 4796732b2c74..3abed7b474a5 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -45,8 +45,9 @@ #include <editeng/editeng.hxx> #include <editeng/outliner.hxx> #include <editeng/unoipset.hxx> +#include <comphelper/OUStringLiteralList.hxx> +#include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> -#include <comphelper/serviceinfohelper.hxx> #include <cppuhelper/supportsservice.hxx> #include <editeng/unonames.hxx> @@ -2163,9 +2164,9 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextBase::getSupportedServiceNames( ) uno::Sequence< OUString > SAL_CALL SvxUnoTextBase::getSupportedServiceNames_Static( ) { - uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames_Static() ); - comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.text.Text"} ); - return aSeq; + return comphelper::concatSequences( + SvxUnoTextRangeBase::getSupportedServiceNames_Static(), + comphelper::OUStringLiteralList({ "com.sun.star.text.Text" })); } namespace diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index ba9c66f3c37f..1dbf6cfafc42 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -24,7 +24,8 @@ #include <editeng/flditem.hxx> #include <editeng/unofield.hxx> #include <editeng/unotext.hxx> -#include <comphelper/serviceinfohelper.hxx> +#include <comphelper/OUStringLiteralList.hxx> +#include <comphelper/sequence.hxx> #include <cppuhelper/supportsservice.hxx> using namespace ::cppu; @@ -362,13 +363,13 @@ OUString SAL_CALL SvxUnoTextContent::getImplementationName() uno::Sequence< OUString > SAL_CALL SvxUnoTextContent::getSupportedServiceNames() { - uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() ); - comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.style.ParagraphProperties", - "com.sun.star.style.ParagraphPropertiesComplex", - "com.sun.star.style.ParagraphPropertiesAsian", - "com.sun.star.text.TextContent", - "com.sun.star.text.Paragraph"}); - return aSeq; + return comphelper::concatSequences( + SvxUnoTextRangeBase::getSupportedServiceNames(), + comphelper::OUStringLiteralList({ "com.sun.star.style.ParagraphProperties", + "com.sun.star.style.ParagraphPropertiesComplex", + "com.sun.star.style.ParagraphPropertiesAsian", + "com.sun.star.text.TextContent", + "com.sun.star.text.Paragraph" })); } @@ -643,12 +644,12 @@ sal_Bool SAL_CALL SvxUnoTextCursor::supportsService( const OUString& ServiceName uno::Sequence< OUString > SAL_CALL SvxUnoTextCursor::getSupportedServiceNames() { - uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() ); - comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.style.ParagraphProperties", - "com.sun.star.style.ParagraphPropertiesComplex", - "com.sun.star.style.ParagraphPropertiesAsian", - "com.sun.star.text.TextCursor"}); - return aSeq; + return comphelper::concatSequences( + SvxUnoTextRangeBase::getSupportedServiceNames(), + comphelper::OUStringLiteralList({ "com.sun.star.style.ParagraphProperties", + "com.sun.star.style.ParagraphPropertiesComplex", + "com.sun.star.style.ParagraphPropertiesAsian", + "com.sun.star.text.TextCursor" })); } |