summaryrefslogtreecommitdiff
path: root/unotools
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 /unotools
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 'unotools')
-rw-r--r--unotools/source/config/fltrcfg.cxx12
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx6
2 files changed, 6 insertions, 12 deletions
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx
index 38a22757a6f3..ed9350c75bb0 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -156,8 +156,7 @@ void SvtWriterFilterOptions_Impl::ImplCommit()
{
SvtAppFilterOptions_Impl::ImplCommit();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues(1);
aValues[0] <<= bLoadExecutable;
@@ -168,8 +167,7 @@ void SvtWriterFilterOptions_Impl::Load()
{
SvtAppFilterOptions_Impl::Load();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
@@ -204,8 +202,7 @@ void SvtCalcFilterOptions_Impl::ImplCommit()
{
SvtAppFilterOptions_Impl::ImplCommit();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues(1);
aValues[0] <<= bLoadExecutable;
@@ -216,8 +213,7 @@ void SvtCalcFilterOptions_Impl::Load()
{
SvtAppFilterOptions_Impl::Load();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index e9602a4022ef..11b7867478b6 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -84,8 +84,7 @@ std::vector<OUString> getContents(OUString const & url) {
try {
std::vector<OUString> cs;
ucbhelper::Content c(content(url));
- css::uno::Sequence<OUString> args(1);
- args[0] = "Title";
+ css::uno::Sequence<OUString> args { "Title" };
css::uno::Reference<css::sdbc::XResultSet> res(
c.createCursor(args),
css::uno::UNO_SET_THROW);
@@ -246,8 +245,7 @@ bool utl::UCBContentHelper::MakeFolder(
{
continue;
}
- css::uno::Sequence<OUString> keys(1);
- keys[0] = "Title";
+ css::uno::Sequence<OUString> keys { "Title" };
css::uno::Sequence<css::uno::Any> values(1);
values[0] <<= title;
if (parent.insertNewContent(info[i].Type, keys, values, result))