[Libreoffice-commits] core.git: 3 commits - chart2/source comphelper/source compilerplugins/clang dbaccess/source editeng/source extensions/source include/comphelper include/svtools sd/source svtools/source svx/source sw/source

Stephan Bergmann sbergman at redhat.com
Wed Apr 27 11:48:01 UTC 2016


 chart2/source/controller/dialogs/dlg_CreationWizard.cxx     |    5 
 comphelper/source/misc/serviceinfohelper.cxx                |   14 
 compilerplugins/clang/stylepolice.cxx                       |    6 
 dbaccess/source/ext/macromigration/macromigrationdialog.cxx |    2 
 editeng/source/uno/unotext.cxx                              |    2 
 editeng/source/uno/unotext2.cxx                             |    8 
 extensions/source/abpilot/abspilot.cxx                      |   20 -
 include/comphelper/serviceinfohelper.hxx                    |    6 
 include/svtools/roadmapwizard.hxx                           |    6 
 sd/source/ui/unoidl/unoobj.cxx                              |    8 
 sd/source/ui/unoidl/unopage.cxx                             |   12 
 svtools/source/dialogs/roadmapwizard.cxx                    |   31 -
 svx/source/unodraw/unoshap3.cxx                             |   22 -
 svx/source/unodraw/unoshape.cxx                             |  206 ++++++------
 sw/source/ui/dbui/mailmergewizard.cxx                       |   10 
 15 files changed, 160 insertions(+), 198 deletions(-)

New commits:
commit 81105d9534979b6d14a5ceb58e70845892d550fa
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 27 09:54:09 2016 +0200

    -Werror,-Wvarargs
    
    "passing an object that undergoes default argument promotion to 'va_start' has
    undefined behavior [-Werror,-Wvarargs]"
    
    just drop the variadic overload and use the one taking a WizardPath (i.e., a vector)
    
    Change-Id: I6e389f60f8b7cb0633bf173bde69af1c5af86048

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 63e9a71..9098048 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -65,11 +65,10 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram
     this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD));
 
     declarePath( PATH_FULL
-        , STATE_CHARTTYPE
+        , {STATE_CHARTTYPE
         , STATE_SIMPLE_RANGE
         , STATE_DATA_SERIES
-        , STATE_OBJECTS
-        , WZS_INVALID_STATE
+        , STATE_OBJECTS}
     );
     this->SetRoadmapHelpId( HID_SCH_WIZARD_ROADMAP );
     this->SetRoadmapInteractive( true );
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index 9b807b1..cd94f21 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -135,7 +135,7 @@ namespace dbmm
         describeState( STATE_MIGRATE,           sTitleMigrate, &ProgressPage::Create      );
         describeState( STATE_SUMMARY,           sTitleSummary, &ResultPage::Create        );
 
-        declarePath( PATH_DEFAULT, STATE_CLOSE_SUB_DOCS, STATE_BACKUP_DBDOC, STATE_MIGRATE, STATE_SUMMARY, WZS_INVALID_STATE );
+        declarePath( PATH_DEFAULT, {STATE_CLOSE_SUB_DOCS, STATE_BACKUP_DBDOC, STATE_MIGRATE, STATE_SUMMARY} );
 
         SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
         SetRoadmapInteractive( true );
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index 7e978e4..81c1f71 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -64,32 +64,28 @@ namespace abp
         SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
 
         declarePath( PATH_COMPLETE,
-            STATE_SELECT_ABTYPE,
+            {STATE_SELECT_ABTYPE,
             STATE_INVOKE_ADMIN_DIALOG,
             STATE_TABLE_SELECTION,
             STATE_MANUAL_FIELD_MAPPING,
-            STATE_FINAL_CONFIRM,
-            WZS_INVALID_STATE
+            STATE_FINAL_CONFIRM}
         );
         declarePath( PATH_NO_SETTINGS,
-            STATE_SELECT_ABTYPE,
+            {STATE_SELECT_ABTYPE,
             STATE_TABLE_SELECTION,
             STATE_MANUAL_FIELD_MAPPING,
-            STATE_FINAL_CONFIRM,
-            WZS_INVALID_STATE
+            STATE_FINAL_CONFIRM}
         );
         declarePath( PATH_NO_FIELDS,
-            STATE_SELECT_ABTYPE,
+            {STATE_SELECT_ABTYPE,
             STATE_INVOKE_ADMIN_DIALOG,
             STATE_TABLE_SELECTION,
-            STATE_FINAL_CONFIRM,
-            WZS_INVALID_STATE
+            STATE_FINAL_CONFIRM}
         );
         declarePath( PATH_NO_SETTINGS_NO_FIELDS,
-            STATE_SELECT_ABTYPE,
+            {STATE_SELECT_ABTYPE,
             STATE_TABLE_SELECTION,
-            STATE_FINAL_CONFIRM,
-            WZS_INVALID_STATE
+            STATE_FINAL_CONFIRM}
         );
 
         m_pPrevPage->SetHelpId(HID_ABSPILOT_PREVIOUS);
