summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_utils.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-19 09:19:57 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-19 13:33:07 +0000
commit0d86ecb08e1b2c204333b1f1f6b0b014e5b2971c (patch)
treef816429f8581c16a60773eb23385dc8e55729bac /xfa/fxfa/parser/xfa_utils.cpp
parent3b71d26f092ebc86ca9177fbbe89d83caa67ae1b (diff)
downloadpdfium-0d86ecb08e1b2c204333b1f1f6b0b014e5b2971c.tar.xz
Move fde XML parser to core
This CL moves the XML parser from FDE into FXCRT and renames to CFX_ from CFDE_. Change-Id: I21a9590bf74daf5517df630d7e7a5de89da99ea4 Reviewed-on: https://pdfium-review.googlesource.com/4312 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_utils.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 2ffba9b2e6..1c5adc75c9 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -9,10 +9,10 @@
#include <algorithm>
#include "core/fxcrt/fx_ext.h"
-#include "xfa/fde/xml/cfde_xmlchardata.h"
-#include "xfa/fde/xml/cfde_xmlelement.h"
-#include "xfa/fde/xml/cfde_xmlnode.h"
-#include "xfa/fde/xml/cfde_xmltext.h"
+#include "core/fxcrt/xml/cfx_xmlchardata.h"
+#include "core/fxcrt/xml/cfx_xmlelement.h"
+#include "core/fxcrt/xml/cfx_xmlnode.h"
+#include "core/fxcrt/xml/cfx_xmltext.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_localemgr.h"
#include "xfa/fxfa/parser/cxfa_localevalue.h"
@@ -171,14 +171,14 @@ CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData) {
return CXFA_LocaleValue(iVTType, pWidgetData->GetRawValue(),
pWidgetData->GetNode()->GetDocument()->GetLocalMgr());
}
-void XFA_GetPlainTextFromRichText(CFDE_XMLNode* pXMLNode,
+void XFA_GetPlainTextFromRichText(CFX_XMLNode* pXMLNode,
CFX_WideString& wsPlainText) {
if (!pXMLNode) {
return;
}
switch (pXMLNode->GetType()) {
- case FDE_XMLNODE_Element: {
- CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
+ case FX_XMLNODE_Element: {
+ CFX_XMLElement* pXMLElement = static_cast<CFX_XMLElement*>(pXMLNode);
CFX_WideString wsTag = pXMLElement->GetLocalTagName();
uint32_t uTag = FX_HashCode_GetW(wsTag.AsStringC(), true);
if (uTag == 0x0001f714) {
@@ -195,20 +195,18 @@ void XFA_GetPlainTextFromRichText(CFDE_XMLNode* pXMLNode,
}
break;
}
- case FDE_XMLNODE_Text:
- case FDE_XMLNODE_CharData: {
- CFX_WideString wsContent =
- static_cast<CFDE_XMLText*>(pXMLNode)->GetText();
+ case FX_XMLNODE_Text:
+ case FX_XMLNODE_CharData: {
+ CFX_WideString wsContent = static_cast<CFX_XMLText*>(pXMLNode)->GetText();
wsPlainText += wsContent;
break;
}
default:
break;
}
- for (CFDE_XMLNode* pChildXML =
- pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
+ for (CFX_XMLNode* pChildXML = pXMLNode->GetNodeItem(CFX_XMLNode::FirstChild);
pChildXML;
- pChildXML = pChildXML->GetNodeItem(CFDE_XMLNode::NextSibling)) {
+ pChildXML = pChildXML->GetNodeItem(CFX_XMLNode::NextSibling)) {
XFA_GetPlainTextFromRichText(pChildXML, wsPlainText);
}
}