From 25aec383f95fded43b3fe5fc588b4ebdc6d7d272 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Nov 2015 12:22:28 +0200 Subject: use initialiser for Sequence replaced using: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\); .*\[0\] = (\S+);/Sequence \1 { \2 };/g" Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9 Reviewed-on: https://gerrit.libreoffice.org/19969 Tested-by: Jenkins Reviewed-by: Noel Grandin --- extensions/source/plugin/base/manager.cxx | 3 +-- extensions/source/plugin/base/plmodel.cxx | 3 +-- extensions/source/propctrlr/buttonnavigationhandler.cxx | 3 +-- extensions/source/propctrlr/cellbindinghandler.cxx | 3 +-- extensions/source/propctrlr/editpropertyhandler.cxx | 3 +-- extensions/source/propctrlr/eformspropertyhandler.cxx | 3 +-- extensions/source/propctrlr/eventhandler.cxx | 3 +-- extensions/source/propctrlr/formcomponenthandler.cxx | 3 +-- extensions/source/propctrlr/formgeometryhandler.cxx | 3 +-- extensions/source/propctrlr/genericpropertyhandler.cxx | 3 +-- extensions/source/propctrlr/submissionhandler.cxx | 3 +-- extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx | 3 +-- 12 files changed, 12 insertions(+), 24 deletions(-) (limited to 'extensions') diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx index 0fa54e367c12..21e354242acb 100644 --- a/extensions/source/plugin/base/manager.cxx +++ b/extensions/source/plugin/base/manager.cxx @@ -129,8 +129,7 @@ Sequence< OUString > XPluginManager_Impl::getSupportedServiceNames() throw( ) // XPluginManager_Impl Sequence< OUString > XPluginManager_Impl::getSupportedServiceNames_Static() throw( ) { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.plugin.PluginManager"; + Sequence aSNS { "com.sun.star.plugin.PluginManager" }; return aSNS; } diff --git a/extensions/source/plugin/base/plmodel.cxx b/extensions/source/plugin/base/plmodel.cxx index ee52e1c8c9a5..e3f3aed6e49c 100644 --- a/extensions/source/plugin/base/plmodel.cxx +++ b/extensions/source/plugin/base/plmodel.cxx @@ -56,8 +56,7 @@ Any PluginModel::queryAggregation( const Type& type ) throw( RuntimeException, s // XPluginManager_Impl Sequence< OUString > PluginModel::getSupportedServiceNames_Static() throw() { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.plugin.PluginModel"; + Sequence aSNS { "com.sun.star.plugin.PluginModel" }; return aSNS; } diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx index 20f1a6b0e5af..c299604a98f3 100644 --- a/extensions/source/propctrlr/buttonnavigationhandler.cxx +++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx @@ -63,8 +63,7 @@ namespace pcr Sequence< OUString > SAL_CALL ButtonNavigationHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.ButtonNavigationHandler"; + Sequence aSupported { "com.sun.star.form.inspection.ButtonNavigationHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx index 19d09d179d2c..1134d12401cb 100644 --- a/extensions/source/propctrlr/cellbindinghandler.cxx +++ b/extensions/source/propctrlr/cellbindinghandler.cxx @@ -64,8 +64,7 @@ namespace pcr Sequence< OUString > SAL_CALL CellBindingPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.CellBindingPropertyHandler"; + Sequence aSupported { "com.sun.star.form.inspection.CellBindingPropertyHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx index 65e9bbf0dbe1..940abbaf9a59 100644 --- a/extensions/source/propctrlr/editpropertyhandler.cxx +++ b/extensions/source/propctrlr/editpropertyhandler.cxx @@ -69,8 +69,7 @@ namespace pcr Sequence< OUString > SAL_CALL EditPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.EditPropertyHandler"; + Sequence aSupported { "com.sun.star.form.inspection.EditPropertyHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index aa625d7b82ec..8d8e5143889b 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -78,8 +78,7 @@ namespace pcr Sequence< OUString > SAL_CALL EFormsPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.XMLFormsPropertyHandler"; + Sequence aSupported { "com.sun.star.form.inspection.XMLFormsPropertyHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index cd501bb5638e..bfdc3d5cf286 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -491,8 +491,7 @@ namespace pcr Sequence< OUString > SAL_CALL EventHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.EventHandler"; + Sequence aSupported { "com.sun.star.form.inspection.EventHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index db3c3bebf1d9..c853bcdfeba0 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -169,8 +169,7 @@ namespace pcr Sequence< OUString > SAL_CALL FormComponentPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.FormComponentPropertyHandler"; + Sequence aSupported { "com.sun.star.form.inspection.FormComponentPropertyHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 3370c443ee54..961b6bc18763 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -317,8 +317,7 @@ namespace pcr Sequence< OUString > SAL_CALL FormGeometryHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.FormGeometryHandler"; + Sequence aSupported { "com.sun.star.form.inspection.FormGeometryHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index 857dc031bd3a..f76b07c3bf92 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -288,8 +288,7 @@ namespace pcr Sequence< OUString > SAL_CALL GenericPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.inspection.GenericPropertyHandler"; + Sequence aSupported { "com.sun.star.inspection.GenericPropertyHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index d0f44a9ceed2..3c37ad044a03 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -112,8 +112,7 @@ namespace pcr Sequence< OUString > SAL_CALL SubmissionPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.SubmissionPropertyHandler"; + Sequence aSupported { "com.sun.star.form.inspection.SubmissionPropertyHandler" }; return aSupported; } diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 3f9db2d982f4..f5cb77f6839d 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -93,8 +93,7 @@ namespace pcr Sequence< OUString > SAL_CALL XSDValidationPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { - Sequence< OUString > aSupported( 1 ); - aSupported[0] = "com.sun.star.form.inspection.XSDValidationPropertyHandler"; + Sequence aSupported { "com.sun.star.form.inspection.XSDValidationPropertyHandler" }; return aSupported; } -- cgit