From 96c26b0d9d10fa9bac3695222980d7145f0342d7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Nov 2015 13:17:00 +0200 Subject: use initialiser for Sequence using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- extensions/source/config/ldap/ldapuserprofilebe.cxx | 3 +-- extensions/source/propctrlr/eformspropertyhandler.cxx | 3 +-- extensions/source/propctrlr/submissionhandler.cxx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'extensions') diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx index f86cb8b08439..daabc23c09ed 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.cxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx @@ -226,8 +226,7 @@ OUString SAL_CALL LdapUserProfileBe::getImplementationName() uno::Sequence SAL_CALL LdapUserProfileBe::getLdapUserProfileBeServiceNames() { - uno::Sequence aServices(1) ; - aServices[0] = "com.sun.star.configuration.backend.LdapUserProfileBe"; + uno::Sequence aServices { "com.sun.star.configuration.backend.LdapUserProfileBe" }; return aServices ; } diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 8d8e5143889b..d4870a456f99 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -398,8 +398,7 @@ namespace pcr if ( !m_pHelper.get() ) return Sequence< OUString >(); - Sequence< OUString > aReturn( 1 ); - aReturn[ 0 ] = PROPERTY_INPUT_REQUIRED; + Sequence aReturn { PROPERTY_INPUT_REQUIRED }; return aReturn; } diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index 3c37ad044a03..f523cc7ad7f6 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -215,8 +215,7 @@ namespace pcr if ( !m_pHelper.get() ) return Sequence< OUString >(); - Sequence< OUString > aReturn( 1 ); - aReturn[ 0 ] = PROPERTY_XFORMS_BUTTONTYPE; + Sequence aReturn { PROPERTY_XFORMS_BUTTONTYPE }; return aReturn; } -- cgit