diff --git a/include/svtools/roadmapwizard.hxx b/include/svtools/roadmapwizard.hxx
index b79f928..7e588e9 100644
--- a/include/svtools/roadmapwizard.hxx
+++ b/include/svtools/roadmapwizard.hxx
@@ -107,13 +107,7 @@ namespace svt
             @param _nId
                 the unique id you wish to give this path. This id can later on be used
                 to refer to the path which you just declared
-
-            @param _nFirstState
-                the first state in this path. Must not be WZS_INVALID_STATE.<br/>
-                Declare an arbitrary number of states after this one, and terminate the sequence
-                with a WZS_INVALID_STATE.
         */
-        void    declarePath( PathId _nPathId, WizardState _nFirstState, ... );
         void    declarePath( PathId _nPathId, const WizardPath& _lWizardStates);
 
         /** provides basic information about a state
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index eb0730c..1df26b6 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -24,8 +24,6 @@
 #include <roadmap.hxx>
 #include <tools/debug.hxx>
 
-#include <stdarg.h>
-
 #include <vector>
 #include <map>
 #include <set>
@@ -182,35 +180,6 @@ namespace svt
     }
 
 
-    void RoadmapWizard::declarePath( PathId _nPathId, WizardState _nFirstState, ... )
-    {
-
-        DBG_ASSERT( _nFirstState != WZS_INVALID_STATE, "RoadmapWizard::declarePath: there should be at least one state in the path!" );
-        if ( _nFirstState == WZS_INVALID_STATE )
-            return;
-
-        WizardPath aNewPath;
-
-        // collect the elements of the path
-        va_list aStateList;
-        va_start( aStateList, _nFirstState );
-
-        WizardState nState = _nFirstState;
-        while ( nState != WZS_INVALID_STATE )
-        {
-            aNewPath.push_back( nState );
-            nState = sal::static_int_cast< WizardState >(
-                va_arg( aStateList, int ));
-        }
-        va_end( aStateList );
-
-        DBG_ASSERT( _nFirstState == 0, "RoadmapWizard::declarePath: first state must be NULL." );
-            // The WizardDialog (our very base class) always starts with a mnCurLevel == 0
-
-        declarePath( _nPathId, aNewPath );
-    }
-
-
     void RoadmapWizard::describeState( WizardState _nState, const OUString& _rStateDisplayName, RoadmapPageFactory _pPageFactory )
     {
         OSL_ENSURE( m_pImpl->aStateDescriptors.find( _nState ) == m_pImpl->aStateDescriptors.end(),
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 8c60483..fb15c80 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -64,21 +64,19 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem
     if(rItem.IsMailAvailable())
         declarePath(
             0,
-            MM_DOCUMENTSELECTPAGE,
+            {MM_DOCUMENTSELECTPAGE,
             MM_OUTPUTTYPETPAGE,
             MM_ADDRESSBLOCKPAGE,
             MM_GREETINGSPAGE,
-            MM_LAYOUTPAGE,
-            WZS_INVALID_STATE
+            MM_LAYOUTPAGE}
         );
     else
         declarePath(
             0,
-            MM_DOCUMENTSELECTPAGE,
+            {MM_DOCUMENTSELECTPAGE,
             MM_ADDRESSBLOCKPAGE,
             MM_GREETINGSPAGE,
-            MM_LAYOUTPAGE,
-            WZS_INVALID_STATE
+            MM_LAYOUTPAGE}
         );
 
     ActivatePage();
commit d3f80583ee90c9b652ac5d1ef8957ec0db65fdd2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 27 09:52:13 2016 +0200

    -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

diff --git a/comphelper/source/misc/serviceinfohelper.cxx b/comphelper/source/misc/serviceinfohelper.cxx
index ad85110..838f4fe 100644
--- a/comphelper/source/misc/serviceinfohelper.cxx
+++ b/comphelper/source/misc/serviceinfohelper.cxx
@@ -19,7 +19,6 @@
 
 
 #include <comphelper/serviceinfohelper.hxx>
-#include <stdarg.h>
 
 // #####################################################################
 
@@ -39,20 +38,17 @@ css::uno::Sequence< OUString > ServiceInfoHelper::getSupportedServiceNames() thr
     return aSeq;
 }
 
-/** this method adds a variable number of char pointer to a given Sequence
+/** this method adds a variable number of OUString to a given Sequence
  */
