From f6aef99057c08490af49aec0fd5f2601a83c4e76 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 28 Oct 2021 16:11:26 +0300 Subject: [PATCH] Prepare for removal of non-const operator[] from Sequence in binaryurp Change-Id: Ibbe07a6de488461a99bb06d558cf740caa606bc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124344 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- binaryurp/source/bridge.cxx | 2 +- binaryurp/source/bridgefactory.cxx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 9730036ab4a8..3299cd0ed519 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -950,7 +950,7 @@ void Bridge::removeEventListener( void Bridge::sendCommitChangeRequest() { assert(mode_ == MODE_REQUESTED || mode_ == MODE_REPLY_1); css::uno::Sequence< css::bridge::ProtocolProperty > s(1); - s[0].Name = "CurrentContext"; + s.getArray()[0].Name = "CurrentContext"; std::vector< BinaryAny > a { mapCppToBinaryAny(css::uno::Any(s)) }; sendProtPropRequest(OutgoingRequest::KIND_COMMIT_CHANGE, a); } diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx index d2fef4383c06..a2dd1fa97fba 100644 --- a/binaryurp/source/bridgefactory.cxx +++ b/binaryurp/source/bridgefactory.cxx @@ -141,12 +141,13 @@ BridgeFactory::getExistingBridges() { } n = static_cast< sal_Int32 >(n + named_.size()); css::uno::Sequence< css::uno::Reference< css::bridge::XBridge > > s(n); + auto r = asNonConstRange(s); sal_Int32 i = 0; for (auto const& item : unnamed_) - s[i++] = item; + r[i++] = item; for (auto const& item : named_) - s[i++] = item.second; + r[i++] = item.second; return s; }