summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-20 20:28:23 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-20 20:28:23 +0000
commite74ae8c02f6b5efa37ba11bcad6b714046cfc7b0 (patch)
tree1c5353b26b58732e5bda616ba5d9fc8f414a7037 /xfa/fxfa/parser/cxfa_document.cpp
parent68c77592f25f9173d2166fa01fb34b4155f4cfcb (diff)
downloadpdfium-e74ae8c02f6b5efa37ba11bcad6b714046cfc7b0.tar.xz
Convert calc data and layout item to store in CJX_Node
This CL moves the XFA_CalcData and XFA_LayoutItem out of the map'd data for a CJX_Node and stores directly on the node. This makes the object a bit bigger but makes the code a lot more understandable. Change-Id: I8897a52d61d37595181960c23928984aa5d67efc Reviewed-on: https://pdfium-review.googlesource.com/18590 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index edae6c3837..bdb8d9a0e5 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -99,7 +99,10 @@ CXFA_Document::~CXFA_Document() {
m_pRootNode->ReleaseBindingNodes();
delete m_pRootNode;
- PurgeNodes();
+
+ for (CXFA_Node* pNode : m_PurgeNodes)
+ delete pNode;
+ m_PurgeNodes.clear();
}
CXFA_LayoutProcessor* CXFA_Document::GetLayoutProcessor() {
@@ -238,13 +241,6 @@ bool CXFA_Document::RemovePurgeNode(CXFA_Node* pNode) {
return !!m_PurgeNodes.erase(pNode);
}
-void CXFA_Document::PurgeNodes() {
- for (CXFA_Node* pNode : m_PurgeNodes)
- delete pNode;
-
- m_PurgeNodes.clear();
-}
-
void CXFA_Document::SetFlag(uint32_t dwFlag, bool bOn) {
if (bOn)
m_dwDocFlags |= dwFlag;