-void ServiceInfoHelper::addToSequence( css::uno::Sequence< OUString >& rSeq, sal_uInt16 nServices, /* char * */ ... ) throw()
+void ServiceInfoHelper::addToSequence( css::uno::Sequence< OUString >& rSeq, std::initializer_list<OUString> services ) throw()
 {
     sal_uInt32 nCount = rSeq.getLength();
 
-    rSeq.realloc( nCount + nServices );
+    rSeq.realloc( nCount + services.size() );
     OUString* pStrings = rSeq.getArray();
 
-    va_list marker;
-    va_start( marker, nServices );
-    for( sal_uInt16 i = 0 ; i < nServices; i++ )
-        pStrings[nCount++] = OUString::createFromAscii(va_arg( marker, char*));
-    va_end( marker );
+    for( auto const & s: services )
+        pStrings[nCount++] = s;
 }
 
 }
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 473f013..e6db1ab 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 33eebb3..80a38bc 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;
 }
 
diff --git a/include/comphelper/serviceinfohelper.hxx b/include/comphelper/serviceinfohelper.hxx
index 9589451..9cd2076 100644
--- a/include/comphelper/serviceinfohelper.hxx
+++ b/include/comphelper/serviceinfohelper.hxx
@@ -20,6 +20,10 @@
 #ifndef INCLUDED_COMPHELPER_SERVICEINFOHELPER_HXX
 #define INCLUDED_COMPHELPER_SERVICEINFOHELPER_HXX
 
+#include <sal/config.h>
+
+#include <initializer_list>
+
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <comphelper/comphelperdllapi.h>
 
@@ -39,7 +43,7 @@ public:
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
 
     // helper
-    static void addToSequence( css::uno::Sequence< OUString >& rSeq, sal_uInt16 nServices, /* sal_Char* */... ) throw();
+    static void addToSequence( css::uno::Sequence< OUString >& rSeq, std::initializer_list<OUString> services ) throw();
 
 protected:
     ~ServiceInfoHelper() {}
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 57e8614..f833ae5 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -862,8 +862,8 @@ uno::Sequence< OUString > SAL_CALL SdXShape::getSupportedServiceNames() throw(cs
 {
     uno::Sequence< OUString > aSeq( mpShape->_getSupportedServiceNames() );
 
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.presentation.Shape",
-                                                  "com.sun.star.document.LinkTarget" );
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.Shape",
+                                                  "com.sun.star.document.LinkTarget"} );
 
     SdrObject* pObj = mpShape->GetSdrObject();
     if(pObj && pObj->GetObjInventor() == SdrInventor )
@@ -872,10 +872,10 @@ uno::Sequence< OUString > SAL_CALL SdXShape::getSupportedServiceNames() throw(cs
         switch( nInventor )
         {
         case OBJ_TITLETEXT:
-            comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.TitleTextShape" );
+            comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.TitleTextShape"} );
             break;
         case OBJ_OUTLINETEXT:
-            comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.OutlinerShape" );
+            comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.OutlinerShape"} );
             break;
         }
     }
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index cea55cb..4aafc5f 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1511,9 +1511,9 @@ Sequence< OUString > SAL_CALL SdGenericDrawPage::getSupportedServiceNames()
     throw(uno::RuntimeException, std::exception)
 {
     Sequence< OUString > aSeq( SvxFmDrawPage::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 3, "com.sun.star.drawing.GenericDrawPage",
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.GenericDrawPage",
                                                   "com.sun.star.document.LinkTarget",
-                                                  "com.sun.star.document.LinkTargetSupplier");
+                                                  "com.sun.star.document.LinkTargetSupplier"});
     return aSeq;
 }
 
@@ -2244,10 +2244,10 @@ Sequence< OUString > SAL_CALL SdDrawPage::getSupportedServiceNames() throw(uno::
     throwIfDisposed();
 
     Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.drawing.DrawPage" );
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.DrawPage"} );
 
     if( mbIsImpressDocument )
-        comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.DrawPage" );
+        comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.DrawPage"} );
 
     return aSeq;
 }
