| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/src/foxitlib.h" | 7 #include "xfa/src/foxitlib.h" |
| 8 #include "xfa/src/fxfa/src/common/xfa_utils.h" | 8 #include "xfa/src/fxfa/src/common/xfa_utils.h" |
| 9 #include "xfa/src/fxfa/src/common/xfa_object.h" | 9 #include "xfa/src/fxfa/src/common/xfa_object.h" |
| 10 #include "xfa/src/fxfa/src/common/xfa_document.h" | 10 #include "xfa/src/fxfa/src/common/xfa_document.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 int32_t CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart) { | 45 int32_t CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart) { |
| 46 if (!bForceRestart && !IsNeedLayout()) { | 46 if (!bForceRestart && !IsNeedLayout()) { |
| 47 return 100; | 47 return 100; |
| 48 } | 48 } |
| 49 if (m_pRootItemLayoutProcessor) { | 49 if (m_pRootItemLayoutProcessor) { |
| 50 delete m_pRootItemLayoutProcessor; | 50 delete m_pRootItemLayoutProcessor; |
| 51 m_pRootItemLayoutProcessor = NULL; | 51 m_pRootItemLayoutProcessor = NULL; |
| 52 } | 52 } |
| 53 m_nProgressCounter = 0; | 53 m_nProgressCounter = 0; |
| 54 CXFA_Node* pFormPacketNode = | 54 CXFA_Node* pFormPacketNode = |
| 55 (CXFA_Node*)m_pDocument->GetXFAObject(XFA_HASHCODE_Form); | 55 ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Form)); |
| 56 if (!pFormPacketNode) { | 56 if (!pFormPacketNode) { |
| 57 return -1; | 57 return -1; |
| 58 } | 58 } |
| 59 CXFA_Node* pFormRoot = | 59 CXFA_Node* pFormRoot = |
| 60 pFormPacketNode->GetFirstChildByClass(XFA_ELEMENT_Subform); | 60 pFormPacketNode->GetFirstChildByClass(XFA_ELEMENT_Subform); |
| 61 if (!pFormRoot) { | 61 if (!pFormRoot) { |
| 62 return -1; | 62 return -1; |
| 63 } | 63 } |
| 64 if (!m_pLayoutPageMgr) { | 64 if (!m_pLayoutPageMgr) { |
| 65 m_pLayoutPageMgr = new CXFA_LayoutPageMgr(this); | 65 m_pLayoutPageMgr = new CXFA_LayoutPageMgr(this); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 : CXFA_LayoutItem(pNode, TRUE), | 204 : CXFA_LayoutItem(pNode, TRUE), |
| 205 m_pPrev(NULL), | 205 m_pPrev(NULL), |
| 206 m_pNext(NULL), | 206 m_pNext(NULL), |
| 207 m_dwStatus(0) { | 207 m_dwStatus(0) { |
| 208 } | 208 } |
| 209 CXFA_ContentLayoutItem::~CXFA_ContentLayoutItem() { | 209 CXFA_ContentLayoutItem::~CXFA_ContentLayoutItem() { |
| 210 if (m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY) == this) { | 210 if (m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY) == this) { |
| 211 m_pFormNode->SetUserData(XFA_LAYOUTITEMKEY, NULL); | 211 m_pFormNode->SetUserData(XFA_LAYOUTITEMKEY, NULL); |
| 212 } | 212 } |
| 213 } | 213 } |
| OLD | NEW |