From 54d22957bc241fc5867fa1c720cf1266133e4e90 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Nov 2015 12:17:19 +0200 Subject: use initialiser for Sequence performed using: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence (\w+)\(1\); .*\[0\] = (\S+);/Sequence \1 { \2 };/g" Change-Id: I4da56c80fa09bfc1e8f868794001e9921431e09f Reviewed-on: https://gerrit.libreoffice.org/19968 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- unotools/source/config/fltrcfg.cxx | 12 ++++-------- unotools/source/ucbhelper/ucbhelper.cxx | 6 ++---- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'unotools') 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 aNames(1); - aNames[0] = "Executable"; + Sequence aNames { "Executable" }; Sequence aValues(1); aValues[0] <<= bLoadExecutable; @@ -168,8 +167,7 @@ void SvtWriterFilterOptions_Impl::Load() { SvtAppFilterOptions_Impl::Load(); - Sequence aNames(1); - aNames[0] = "Executable"; + Sequence aNames { "Executable" }; Sequence aValues = GetProperties(aNames); const Any* pValues = aValues.getConstArray(); @@ -204,8 +202,7 @@ void SvtCalcFilterOptions_Impl::ImplCommit() { SvtAppFilterOptions_Impl::ImplCommit(); - Sequence aNames(1); - aNames[0] = "Executable"; + Sequence aNames { "Executable" }; Sequence aValues(1); aValues[0] <<= bLoadExecutable; @@ -216,8 +213,7 @@ void SvtCalcFilterOptions_Impl::Load() { SvtAppFilterOptions_Impl::Load(); - Sequence aNames(1); - aNames[0] = "Executable"; + Sequence aNames { "Executable" }; Sequence 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 getContents(OUString const & url) { try { std::vector cs; ucbhelper::Content c(content(url)); - css::uno::Sequence args(1); - args[0] = "Title"; + css::uno::Sequence args { "Title" }; css::uno::Reference res( c.createCursor(args), css::uno::UNO_SET_THROW); @@ -246,8 +245,7 @@ bool utl::UCBContentHelper::MakeFolder( { continue; } - css::uno::Sequence keys(1); - keys[0] = "Title"; + css::uno::Sequence keys { "Title" }; css::uno::Sequence values(1); values[0] <<= title; if (parent.insertNewContent(info[i].Type, keys, values, result)) -- cgit