diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-01-15 13:43:31 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-01-15 12:32:29 +0000 |
commit | f2f008c52aaa88329c07f441de60d6fdfce9f0b3 (patch) | |
tree | e5676badaa6361adcc2b5d91e9f9cdc6aa645c1c /sax | |
parent | 9d2355b674d103fe8a73d2db716389980bb69e55 (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 'sax')
-rw-r--r-- | sax/source/expatwrap/sax_expat.cxx | 3 | ||||
-rw-r--r-- | sax/source/fastparser/legacyfastparser.cxx | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 78b7e2252da0..146a8c4193db 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -142,8 +142,6 @@ struct Entity }; -constexpr OUStringLiteral gsCDATA = u"CDATA"; - class SaxExpatParser_Impl { public: // module scope @@ -711,7 +709,6 @@ void SaxExpatParser_Impl::callbackStartElement( void *pvThis , assert(awAttributes[i+1]); pImpl->rAttrList->AddAttribute( XML_CHAR_TO_OUSTRING( awAttributes[i] ) , - gsCDATA, // expat doesn't know types XML_CHAR_TO_OUSTRING( awAttributes[i+1] ) ); i +=2; } diff --git a/sax/source/fastparser/legacyfastparser.cxx b/sax/source/fastparser/legacyfastparser.cxx index e4c425bd07d3..62e7b8a57a88 100644 --- a/sax/source/fastparser/legacyfastparser.cxx +++ b/sax/source/fastparser/legacyfastparser.cxx @@ -75,7 +75,7 @@ void NamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::Attribu sDecl = "xmlns"; else sDecl = "xmlns:" + rPrefix; - rAttrList->AddAttribute( sDecl, "CDATA", rNamespaceURI ); + rAttrList->AddAttribute( sDecl, rNamespaceURI ); } m_aNamespaceDefines.clear(); } @@ -233,7 +233,7 @@ void SAL_CALL CallbackDocumentHandler::startUnknownElement( const OUString& /*Na if ( !rAttrNamespacePrefix.isEmpty() ) sAttrName = rAttrNamespacePrefix + aNamespaceSeparator + sAttrName; - rAttrList->AddAttribute( sAttrName, "CDATA", rAttrValue ); + rAttrList->AddAttribute( sAttrName, rAttrValue ); } const Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes(); @@ -242,7 +242,7 @@ void SAL_CALL CallbackDocumentHandler::startUnknownElement( const OUString& /*Na const OUString& rAttrValue = rAttr.Value; const OUString& rAttrName = rAttr.Name; - rAttrList->AddAttribute( rAttrName, "CDATA", rAttrValue ); + rAttrList->AddAttribute( rAttrName, rAttrValue ); } m_xDocumentHandler->startElement( Name, rAttrList ); } |