@@ -2794,10 +2794,10 @@ Sequence< OUString > SAL_CALL SdMasterPage::getSupportedServiceNames() throw(uno
     throwIfDisposed();
 
     Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.drawing.MasterPage" );
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.MasterPage"} );
 
     if( SvxFmDrawPage::mpPage && static_cast<SdPage*>(SvxFmDrawPage::mpPage)->GetPageKind() == PK_HANDOUT )
-        comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.HandoutMasterPage" );
+        comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.HandoutMasterPage"} );
 
     return aSeq;
 }
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index da2b4ba..6bd9c7f 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -466,7 +466,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DSceneObject::getSupportedServiceNames()
     throw(uno::RuntimeException, std::exception)
 {
     uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.drawing.Shape3DScene" );
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.Shape3DScene"} );
     return aSeq;
 }
 Svx3DCubeObject::Svx3DCubeObject( SdrObject* pObj ) throw()
@@ -589,8 +589,8 @@ uno::Sequence< OUString > SAL_CALL Svx3DCubeObject::getSupportedServiceNames()
     throw(uno::RuntimeException, std::exception)
 {
     uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
-                            "com.sun.star.drawing.Shape3DCube");
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.Shape3D",
+                            "com.sun.star.drawing.Shape3DCube"});
     return aSeq;
 }
 Svx3DSphereObject::Svx3DSphereObject( SdrObject* pObj ) throw()
@@ -697,8 +697,8 @@ uno::Sequence< OUString > SAL_CALL Svx3DSphereObject::getSupportedServiceNames()
     throw(uno::RuntimeException, std::exception)
 {
     uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
-                            "com.sun.star.drawing.Shape3DSphere");
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.Shape3D",
+                            "com.sun.star.drawing.Shape3DSphere"});
     return aSeq;
 }
 Svx3DLatheObject::Svx3DLatheObject( SdrObject* pObj ) throw()
@@ -898,8 +898,8 @@ uno::Sequence< OUString > SAL_CALL Svx3DLatheObject::getSupportedServiceNames()
     throw(uno::RuntimeException, std::exception)
 {
     uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
-                            "com.sun.star.drawing.Shape3DLathe");
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.Shape3D",
+                            "com.sun.star.drawing.Shape3DLathe"});
     return aSeq;
 }
 Svx3DExtrudeObject::Svx3DExtrudeObject( SdrObject* pObj ) throw()
@@ -1002,8 +1002,8 @@ uno::Sequence< OUString > SAL_CALL Svx3DExtrudeObject::getSupportedServiceNames(
     throw(uno::RuntimeException, std::exception)
 {
     uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
-                            "com.sun.star.drawing.Shape3DExtrude");
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.Shape3D",
+                            "com.sun.star.drawing.Shape3DExtrude"});
     return aSeq;
 }
 Svx3DPolygonObject::Svx3DPolygonObject( SdrObject* pObj ) throw()
@@ -1141,8 +1141,8 @@ uno::Sequence< OUString > SAL_CALL Svx3DPolygonObject::getSupportedServiceNames(
     throw(uno::RuntimeException, std::exception)
 {
     Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
-    comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
-                            "com.sun.star.drawing.Shape3DPolygon");
+    comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.Shape3D",
+                            "com.sun.star.drawing.Shape3DPolygon"});
     return aSeq;
 }
 
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 51cfdca..599c024 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -3104,49 +3104,49 @@ OUString SAL_CALL SvxShape::getImplementationName()
 
 #define STAR_NAMESPACE "com.sun.star."
 
