summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document_parser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-05-01 17:02:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-01 17:02:54 +0000
commitba367068887aca9f700289aa1b8c198920ca39a2 (patch)
treeee04f81558512f9836e5bdb7a06198dd41d15894 /xfa/fxfa/parser/cxfa_document_parser.cpp
parent048afc6aba4848d5296affb4335500f960262580 (diff)
downloadpdfium-ba367068887aca9f700289aa1b8c198920ca39a2.tar.xz
Fixes XML Instruction handling in CXFA_DocumentParser.
This CL fixes issues with handling XML instructions in CXFA_DocumentParser. Unittests were added to verify the behaviour. Change-Id: Iff8d51d0e6d411419473c9b2c32c700d4bbf86f5 Reviewed-on: https://pdfium-review.googlesource.com/31810 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document_parser.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index f773a36897..fe246d2300 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -325,7 +325,7 @@ bool XFA_RecognizeRichText(CFX_XMLElement* pRichTextXMLNode) {
CXFA_DocumentParser::CXFA_DocumentParser(CXFA_Document* pFactory)
: m_pFactory(pFactory) {}
-CXFA_DocumentParser::~CXFA_DocumentParser() {}
+CXFA_DocumentParser::~CXFA_DocumentParser() = default;
bool CXFA_DocumentParser::Parse(const RetainPtr<IFX_SeekableStream>& pStream,
XFA_PacketType ePacketID) {
@@ -1137,6 +1137,7 @@ void CXFA_DocumentParser::ParseInstruction(CXFA_Node* pXFANode,
CFX_XMLInstruction* pXMLInstruction,
XFA_PacketType ePacketID) {
const std::vector<WideString>& target_data = pXMLInstruction->GetTargetData();
+
if (pXMLInstruction->IsOriginalXFAVersion()) {
if (target_data.size() > 1 &&
(pXFANode->GetDocument()->RecognizeXFAVersionNumber(target_data[0]) !=