summaryrefslogtreecommitdiff
path: root/unoxml/source/rdf/librdf_repository.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unoxml/source/rdf/librdf_repository.cxx')
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 9ebd7217b24f..13a10b4edb41 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -22,6 +22,7 @@
#include <map>
#include <memory>
#include <set>
+#include <string_view>
#include <iterator>
#include <algorithm>
#include <atomic>
@@ -2346,7 +2347,7 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const
"librdf_uri_as_string failed", m_rRep);
}
OUString uriU( OStringToOUString(
- OString(reinterpret_cast<const char*>(uri)),
+ std::string_view(reinterpret_cast<const char*>(uri)),
RTL_TEXTENCODING_UTF8) );
try {
return rdf::URI::create(m_xContext, uriU);
@@ -2388,7 +2389,7 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const
"blank node has no label", m_rRep);
}
OUString labelU( OStringToOUString(
- OString(reinterpret_cast<const char*>(label)),
+ std::string_view(reinterpret_cast<const char*>(label)),
RTL_TEXTENCODING_UTF8) );
try {
return rdf::BlankNode::create(m_xContext, labelU);
@@ -2421,11 +2422,11 @@ librdf_TypeConverter::convertToXNode(librdf_node* i_pNode) const
librdf_node_get_literal_value_datatype_uri(i_pNode) );
OSL_ENSURE(!lang || !pType, "convertToXNode: invalid literal");
const OUString valueU( OStringToOUString(
- OString(reinterpret_cast<const char*>(value)),
+ std::string_view(reinterpret_cast<const char*>(value)),
RTL_TEXTENCODING_UTF8) );
if (lang) {
const OUString langU( OStringToOUString(
- OString(reinterpret_cast<const char*>(lang)),
+ std::string_view(reinterpret_cast<const char*>(lang)),
RTL_TEXTENCODING_UTF8) );
return rdf::Literal::createWithLanguage(m_xContext, valueU, langU);
} else if (pType) {