Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Side by Side Diff: xfa/fxfa/parser/xfa_document_layout_imp.cpp

Issue 2083453003: Split the XFA_OBJECTTYPE enum into two parts. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Force to bool Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/fxfa/parser/xfa_document_layout_imp.h" 7 #include "xfa/fxfa/parser/xfa_document_layout_imp.h"
8 8
9 #include "xfa/fxfa/parser/xfa_basic_imp.h" 9 #include "xfa/fxfa/parser/xfa_basic_imp.h"
10 #include "xfa/fxfa/parser/xfa_doclayout.h" 10 #include "xfa/fxfa/parser/xfa_doclayout.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 m_nProgressCounter; 108 m_nProgressCounter;
109 } 109 }
110 FX_BOOL CXFA_LayoutProcessor::IncrementLayout() { 110 FX_BOOL CXFA_LayoutProcessor::IncrementLayout() {
111 if (m_bNeeLayout) { 111 if (m_bNeeLayout) {
112 StartLayout(TRUE); 112 StartLayout(TRUE);
113 return DoLayout(NULL) == 100; 113 return DoLayout(NULL) == 100;
114 } 114 }
115 for (int32_t i = 0, c = m_rgChangedContainers.GetSize(); i < c; i++) { 115 for (int32_t i = 0, c = m_rgChangedContainers.GetSize(); i < c; i++) {
116 CXFA_Node* pNode = m_rgChangedContainers[i]; 116 CXFA_Node* pNode = m_rgChangedContainers[i];
117 CXFA_Node* pParentNode = 117 CXFA_Node* pParentNode =
118 pNode->GetNodeItem(XFA_NODEITEM_Parent, XFA_OBJECTTYPE_ContainerNode); 118 pNode->GetNodeItem(XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode);
119 if (!pParentNode) { 119 if (!pParentNode) {
120 return FALSE; 120 return FALSE;
121 } 121 }
122 if (!CXFA_ItemLayoutProcessor::IncrementRelayoutNode(this, pNode, 122 if (!CXFA_ItemLayoutProcessor::IncrementRelayoutNode(this, pNode,
123 pParentNode)) { 123 pParentNode)) {
124 return FALSE; 124 return FALSE;
125 } 125 }
126 } 126 }
127 m_rgChangedContainers.RemoveAll(); 127 m_rgChangedContainers.RemoveAll();
128 return TRUE; 128 return TRUE;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 CXFA_ContentLayoutItem::CXFA_ContentLayoutItem(CXFA_Node* pNode) 196 CXFA_ContentLayoutItem::CXFA_ContentLayoutItem(CXFA_Node* pNode)
197 : CXFA_LayoutItem(pNode, TRUE), 197 : CXFA_LayoutItem(pNode, TRUE),
198 m_pPrev(NULL), 198 m_pPrev(NULL),
199 m_pNext(NULL), 199 m_pNext(NULL),
200 m_dwStatus(0) {} 200 m_dwStatus(0) {}
201 CXFA_ContentLayoutItem::~CXFA_ContentLayoutItem() { 201 CXFA_ContentLayoutItem::~CXFA_ContentLayoutItem() {
202 if (m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY) == this) { 202 if (m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY) == this) {
203 m_pFormNode->SetUserData(XFA_LAYOUTITEMKEY, NULL); 203 m_pFormNode->SetUserData(XFA_LAYOUTITEMKEY, NULL);
204 } 204 }
205 } 205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698