From 39b8ce7081888b5d5e73ba0b49396b09ca7f3b61 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Fri, 11 Jun 2021 12:30:29 +0200 Subject: Simplify Sequences initializations (unotools) Change-Id: Ibc5deee4b69213310a75c2a74a800d99bc451424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117047 Tested-by: Jenkins Reviewed-by: Julien Nabet --- unotools/source/ucbhelper/ucbhelper.cxx | 5 +---- unotools/source/ucbhelper/ucblockbytes.cxx | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'unotools/source/ucbhelper') diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index 993cf8c8908f..f91fac4e921b 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -227,10 +227,7 @@ bool utl::UCBContentHelper::MakeFolder( { continue; } - css::uno::Sequence keys { "Title" }; - css::uno::Sequence values(1); - values[0] <<= title; - if (parent.insertNewContent(rInfo.Type, keys, values, result)) + if (parent.insertNewContent(rInfo.Type, { "Title" }, { css::uno::Any(title) }, result)) { return true; } diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index a02652290b6a..d3e090cae679 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -740,13 +740,11 @@ static bool UCBOpenContentSync( request <<= aExcep; rtl::Reference xIR = new ucbhelper::InteractionRequest(request); - Sequence > aSeq(2); rtl::Reference retryP = new ucbhelper::InteractionRetry(xIR.get()); - aSeq[0] = retryP; rtl::Reference abortP = new ucbhelper::InteractionAbort(xIR.get()); - aSeq[1] = abortP; + Sequence > aSeq { retryP, abortP }; xIR->setContinuations(aSeq); xInteract->handle(xIR); -- cgit