diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-30 21:56:00 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-30 21:56:00 +0000 |
commit | f65f1d398804ec4702a3de691398902a0347461c (patch) | |
tree | a38ce902fa1181e9d00f4010a4abea8cf114c926 /xfa/fxfa/parser/cxfa_document.cpp | |
parent | e06c542ffdc7325cb3c430e59bd0d9df4ddb7776 (diff) | |
download | pdfium-f65f1d398804ec4702a3de691398902a0347461c.tar.xz |
Move packet information into simple parser
This CL moves the packet information into the anonymous namespace of the
simple parser. There is slight duplication in that two of the namespace
URIs have been copied into other files but this duplication allows for a
bunch of simplification.
Change-Id: I33092424ff4cb57eaf85da97a92fa6cf7b11f2ef
Reviewed-on: https://pdfium-review.googlesource.com/20050
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_document.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index b23ba68a45..a737baaafb 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -25,6 +25,9 @@ namespace { +constexpr const wchar_t kTemplateNS[] = + L"http://www.xfa.org/schema/xfa-template/"; + void MergeNodeRecurse(CXFA_Document* pDocument, CXFA_Node* pDestNodeParent, CXFA_Node* pProtoNode) { @@ -295,8 +298,7 @@ CFXJSE_Engine* CXFA_Document::GetScriptContext() { XFA_VERSION CXFA_Document::RecognizeXFAVersionNumber( const WideString& wsTemplateNS) { - WideStringView wsTemplateURIPrefix = - XFA_GetPacketByIndex(XFA_PacketType::Template)->pURI; + WideStringView wsTemplateURIPrefix(kTemplateNS); size_t nPrefixLength = wsTemplateURIPrefix.GetLength(); if (WideStringView(wsTemplateNS.c_str(), wsTemplateNS.GetLength()) != wsTemplateURIPrefix) { |