diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-13 21:44:33 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-13 21:44:33 +0000 |
commit | fa3765cce4da4c3923e525f0462afd794360d221 (patch) | |
tree | 2a246bc47d7584edf5d8dd2c124f6c21c26cd5c8 /xfa/fxfa/cxfa_ffdoc.cpp | |
parent | 9c112f92d4c2046d5a4f8538f4d18b74a87649d4 (diff) | |
download | pdfium-fa3765cce4da4c3923e525f0462afd794360d221.tar.xz |
Cleanup CFX_XMLNode pointers
This CL cleans up hte CFX_XMLNode pointers. Each pointer has been
renamed to make the usage clearer, the NodeItems method has been removed
in favour of distinct accessors and the node pointers have been made
private.
Change-Id: I5459a77a0ae93b08741a0cd59266ef9c81ddad75
Reviewed-on: https://pdfium-review.googlesource.com/26550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffdoc.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffdoc.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp index 4dfa78edb1..52ad5f692d 100644 --- a/xfa/fxfa/cxfa_ffdoc.cpp +++ b/xfa/fxfa/cxfa_ffdoc.cpp @@ -175,9 +175,8 @@ bool XFA_GetPDFContentsFromPDFXML(CFX_XMLNode* pPDFElement, uint8_t*& pByteBuffer, int32_t& iBufferSize) { CFX_XMLElement* pDocumentElement = nullptr; - for (CFX_XMLNode* pXMLNode = - pPDFElement->GetNodeItem(CFX_XMLNode::FirstChild); - pXMLNode; pXMLNode = pXMLNode->GetNodeItem(CFX_XMLNode::NextSibling)) { + for (CFX_XMLNode* pXMLNode = pPDFElement->GetFirstChild(); pXMLNode; + pXMLNode = pXMLNode->GetNextSibling()) { if (pXMLNode->GetType() == FX_XMLNODE_Element) { CFX_XMLElement* pXMLElement = static_cast<CFX_XMLElement*>(pXMLNode); WideString wsTagName = pXMLElement->GetName(); @@ -191,9 +190,8 @@ bool XFA_GetPDFContentsFromPDFXML(CFX_XMLNode* pPDFElement, return false; } CFX_XMLElement* pChunkElement = nullptr; - for (CFX_XMLNode* pXMLNode = - pDocumentElement->GetNodeItem(CFX_XMLNode::FirstChild); - pXMLNode; pXMLNode = pXMLNode->GetNodeItem(CFX_XMLNode::NextSibling)) { + for (CFX_XMLNode* pXMLNode = pDocumentElement->GetFirstChild(); pXMLNode; + pXMLNode = pXMLNode->GetNextSibling()) { if (pXMLNode->GetType() == FX_XMLNODE_Element) { CFX_XMLElement* pXMLElement = static_cast<CFX_XMLElement*>(pXMLNode); WideString wsTagName = pXMLElement->GetName(); |