-const char* sUNO_service_style_ParagraphProperties          = STAR_NAMESPACE "style.ParagraphProperties";
-const char* sUNO_service_style_ParagraphPropertiesComplex   = STAR_NAMESPACE "style.ParagraphPropertiesComplex";
-const char* sUNO_service_style_ParagraphPropertiesAsian     = STAR_NAMESPACE "style.ParagraphPropertiesAsian";
-const char* sUNO_service_style_CharacterProperties          = STAR_NAMESPACE "style.CharacterProperties";
-const char* sUNO_service_style_CharacterPropertiesComplex   = STAR_NAMESPACE "style.CharacterPropertiesComplex";
-const char* sUNO_service_style_CharacterPropertiesAsian     = STAR_NAMESPACE "style.CharacterPropertiesAsian";
-
-const char* sUNO_service_drawing_FillProperties             = STAR_NAMESPACE "drawing.FillProperties";
-const char* sUNO_service_drawing_TextProperties             = STAR_NAMESPACE "drawing.TextProperties";
-const char* sUNO_service_drawing_LineProperties             = STAR_NAMESPACE "drawing.LineProperties";
-const char* sUNO_service_drawing_ConnectorProperties        = STAR_NAMESPACE "drawing.ConnectorProperties";
-const char* sUNO_service_drawing_MeasureProperties          = STAR_NAMESPACE "drawing.MeasureProperties";
-const char* sUNO_service_drawing_ShadowProperties           = STAR_NAMESPACE "drawing.ShadowProperties";
-
-const char* sUNO_service_drawing_RotationDescriptor         = STAR_NAMESPACE "drawing.RotationDescriptor";
-
-const char* sUNO_service_drawing_Text                       = STAR_NAMESPACE "drawing.Text";
-const char* sUNO_service_drawing_GroupShape                 = STAR_NAMESPACE "drawing.GroupShape";
-
-const char* sUNO_service_drawing_CustomShapeProperties      = STAR_NAMESPACE "drawing.CustomShapeProperties";
-const char* sUNO_service_drawing_CustomShape                    = STAR_NAMESPACE "drawing.CustomShape";
-
-const char* sUNO_service_drawing_PolyPolygonDescriptor      = STAR_NAMESPACE "drawing.PolyPolygonDescriptor";
-const char* sUNO_service_drawing_PolyPolygonBezierDescriptor= STAR_NAMESPACE "drawing.PolyPolygonBezierDescriptor";
-
-const char* sUNO_service_drawing_LineShape                  = STAR_NAMESPACE "drawing.LineShape";
-const char* sUNO_service_drawing_Shape                      = STAR_NAMESPACE "drawing.Shape";
-const char* sUNO_service_drawing_RectangleShape             = STAR_NAMESPACE "drawing.RectangleShape";
-const char* sUNO_service_drawing_EllipseShape               = STAR_NAMESPACE "drawing.EllipseShape";
-const char* sUNO_service_drawing_PolyPolygonShape           = STAR_NAMESPACE "drawing.PolyPolygonShape";
-const char* sUNO_service_drawing_PolyLineShape              = STAR_NAMESPACE "drawing.PolyLineShape";
-const char* sUNO_service_drawing_OpenBezierShape            = STAR_NAMESPACE "drawing.OpenBezierShape";
-const char* sUNO_service_drawing_ClosedBezierShape          = STAR_NAMESPACE "drawing.ClosedBezierShape";
-const char* sUNO_service_drawing_TextShape                  = STAR_NAMESPACE "drawing.TextShape";
-const char* sUNO_service_drawing_GraphicObjectShape         = STAR_NAMESPACE "drawing.GraphicObjectShape";
-const char* sUNO_service_drawing_OLE2Shape                  = STAR_NAMESPACE "drawing.OLE2Shape";
-const char* sUNO_service_drawing_PageShape                  = STAR_NAMESPACE "drawing.PageShape";
-const char* sUNO_service_drawing_CaptionShape               = STAR_NAMESPACE "drawing.CaptionShape";
-const char* sUNO_service_drawing_MeasureShape               = STAR_NAMESPACE "drawing.MeasureShape";
-const char* sUNO_service_drawing_FrameShape                 = STAR_NAMESPACE "drawing.FrameShape";
-const char* sUNO_service_drawing_ControlShape               = STAR_NAMESPACE "drawing.ControlShape";
-const char* sUNO_service_drawing_ConnectorShape             = STAR_NAMESPACE "drawing.ConnectorShape";
-const char* sUNO_service_drawing_MediaShape                 = STAR_NAMESPACE "drawing.MediaShape";
+const char sUNO_service_style_ParagraphProperties[]          = STAR_NAMESPACE "style.ParagraphProperties";
+const char sUNO_service_style_ParagraphPropertiesComplex[]   = STAR_NAMESPACE "style.ParagraphPropertiesComplex";
+const char sUNO_service_style_ParagraphPropertiesAsian[]     = STAR_NAMESPACE "style.ParagraphPropertiesAsian";
+const char sUNO_service_style_CharacterProperties[]          = STAR_NAMESPACE "style.CharacterProperties";
+const char sUNO_service_style_CharacterPropertiesComplex[]   = STAR_NAMESPACE "style.CharacterPropertiesComplex";
+const char sUNO_service_style_CharacterPropertiesAsian[]     = STAR_NAMESPACE "style.CharacterPropertiesAsian";
+
+const char sUNO_service_drawing_FillProperties[]             = STAR_NAMESPACE "drawing.FillProperties";
+const char sUNO_service_drawing_TextProperties[]             = STAR_NAMESPACE "drawing.TextProperties";
+const char sUNO_service_drawing_LineProperties[]             = STAR_NAMESPACE "drawing.LineProperties";
+const char sUNO_service_drawing_ConnectorProperties[]        = STAR_NAMESPACE "drawing.ConnectorProperties";
+const char sUNO_service_drawing_MeasureProperties[]          = STAR_NAMESPACE "drawing.MeasureProperties";
+const char sUNO_service_drawing_ShadowProperties[]           = STAR_NAMESPACE "drawing.ShadowProperties";
+
+const char sUNO_service_drawing_RotationDescriptor[]         = STAR_NAMESPACE "drawing.RotationDescriptor";
+
+const char sUNO_service_drawing_Text[]                       = STAR_NAMESPACE "drawing.Text";
+const char sUNO_service_drawing_GroupShape[]                 = STAR_NAMESPACE "drawing.GroupShape";
+
+const char sUNO_service_drawing_CustomShapeProperties[]      = STAR_NAMESPACE "drawing.CustomShapeProperties";
+const char sUNO_service_drawing_CustomShape[]                    = STAR_NAMESPACE "drawing.CustomShape";
+
+const char sUNO_service_drawing_PolyPolygonDescriptor[]      = STAR_NAMESPACE "drawing.PolyPolygonDescriptor";
+const char sUNO_service_drawing_PolyPolygonBezierDescriptor[]= STAR_NAMESPACE "drawing.PolyPolygonBezierDescriptor";
+
+const char sUNO_service_drawing_LineShape[]                  = STAR_NAMESPACE "drawing.LineShape";
+const char sUNO_service_drawing_Shape[]                      = STAR_NAMESPACE "drawing.Shape";
+const char sUNO_service_drawing_RectangleShape[]             = STAR_NAMESPACE "drawing.RectangleShape";
+const char sUNO_service_drawing_EllipseShape[]               = STAR_NAMESPACE "drawing.EllipseShape";
+const char sUNO_service_drawing_PolyPolygonShape[]           = STAR_NAMESPACE "drawing.PolyPolygonShape";
+const char sUNO_service_drawing_PolyLineShape[]              = STAR_NAMESPACE "drawing.PolyLineShape";
+const char sUNO_service_drawing_OpenBezierShape[]            = STAR_NAMESPACE "drawing.OpenBezierShape";
+const char sUNO_service_drawing_ClosedBezierShape[]          = STAR_NAMESPACE "drawing.ClosedBezierShape";
+const char sUNO_service_drawing_TextShape[]                  = STAR_NAMESPACE "drawing.TextShape";
+const char sUNO_service_drawing_GraphicObjectShape[]         = STAR_NAMESPACE "drawing.GraphicObjectShape";
+const char sUNO_service_drawing_OLE2Shape[]                  = STAR_NAMESPACE "drawing.OLE2Shape";
+const char sUNO_service_drawing_PageShape[]                  = STAR_NAMESPACE "drawing.PageShape";
+const char sUNO_service_drawing_CaptionShape[]               = STAR_NAMESPACE "drawing.CaptionShape";
+const char sUNO_service_drawing_MeasureShape[]               = STAR_NAMESPACE "drawing.MeasureShape";
+const char sUNO_service_drawing_FrameShape[]                 = STAR_NAMESPACE "drawing.FrameShape";
+const char sUNO_service_drawing_ControlShape[]               = STAR_NAMESPACE "drawing.ControlShape";
+const char sUNO_service_drawing_ConnectorShape[]             = STAR_NAMESPACE "drawing.ConnectorShape";
+const char sUNO_service_drawing_MediaShape[]                 = STAR_NAMESPACE "drawing.MediaShape";
 
 
 uno::Sequence< OUString > SAL_CALL SvxShape::getSupportedServiceNames()
