diff options
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/qa/unit/domtest.cxx | 15 | ||||
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 6 |
2 files changed, 12 insertions, 9 deletions
diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx index c6501547183c..3a715a9ed314 100644 --- a/unoxml/qa/unit/domtest.cxx +++ b/unoxml/qa/unit/domtest.cxx @@ -293,13 +293,14 @@ struct SerializerTest : public test::BootstrapFixture mxHandler.set( new DocumentHandler ); mxTokHandler.set( new TokenHandler ); - maRegisteredNamespaces.realloc(2); - maRegisteredNamespaces[0] = beans::make_Pair( - OUString( "urn:oasis:names:tc:opendocument:xmlns:office:1.0" ), - xml::sax::FastToken::NAMESPACE); - maRegisteredNamespaces[1] = beans::make_Pair( - OUString( "http://www.w3.org/1999/xlink" ), - 2*xml::sax::FastToken::NAMESPACE); + maRegisteredNamespaces = { + beans::make_Pair( + OUString( "urn:oasis:names:tc:opendocument:xmlns:office:1.0" ), + xml::sax::FastToken::NAMESPACE), + beans::make_Pair( + OUString( "http://www.w3.org/1999/xlink" ), + 2*xml::sax::FastToken::NAMESPACE) + }; } void serializerTest () 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, |