summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-01-15 13:43:31 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-01-15 12:32:29 +0000
commitf2f008c52aaa88329c07f441de60d6fdfce9f0b3 (patch)
treee5676badaa6361adcc2b5d91e9f9cdc6aa645c1c /unoxml
parent9d2355b674d103fe8a73d2db716389980bb69e55 (diff)
Merge SvXMLAttributeList to comphelper::AttributeList
And simplify the latter, to always use "CDATA" type (as the former did). "CDATA" was used in all cases but one, where an empty string was used. Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/dom/element.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index 481b071e62e5..757ac1c17de4 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -58,7 +58,6 @@ namespace DOM
if (!i_xHandler.is()) throw RuntimeException();
rtl::Reference<comphelper::AttributeList> pAttrs =
new comphelper::AttributeList();
- OUString type = "";
// add namespace definitions to attributes
for (xmlNsPtr pNs = m_aNodePtr->nsDef; pNs != nullptr; pNs = pNs->next) {
const xmlChar *pPrefix = pNs->prefix ? pNs->prefix : reinterpret_cast<const xmlChar*>("");
@@ -71,7 +70,7 @@ namespace DOM
OUString val(reinterpret_cast<const char*>(pHref),
strlen(reinterpret_cast<const char*>(pHref)),
RTL_TEXTENCODING_UTF8);
- pAttrs->AddAttribute(name, type, val);
+ pAttrs->AddAttribute(name, val);
}
// add attributes
for (xmlAttrPtr pAttr = m_aNodePtr->properties;
@@ -84,7 +83,7 @@ namespace DOM
? pNode->getLocalName()
: prefix + ":" + pNode->getLocalName();
OUString val = pNode->getNodeValue();
- pAttrs->AddAttribute(name, type, val);
+ pAttrs->AddAttribute(name, val);
}
OUString prefix = getPrefix();
OUString name = (prefix.isEmpty())