summaryrefslogtreecommitdiff
path: root/xfa/fde/xml/cfde_xmlparser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-05 11:48:21 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-05 16:10:44 +0000
commit5fa4e981ed6c431d86c51a74eba19ea4b816f541 (patch)
tree4bfa4afc2b89e1a423ec4838937042780eaa6191 /xfa/fde/xml/cfde_xmlparser.cpp
parentddcb6e7f47e2769fb4565bd4430ecb465a1f5417 (diff)
downloadpdfium-5fa4e981ed6c431d86c51a74eba19ea4b816f541.tar.xz
Move XML attribute handling to a base class.
This CL moves the attribute handling out of CFDE_XMLElement and CFDE_XMLInstruction into a common CFDE_XMLAttributeNode. The handling is also converted to a std::map from either a) a vector storing name,value,name,value or b) two vectors one for names and the other for values. The unused Get/Set methods for interger and float are removed and the iteration is converted to use iterators. Change-Id: Icda00ae898a595d58b06af0ced337f55f47c317c Reviewed-on: https://pdfium-review.googlesource.com/3753 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/xml/cfde_xmlparser.cpp')
-rw-r--r--xfa/fde/xml/cfde_xmlparser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fde/xml/cfde_xmlparser.cpp b/xfa/fde/xml/cfde_xmlparser.cpp
index db85021693..ad7b9e1a6f 100644
--- a/xfa/fde/xml/cfde_xmlparser.cpp
+++ b/xfa/fde/xml/cfde_xmlparser.cpp
@@ -64,7 +64,7 @@ int32_t CFDE_XMLParser::DoParser(IFX_Pause* pPause) {
break;
}
m_pParser->GetTagName(m_ws1);
- static_cast<CFDE_XMLElement*>(m_pChild)->GetTagName(m_ws2);
+ m_ws2 = static_cast<CFDE_XMLElement*>(m_pChild)->GetName();
if (m_ws1.GetLength() > 0 && m_ws1 != m_ws2) {
m_syntaxParserResult = FDE_XmlSyntaxResult::Error;
break;
@@ -102,8 +102,8 @@ int32_t CFDE_XMLParser::DoParser(IFX_Pause* pPause) {
m_pParent = m_pChild;
if (m_dwCheckStatus != 0x03 && m_NodeStack.size() == 3) {
- CFX_WideString wsTag;
- static_cast<CFDE_XMLElement*>(m_pChild)->GetLocalTagName(wsTag);
+ CFX_WideString wsTag =
+ static_cast<CFDE_XMLElement*>(m_pChild)->GetLocalTagName();
if (wsTag == L"template") {
m_dwCheckStatus |= 0x01;
m_dwCurrentCheckStatus = 0x01;