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_appadapter.h" | 7 #include "xfa/fxfa/parser/xfa_layout_appadapter.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 16 matching lines...) Expand all Loading... |
27 pLayoutItem->m_pFormNode->GetDocument()->GetDocLayout(); | 27 pLayoutItem->m_pFormNode->GetDocument()->GetDocLayout(); |
28 while (pNode) { | 28 while (pNode) { |
29 CXFA_LayoutItem* pNext = pNode->m_pNextSibling; | 29 CXFA_LayoutItem* pNext = pNode->m_pNextSibling; |
30 pNode->m_pParent = nullptr; | 30 pNode->m_pParent = nullptr; |
31 pNotify->OnLayoutItemRemoving(pDocLayout, | 31 pNotify->OnLayoutItemRemoving(pDocLayout, |
32 static_cast<CXFA_LayoutItem*>(pNode)); | 32 static_cast<CXFA_LayoutItem*>(pNode)); |
33 XFA_ReleaseLayoutItem(pNode); | 33 XFA_ReleaseLayoutItem(pNode); |
34 pNode = pNext; | 34 pNode = pNext; |
35 } | 35 } |
36 pNotify->OnLayoutItemRemoving(pDocLayout, pLayoutItem); | 36 pNotify->OnLayoutItemRemoving(pDocLayout, pLayoutItem); |
37 if (pLayoutItem->m_pFormNode->GetClassID() == XFA_Element::PageArea) { | 37 if (pLayoutItem->m_pFormNode->GetElementType() == XFA_Element::PageArea) { |
38 pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem), | 38 pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem), |
39 XFA_PAGEVIEWEVENT_PostRemoved); | 39 XFA_PAGEVIEWEVENT_PostRemoved); |
40 } | 40 } |
41 delete pLayoutItem; | 41 delete pLayoutItem; |
42 } | 42 } |
OLD | NEW |