@@ -3180,9 +3180,9 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_GroupServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_GroupServices, 2,
-                            sUNO_service_drawing_GroupShape,
-                              sUNO_service_drawing_Shape );
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_GroupServices,
+                            {sUNO_service_drawing_GroupShape,
+                              sUNO_service_drawing_Shape} );
 
                         pSeq = &SvxShape_GroupServices;
                 }
@@ -3196,8 +3196,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_CustomShapeServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_CustomShapeServices, 13,
-                            sUNO_service_drawing_CustomShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_CustomShapeServices,
+                            {sUNO_service_drawing_CustomShape,
                               sUNO_service_drawing_Shape,
                             sUNO_service_drawing_CustomShapeProperties,
                             sUNO_service_drawing_FillProperties,
@@ -3211,7 +3211,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesComplex,
                             sUNO_service_style_CharacterPropertiesAsian,
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
                         pSeq = &SvxShape_CustomShapeServices;
                 }
                 return *pSeq;
@@ -3223,8 +3223,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_LineServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_LineServices,14,
-                            sUNO_service_drawing_LineShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_LineServices,
+                            {sUNO_service_drawing_LineShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_LineProperties,
@@ -3240,7 +3240,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
 
                             sUNO_service_drawing_PolyPolygonDescriptor,
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_LineServices;
                 }
