From d3f80583ee90c9b652ac5d1ef8957ec0db65fdd2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 27 Apr 2016 09:52:13 +0200 Subject: -Werror,-Wvarargs "passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]" just replace the variadic function with one taking an initializer list Change-Id: Ied3dfe835dcebef48cf35374ec4d8835f98e6779 --- editeng/source/uno/unotext.cxx | 2 +- editeng/source/uno/unotext2.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'editeng') diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 473f013306b0..e6db1ab89dbc 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2249,7 +2249,7 @@ 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, 1, "com.sun.star.text.Text" ); + comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.text.Text"} ); return aSeq; } diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 33eebb34e864..80a38bc50c35 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -367,11 +367,11 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextContent::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() ); - comphelper::ServiceInfoHelper::addToSequence( aSeq, 5, "com.sun.star.style.ParagraphProperties", + 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"); + "com.sun.star.text.Paragraph"}); return aSeq; } @@ -666,10 +666,10 @@ sal_Bool SAL_CALL SvxUnoTextCursor::supportsService( const OUString& ServiceName uno::Sequence< OUString > SAL_CALL SvxUnoTextCursor::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() ); - comphelper::ServiceInfoHelper::addToSequence( aSeq, 4,"com.sun.star.style.ParagraphProperties", + comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.style.ParagraphProperties", "com.sun.star.style.ParagraphPropertiesComplex", "com.sun.star.style.ParagraphPropertiesAsian", - "com.sun.star.text.TextCursor"); + "com.sun.star.text.TextCursor"}); return aSeq; } -- cgit