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

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

Issue 2122373003: Cleanup xfa_document_datamerge files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add else Created 4 years, 5 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
« no previous file with comments | « xfa/fxfa/parser/xfa_document_datamerger_imp.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_layout_pagemgr_new.h" 7 #include "xfa/fxfa/parser/xfa_layout_pagemgr_new.h"
8 8
9 #include "xfa/fxfa/app/xfa_ffnotify.h" 9 #include "xfa/fxfa/app/xfa_ffnotify.h"
10 #include "xfa/fxfa/parser/xfa_doclayout.h" 10 #include "xfa/fxfa/parser/xfa_doclayout.h"
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 for (CXFA_ContainerLayoutItem* pContainerItem = iterator.MoveToNext(); 1691 for (CXFA_ContainerLayoutItem* pContainerItem = iterator.MoveToNext();
1692 pContainerItem; pContainerItem = iterator.MoveToNext()) { 1692 pContainerItem; pContainerItem = iterator.MoveToNext()) {
1693 CXFA_Node* pNode = pContainerItem->m_pFormNode; 1693 CXFA_Node* pNode = pContainerItem->m_pFormNode;
1694 if (pNode->GetPacketID() != XFA_XDPPACKET_Template) { 1694 if (pNode->GetPacketID() != XFA_XDPPACKET_Template) {
1695 continue; 1695 continue;
1696 } 1696 }
1697 switch (pNode->GetElementType()) { 1697 switch (pNode->GetElementType()) {
1698 case XFA_Element::PageSet: { 1698 case XFA_Element::PageSet: {
1699 CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; 1699 CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode;
1700 pContainerItem->m_pFormNode = XFA_NodeMerge_CloneOrMergeContainer( 1700 pContainerItem->m_pFormNode = XFA_NodeMerge_CloneOrMergeContainer(
1701 pDocument, pParentNode, pContainerItem->m_pFormNode, TRUE); 1701 pDocument, pParentNode, pContainerItem->m_pFormNode, TRUE,
1702 nullptr);
1702 } break; 1703 } break;
1703 case XFA_Element::PageArea: { 1704 case XFA_Element::PageArea: {
1704 CXFA_ContainerLayoutItem* pFormLayout = pContainerItem; 1705 CXFA_ContainerLayoutItem* pFormLayout = pContainerItem;
1705 CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; 1706 CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode;
1706 FX_BOOL bIsExistForm = TRUE; 1707 FX_BOOL bIsExistForm = TRUE;
1707 for (int32_t iLevel = 0; iLevel < 3; iLevel++) { 1708 for (int32_t iLevel = 0; iLevel < 3; iLevel++) {
1708 pFormLayout = (CXFA_ContainerLayoutItem*)pFormLayout->m_pFirstChild; 1709 pFormLayout = (CXFA_ContainerLayoutItem*)pFormLayout->m_pFirstChild;
1709 if (iLevel == 2) { 1710 if (iLevel == 2) {
1710 while (pFormLayout && 1711 while (pFormLayout &&
1711 !XFA_ItemLayoutProcessor_IsTakingSpace( 1712 !XFA_ItemLayoutProcessor_IsTakingSpace(
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 } 1947 }
1947 pRootLayoutItem = m_pPageSetLayoutItemRoot; 1948 pRootLayoutItem = m_pPageSetLayoutItemRoot;
1948 CXFA_ContainerLayoutItem* pNextLayout = nullptr; 1949 CXFA_ContainerLayoutItem* pNextLayout = nullptr;
1949 for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) { 1950 for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) {
1950 pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling; 1951 pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling;
1951 SaveLayoutItem(pRootLayoutItem); 1952 SaveLayoutItem(pRootLayoutItem);
1952 delete pRootLayoutItem; 1953 delete pRootLayoutItem;
1953 } 1954 }
1954 m_pPageSetLayoutItemRoot = nullptr; 1955 m_pPageSetLayoutItemRoot = nullptr;
1955 } 1956 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_document_datamerger_imp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698