@@ -3254,8 +3254,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_RectServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_RectServices,14,
-                            sUNO_service_drawing_RectangleShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_RectServices,
+                            {sUNO_service_drawing_RectangleShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_FillProperties,
@@ -3270,7 +3270,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
                         pSeq = &SvxShape_RectServices;
                 }
                 return *pSeq;
@@ -3286,8 +3286,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_CircServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_CircServices,14,
-                            sUNO_service_drawing_EllipseShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_CircServices,
+                            {sUNO_service_drawing_EllipseShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_FillProperties,
@@ -3303,7 +3303,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_CircServices;
                 }
@@ -3318,8 +3318,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 if( nullptr == pSeq )
                 {
                         static uno::Sequence< OUString > SvxShape_PathServices;
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_PathServices,14,
-                            sUNO_service_drawing_PolyLineShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_PathServices,
+                            {sUNO_service_drawing_PolyLineShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_LineProperties,
@@ -3336,7 +3336,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
                         pSeq = &SvxShape_PathServices;
                 }
                 return *pSeq;
@@ -3349,8 +3349,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 if( nullptr == pSeq )
                 {
                         static uno::Sequence< OUString > SvxShape_PolyServices;
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_PolyServices,15,
-                            sUNO_service_drawing_PolyPolygonShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_PolyServices,
+                            {sUNO_service_drawing_PolyPolygonShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_LineProperties,
@@ -3368,7 +3368,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_PolyServices;
                 }
@@ -3383,8 +3383,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_FreeLineServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_FreeLineServices,15,
-                            sUNO_service_drawing_OpenBezierShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_FreeLineServices,
+                            {sUNO_service_drawing_OpenBezierShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_LineProperties,
@@ -3402,7 +3402,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_FreeLineServices;
                 }
@@ -3417,8 +3417,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 if( nullptr == pSeq )
                 {
                         static uno::Sequence< OUString > SvxShape_FreeFillServices;
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_FreeFillServices,15,
-                            sUNO_service_drawing_ClosedBezierShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_FreeFillServices,
+                            {sUNO_service_drawing_ClosedBezierShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_LineProperties,
@@ -3436,7 +3436,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_FreeFillServices;
                 }
@@ -3451,8 +3451,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 if( nullptr == pSeq )
                 {
                         static uno::Sequence< OUString > SvxShape_TextServices;
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_TextServices,14,
-                            sUNO_service_drawing_TextShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_TextServices,
+                            {sUNO_service_drawing_TextShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_FillProperties,
@@ -3468,7 +3468,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_TextServices;
                 }
@@ -3481,8 +3481,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 if( nullptr == pSeq )
                 {
                         static uno::Sequence< OUString > SvxShape_GrafServices;
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_GrafServices, 12,
-                            sUNO_service_drawing_GraphicObjectShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_GrafServices,
+                            {sUNO_service_drawing_GraphicObjectShape,
 
                             sUNO_service_drawing_Shape,
 
@@ -3496,7 +3496,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_GrafServices;
                 }
@@ -3510,8 +3510,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_Ole2Services;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_Ole2Services, 12,
-                            sUNO_service_drawing_OLE2Shape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_Ole2Services,
+                            {sUNO_service_drawing_OLE2Shape,
                             sUNO_service_drawing_Shape,
 
                             // #i118485# Added Text, Shadow and Rotation
@@ -3525,7 +3525,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_Ole2Services;
                 }
@@ -3539,8 +3539,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_CaptionServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_CaptionServices,14,
-                            sUNO_service_drawing_CaptionShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_CaptionServices,
+                            {sUNO_service_drawing_CaptionShape,
 
                             sUNO_service_drawing_Shape,
                             sUNO_service_drawing_FillProperties,
@@ -3556,7 +3556,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                             sUNO_service_style_CharacterPropertiesAsian,
 
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_CaptionServices;
                 }
@@ -3571,9 +3571,9 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_PageServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_PageServices, 2,
-                            sUNO_service_drawing_PageShape,
-                            sUNO_service_drawing_Shape );
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_PageServices,
+                            {sUNO_service_drawing_PageShape,
+                            sUNO_service_drawing_Shape} );
 
                         pSeq = &SvxShape_PageServices;
                 }
@@ -3587,8 +3587,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 if( nullptr == pSeq )
                 {
                         static uno::Sequence< OUString > SvxShape_MeasureServices;
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_MeasureServices,15,
-                            sUNO_service_drawing_MeasureShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_MeasureServices,
+                            {sUNO_service_drawing_MeasureShape,
 
                             sUNO_service_drawing_MeasureProperties,
 
@@ -3606,7 +3606,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
 
                             sUNO_service_drawing_PolyPolygonDescriptor,
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_MeasureServices;
                 }
@@ -3621,9 +3621,9 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_FrameServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_FrameServices, 2,
-                            sUNO_service_drawing_FrameShape,
-                            sUNO_service_drawing_Shape );
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_FrameServices,
+                            {sUNO_service_drawing_FrameShape,
+                            sUNO_service_drawing_Shape} );
 
                         pSeq = &SvxShape_FrameServices;
                 }
