diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 10:22:53 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-31 21:36:50 +0100 |
commit | 359a17d0215d36a441688ac3261af04f20a03c6c (patch) | |
tree | a28d0814979d6178568b15cb448dd0f2bb74e21f /unoxml/source/rdf | |
parent | db149ba9801f57c2e737dec893965f880fa04700 (diff) |
Prepare for removal of non-const operator[] from Sequence in unoxml
Change-Id: Ie7738eb599ac2ae98618e258786b2a0d956cb9dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124408
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unoxml/source/rdf')
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index f9e918aff168..176a871fa872 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -670,8 +670,9 @@ librdf_QuerySelectResult::nextElement() uno::makeAny(e)); } uno::Sequence< uno::Reference< rdf::XNode > > ret(count); + auto retRange = asNonConstRange(ret); for (int i = 0; i < count; ++i) { - ret[i] = m_xRep->getTypeConverter().convertToXNode(aNodes[i]); + retRange[i] = m_xRep->getTypeConverter().convertToXNode(aNodes[i]); } // NB: this will invalidate current item. librdf_query_results_next(m_pQueryResult.get()); @@ -1403,6 +1404,7 @@ librdf_Repository::querySelect(const OUString & i_rQuery) "librdf_query_results_get_bindings_count failed", *this); } uno::Sequence< OUString > names(count); + auto namesRange = asNonConstRange(names); for (int i = 0; i < count; ++i) { const char* name( librdf_query_results_get_binding_name( pResults.get(), i) ); @@ -1411,7 +1413,7 @@ librdf_Repository::querySelect(const OUString & i_rQuery) "librdf_Repository::querySelect: binding is null", *this); } - names[i] = OUString::createFromAscii(name); + namesRange[i] = OUString::createFromAscii(name); } return new librdf_QuerySelectResult(this, m_aMutex, |