diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 08:43:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 10:13:08 +0000 |
commit | 8e234c5b7d5bae66c544e581bee5770f3f83dd81 (patch) | |
tree | 7d78f03ce2231de4f727d1135449aeb8cba74e99 /vcl/source | |
parent | 3bdd176731c351638f541a37b94094124f3c9f52 (diff) |
use initialiser syntax for Sequence<OUString>
replaced using the script:
git grep -lP 'Sequence.*OUString.*\(1\)'
| xargs perl -0777 -pi
-e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"
Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/session.cxx | 3 | ||||
-rw-r--r-- | vcl/source/components/dtranscomp.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 18 |
3 files changed, 8 insertions, 16 deletions
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index 3bf8f0e582c5..cca093b3c529 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -336,8 +336,7 @@ OUString SAL_CALL vcl_session_getImplementationName() Sequence< OUString > SAL_CALL vcl_session_getSupportedServiceNames() { - Sequence< OUString > aRet(1); - aRet[0] = "com.sun.star.frame.SessionManagerClient"; + Sequence< OUString > aRet { "com.sun.star.frame.SessionManagerClient" }; return aRet; } diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 6dc83ff295d0..60c530de6493 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -126,8 +126,7 @@ OUString GenericClipboard::getImplementationName_static() Sequence< OUString > GenericClipboard::getSupportedServiceNames_static() { - Sequence< OUString > aRet(1); - aRet[0] = "com.sun.star.datatransfer.clipboard.SystemClipboard"; + Sequence< OUString > aRet { "com.sun.star.datatransfer.clipboard.SystemClipboard" }; return aRet; } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index b434ac4fd242..db90affa61bb 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1938,8 +1938,7 @@ Any PrinterOptionsHelper::setGroupControlOpt(const OUString& i_rID, aHelpId.realloc( 1 ); *aHelpId.getArray() = i_rHelpId; } - Sequence< OUString > aIds(1); - aIds[0] = i_rID; + Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Group"); } @@ -1954,8 +1953,7 @@ Any PrinterOptionsHelper::setSubgroupControlOpt(const OUString& i_rID, aHelpId.realloc( 1 ); *aHelpId.getArray() = i_rHelpId; } - Sequence< OUString > aIds(1); - aIds[0] = i_rID; + Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Subgroup", nullptr, i_rControlOptions); } @@ -1975,8 +1973,7 @@ Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID, PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_bValue ); - Sequence< OUString > aIds(1); - aIds[0] = i_rID; + Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Bool", &aVal, i_rControlOptions); } @@ -2029,8 +2026,7 @@ Any PrinterOptionsHelper::setChoiceListControlOpt(const OUString& i_rID, PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_nValue ); - Sequence< OUString > aIds(1); - aIds[0] = i_rID; + Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, i_rHelpId, "List", &aVal, aOpt); } @@ -2063,8 +2059,7 @@ Any PrinterOptionsHelper::setRangeControlOpt(const OUString& i_rID, PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_nValue ); - Sequence< OUString > aIds(1); - aIds[0] = i_rID; + Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Range", &aVal, aOpt); } @@ -2084,8 +2079,7 @@ Any PrinterOptionsHelper::setEditControlOpt(const OUString& i_rID, PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_rValue ); - Sequence< OUString > aIds(1); - aIds[0] = i_rID; + Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Edit", &aVal, i_rControlOptions); } |