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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |