summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qa/cppunit/test_xmlwalker.cxx6
-rw-r--r--tools/source/xml/XmlWalker.cxx9
2 files changed, 9 insertions, 6 deletions
diff --git a/tools/qa/cppunit/test_xmlwalker.cxx b/tools/qa/cppunit/test_xmlwalker.cxx
index 6df278c21e2e..d18f3f5db487 100644
--- a/tools/qa/cppunit/test_xmlwalker.cxx
+++ b/tools/qa/cppunit/test_xmlwalker.cxx
@@ -41,7 +41,7 @@ void XmlWalkerTest::testReadXML()
tools::XmlWalker aWalker;
SvFileStream aFileStream(aXmlFilePath, StreamMode::READ);
CPPUNIT_ASSERT(aWalker.open(&aFileStream));
- CPPUNIT_ASSERT_EQUAL("root"_ostr, aWalker.name());
+ CPPUNIT_ASSERT_EQUAL(std::string_view("root"), aWalker.name());
CPPUNIT_ASSERT_EQUAL("Hello World"_ostr, aWalker.attribute("root-attr"_ostr));
int nNumberOfChildNodes = 0;
@@ -76,8 +76,8 @@ void XmlWalkerTest::testReadXML()
}
else if (aWalker.name() == "with-namespace")
{
- CPPUNIT_ASSERT_EQUAL("adobe:ns:meta/"_ostr, aWalker.namespaceHref());
- CPPUNIT_ASSERT_EQUAL("xx"_ostr, aWalker.namespacePrefix());
+ CPPUNIT_ASSERT_EQUAL(std::string_view("adobe:ns:meta/"), aWalker.namespaceHref());
+ CPPUNIT_ASSERT_EQUAL(std::string_view("xx"), aWalker.namespacePrefix());
}
aWalker.next();
}
diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx
index c0e8a2abef48..f486cef36b34 100644
--- a/tools/source/xml/XmlWalker.cxx
+++ b/tools/source/xml/XmlWalker.cxx
@@ -59,14 +59,17 @@ bool XmlWalker::open(SvStream* pStream)
return true;
}
-OString XmlWalker::name() { return reinterpret_cast<const char*>(mpImpl->mpCurrent->name); }
+std::string_view XmlWalker::name()
+{
+ return reinterpret_cast<const char*>(mpImpl->mpCurrent->name);
+}
-OString XmlWalker::namespaceHref()
+std::string_view XmlWalker::namespaceHref()
{
return reinterpret_cast<const char*>(mpImpl->mpCurrent->ns->href);
}
-OString XmlWalker::namespacePrefix()
+std::string_view XmlWalker::namespacePrefix()
{
return reinterpret_cast<const char*>(mpImpl->mpCurrent->ns->prefix);
}