summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:17:19 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 11:31:23 +0000
commit54d22957bc241fc5867fa1c720cf1266133e4e90 (patch)
treea94c9008ccbe953226a479a875e01119d77d9402 /svtools
parent8e234c5b7d5bae66c544e581bee5770f3f83dd81 (diff)
use initialiser for Sequence<OUString>
performed using: 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: I4da56c80fa09bfc1e8f868794001e9921431e09f Reviewed-on: https://gerrit.libreoffice.org/19968 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/fontsubstconfig.cxx6
-rw-r--r--svtools/source/uno/addrtempuno.cxx3
-rw-r--r--svtools/source/uno/unoevent.cxx3
3 files changed, 4 insertions, 8 deletions
diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx
index e25836e43360..02a38444fdc7 100644
--- a/svtools/source/config/fontsubstconfig.cxx
+++ b/svtools/source/config/fontsubstconfig.cxx
@@ -52,8 +52,7 @@ SvtFontSubstConfig::SvtFontSubstConfig() :
bIsEnabled(false),
pImpl(new SvtFontSubstConfig_Impl)
{
- Sequence<OUString> aNames(1);
- aNames.getArray()[0] = cReplacement;
+ Sequence<OUString> aNames { cReplacement };
Sequence<Any> aValues = GetProperties(aNames);
DBG_ASSERT(aValues.getConstArray()[0].hasValue(), "no value available");
if(aValues.getConstArray()[0].hasValue())
@@ -100,8 +99,7 @@ void SvtFontSubstConfig::Notify( const css::uno::Sequence< OUString >& )
void SvtFontSubstConfig::ImplCommit()
{
- Sequence<OUString> aNames(1);
- aNames.getArray()[0] = cReplacement;
+ Sequence<OUString> aNames { cReplacement };
Sequence<Any> aValues(1);
aValues.getArray()[0].setValue(&bIsEnabled, cppu::UnoType<bool>::get());
PutProperties(aNames, aValues);
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 10e94851dc40..4ffafea5f4f5 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -101,8 +101,7 @@ namespace {
css::uno::Sequence<OUString> SAL_CALL OAddressBookSourceDialogUno::getSupportedServiceNames() throw(RuntimeException, std::exception)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported.getArray()[0] = "com.sun.star.ui.AddressBookSourceDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.ui.AddressBookSourceDialog" };
return aSupported;
}
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index b5b4d21461b4..56e6ccb93b56 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -151,8 +151,7 @@ sal_Bool SvBaseEventDescriptor::supportsService(const OUString& rServiceName)
Sequence<OUString> SvBaseEventDescriptor::getSupportedServiceNames()
throw(RuntimeException, std::exception)
{
- Sequence<OUString> aSequence(1);
- aSequence[0] = sServiceName;
+ Sequence<OUString> aSequence { sServiceName };
return aSequence;
}