summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 13:17:00 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:20:39 +0000
commit96c26b0d9d10fa9bac3695222980d7145f0342d7 (patch)
treed2d2b4e60e8ec98ff4025abfad42be06d29b3c13 /cppuhelper
parent25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (diff)
use initialiser for Sequence<OUString>
using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx3
-rw-r--r--cppuhelper/source/typemanager.cxx3
-rw-r--r--cppuhelper/test/testcmp/TestComponent.cxx3
3 files changed, 3 insertions, 6 deletions
diff --git a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
index 0d6c36bbff91..8e0e9bff0fdd 100644
--- a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
+++ b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
@@ -168,8 +168,7 @@ css::uno::Any Empty2::queryInterface(css::uno::Type const & type)
}
css::uno::Sequence< rtl::OUString > sequenceThird() {
- css::uno::Sequence< rtl::OUString > s(1);
- s[0] = rtl::OUString("Third");
+ css::uno::Sequence<OUString> s { rtl::OUString("Third") };
return s;
}
diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx
index aa93761db2b1..12a88dc2006a 100644
--- a/cppuhelper/source/typemanager.cxx
+++ b/cppuhelper/source/typemanager.cxx
@@ -1978,8 +1978,7 @@ css::uno::Sequence< rtl::OUString >
cppuhelper::TypeManager::getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception)
{
- css::uno::Sequence< rtl::OUString > names(1);
- names[0] = "com.sun.star.reflection.TypeDescriptionManager"; //TODO
+ css::uno::Sequence<OUString> names { "com.sun.star.reflection.TypeDescriptionManager" }; //TODO
return names;
}
diff --git a/cppuhelper/test/testcmp/TestComponent.cxx b/cppuhelper/test/testcmp/TestComponent.cxx
index f3922b70c1ed..cca70c831a1b 100644
--- a/cppuhelper/test/testcmp/TestComponent.cxx
+++ b/cppuhelper/test/testcmp/TestComponent.cxx
@@ -102,8 +102,7 @@ uno::Reference<uno::XInterface> SAL_CALL TestComponent::create(
uno::Sequence<rtl::OUString> SAL_CALL TestComponent::getSupportedServiceNames_Static()
{
- uno::Sequence<rtl::OUString> serviceNames(1);
- serviceNames[0] = rtl::OUString("com.sun.star.lang.ServiceInfo");
+ uno::Sequence<OUString> serviceNames { rtl::OUString("com.sun.star.lang.ServiceInfo") };
return serviceNames;
}