summaryrefslogtreecommitdiff
path: root/unoxml/source/dom
diff options
context:
space:
mode:
Diffstat (limited to 'unoxml/source/dom')
-rw-r--r--unoxml/source/dom/document.cxx8
-rw-r--r--unoxml/source/dom/element.cxx4
-rw-r--r--unoxml/source/dom/elementlist.cxx7
-rw-r--r--unoxml/source/dom/elementlist.hxx6
4 files changed, 13 insertions, 12 deletions
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index c753f37c6054..8d56510da81f 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -440,8 +440,8 @@ namespace DOM
OString oPrefix, oName, oUri;
if (i != -1)
{
- oPrefix = OUStringToOString(qname.copy(0, i), RTL_TEXTENCODING_UTF8);
- oName = OUStringToOString(qname.copy(i+1), RTL_TEXTENCODING_UTF8);
+ oPrefix = OUStringToOString(qname.subView(0, i), RTL_TEXTENCODING_UTF8);
+ oName = OUStringToOString(qname.subView(i+1), RTL_TEXTENCODING_UTF8);
}
else
{
@@ -530,9 +530,9 @@ namespace DOM
xmlChar const *pName;
OString o1, o2, o3;
if ( i != -1) {
- o1 = OUStringToOString(qname.copy(0, i), RTL_TEXTENCODING_UTF8);
+ o1 = OUStringToOString(qname.subView(0, i), RTL_TEXTENCODING_UTF8);
pPrefix = reinterpret_cast<xmlChar const *>(o1.getStr());
- o2 = OUStringToOString(qname.copy(i+1), RTL_TEXTENCODING_UTF8);
+ o2 = OUStringToOString(qname.subView(i+1), RTL_TEXTENCODING_UTF8);
pName = reinterpret_cast<xmlChar const *>(o2.getStr());
} else {
// default prefix
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index afef8b313b29..f5dd67304d6b 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -659,11 +659,11 @@ namespace DOM
if (idx != -1)
{
o2 = OUStringToOString(
- qualifiedName.copy(0,idx),
+ qualifiedName.subView(0,idx),
RTL_TEXTENCODING_UTF8);
pPrefix = reinterpret_cast<xmlChar const *>(o2.getStr());
o3 = OUStringToOString(
- qualifiedName.copy(idx+1),
+ qualifiedName.subView(idx+1),
RTL_TEXTENCODING_UTF8);
pLName = reinterpret_cast<xmlChar const *>(o3.getStr());
} else {
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index 7379ebe1104b..290438b2ca28 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -20,6 +20,7 @@
#include "elementlist.hxx"
#include <string.h>
+#include <string_view>
#include <cppuhelper/implbase.hxx>
#include <o3tl/safeint.hxx>
@@ -58,7 +59,7 @@ namespace
namespace DOM
{
- static xmlChar* lcl_initXmlString(OUString const& rString)
+ static xmlChar* lcl_initXmlString(std::u16string_view rString)
{
OString const os =
OUStringToOString(rString, RTL_TEXTENCODING_UTF8);
@@ -69,7 +70,7 @@ namespace DOM
CElementList::CElementList(::rtl::Reference<CElement> const& pElement,
::osl::Mutex & rMutex,
- OUString const& rName, OUString const*const pURI)
+ std::u16string_view rName, OUString const*const pURI)
: m_xImpl(new CElementListImpl(pElement, rMutex, rName, pURI))
{
if (pElement.is()) {
@@ -79,7 +80,7 @@ namespace DOM
CElementListImpl::CElementListImpl(::rtl::Reference<CElement> const& pElement,
::osl::Mutex & rMutex,
- OUString const& rName, OUString const*const pURI)
+ std::u16string_view rName, OUString const*const pURI)
: m_pElement(pElement)
, m_rMutex(rMutex)
, m_pName(lcl_initXmlString(rName))
diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx
index b3157900c04b..16a3eff8c5d2 100644
--- a/unoxml/source/dom/elementlist.hxx
+++ b/unoxml/source/dom/elementlist.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_UNOXML_SOURCE_DOM_ELEMENTLIST_HXX
#include <vector>
-
+#include <string_view>
#include <memory>
#include <libxml/tree.h>
@@ -63,7 +63,7 @@ namespace DOM
public:
CElementListImpl(::rtl::Reference<CElement> const& pElement,
::osl::Mutex & rMutex,
- OUString const& rName, OUString const*const pURI);
+ std::u16string_view rName, OUString const*const pURI);
void registerListener(CElement & rElement);
@@ -91,7 +91,7 @@ namespace DOM
public:
CElementList(::rtl::Reference<CElement> const& pElement,
::osl::Mutex & rMutex,
- OUString const& rName, OUString const*const pURI = nullptr);
+ std::u16string_view rName, OUString const*const pURI = nullptr);
/**
The number of nodes in the list.