@@ -3637,9 +3637,9 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 if( nullptr == pSeq )
                 {
                         static uno::Sequence< OUString > SvxShape_UnoServices;
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2,
-                            sUNO_service_drawing_ControlShape,
-                            sUNO_service_drawing_Shape );
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices,
+                            {sUNO_service_drawing_ControlShape,
+                            sUNO_service_drawing_Shape} );
 
                         pSeq = &SvxShape_UnoServices;
                 }
@@ -3653,8 +3653,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_EdgeServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_EdgeServices,15,
-                            sUNO_service_drawing_ConnectorShape,
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_EdgeServices,
+                            {sUNO_service_drawing_ConnectorShape,
                             sUNO_service_drawing_ConnectorProperties,
 
                             sUNO_service_drawing_Shape,
@@ -3671,7 +3671,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
 
                             sUNO_service_drawing_PolyPolygonDescriptor,
                             sUNO_service_drawing_ShadowProperties,
-                            sUNO_service_drawing_RotationDescriptor);
+                            sUNO_service_drawing_RotationDescriptor});
 
                         pSeq = &SvxShape_EdgeServices;
                 }
@@ -3684,9 +3684,9 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
                 {
                         static uno::Sequence< OUString > SvxShape_MediaServices;
 
-                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_MediaServices, 2,
-                            sUNO_service_drawing_MediaShape,
-                            sUNO_service_drawing_Shape);
+                        comphelper::ServiceInfoHelper::addToSequence( SvxShape_MediaServices,
+                            {sUNO_service_drawing_MediaShape,
+                            sUNO_service_drawing_Shape});
 
                         pSeq = &SvxShape_MediaServices;
                 }
@@ -3704,9 +3704,9 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
         if( nullptr == pSeq )
         {
                 static uno::Sequence< OUString > SvxShape_UnoServices;
-                comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2,
-                    sUNO_service_drawing_ControlShape,
-                    sUNO_service_drawing_Shape );
+                comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices,
+                    {sUNO_service_drawing_ControlShape,
+                    sUNO_service_drawing_Shape} );
 
                 pSeq = &SvxShape_UnoServices;
         }
commit 49f2d7cd98cefdbe9e179a8558cf89e09d8019e5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 27 09:48:56 2016 +0200

    loplugin:stylepolice: adapt to libc++
    
    Change-Id: I8a471d0fb7a206f1a235c3019ae9d07b44056e01

diff --git a/compilerplugins/clang/stylepolice.cxx b/compilerplugins/clang/stylepolice.cxx
index 93b1fce..3ae718c 100644
--- a/compilerplugins/clang/stylepolice.cxx
+++ b/compilerplugins/clang/stylepolice.cxx
@@ -108,11 +108,15 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
         && !startswith(typeName, "rtl::Reference")
         && !startswith(typeName, "ScopedVclPtr")
         && !startswith(typeName, "std::mem_fun")
+        && !startswith(typeName, "std::__1::mem_fun")
         && !startswith(typeName, "std::shared_ptr")
+        && !startswith(typeName, "std::__1::shared_ptr")
         && !startswith(typeName, "shared_ptr") // weird issue in slideshow
         && !startswith(typeName, "std::unique_ptr")
+        && !startswith(typeName, "std::__1::unique_ptr")
         && !startswith(typeName, "unique_ptr") // weird issue in include/vcl/threadex.hxx
         && !startswith(typeName, "std::weak_ptr")
+        && !startswith(typeName, "std::__1::weak_ptr")
         && !startswith(typeName, "struct _LOKDocViewPrivate")
         && !startswith(typeName, "sw::UnoCursorPointer")
         && !startswith(typeName, "tools::SvRef")
@@ -120,6 +124,8 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
         && !startswith(typeName, "vcl::ScopedBitmapAccess")
         // lots of the code seems to regard iterator objects as being "pointer-like"
         && typeName.find("iterator<") == std::string::npos
+        && typeName.find("iter<") == std::string::npos
+            // libc++ std::__1::__wrap_iter<...>
         && aOriginalTypeName != "sal_IntPtr" )
     {
         if (aFileName.startswith(SRCDIR "/bridges/") ) {


More information about the Libreoffice-commits mailing list