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_docdata.h" |
| 9 #include "xfa/src/fxfa/src/common/xfa_doclayout.h" |
| 10 #include "xfa/src/fxfa/src/common/xfa_document.h" |
| 11 #include "xfa/src/fxfa/src/common/xfa_fm2jsapi.h" |
| 12 #include "xfa/src/fxfa/src/common/xfa_localemgr.h" |
9 #include "xfa/src/fxfa/src/common/xfa_object.h" | 13 #include "xfa/src/fxfa/src/common/xfa_object.h" |
10 #include "xfa/src/fxfa/src/common/xfa_document.h" | |
11 #include "xfa/src/fxfa/src/common/xfa_parser.h" | 14 #include "xfa/src/fxfa/src/common/xfa_parser.h" |
12 #include "xfa/src/fxfa/src/common/xfa_script.h" | 15 #include "xfa/src/fxfa/src/common/xfa_script.h" |
13 #include "xfa/src/fxfa/src/common/xfa_docdata.h" | 16 #include "xfa/src/fxfa/src/common/xfa_utils.h" |
14 #include "xfa/src/fxfa/src/common/xfa_doclayout.h" | |
15 #include "xfa/src/fxfa/src/common/xfa_localemgr.h" | |
16 #include "xfa/src/fxfa/src/common/xfa_fm2jsapi.h" | |
17 #include "xfa/src/fxfa/src/parser/xfa_document_layout_imp.h" | 17 #include "xfa/src/fxfa/src/parser/xfa_document_layout_imp.h" |
| 18 #include "xfa/src/fxfa/src/parser/xfa_layout_appadapter.h" |
18 #include "xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h" | 19 #include "xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h" |
19 #include "xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h" | 20 #include "xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h" |
20 #include "xfa/src/fxfa/src/parser/xfa_layout_appadapter.h" | |
21 FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) { | 21 FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) { |
22 FX_DWORD dwRelevant = XFA_LAYOUTSTATUS_Viewable | XFA_LAYOUTSTATUS_Printable; | 22 FX_DWORD dwRelevant = XFA_LAYOUTSTATUS_Viewable | XFA_LAYOUTSTATUS_Printable; |
23 CFX_WideStringC wsRelevant; | 23 CFX_WideStringC wsRelevant; |
24 if (pFormItem->TryCData(XFA_ATTRIBUTE_Relevant, wsRelevant)) { | 24 if (pFormItem->TryCData(XFA_ATTRIBUTE_Relevant, wsRelevant)) { |
25 if (wsRelevant == FX_WSTRC(L"+print") || wsRelevant == FX_WSTRC(L"print")) { | 25 if (wsRelevant == FX_WSTRC(L"+print") || wsRelevant == FX_WSTRC(L"print")) { |
26 dwRelevant &= ~XFA_LAYOUTSTATUS_Viewable; | 26 dwRelevant &= ~XFA_LAYOUTSTATUS_Viewable; |
27 } else if (wsRelevant == FX_WSTRC(L"-print")) { | 27 } else if (wsRelevant == FX_WSTRC(L"-print")) { |
28 dwRelevant &= ~XFA_LAYOUTSTATUS_Printable; | 28 dwRelevant &= ~XFA_LAYOUTSTATUS_Printable; |
29 } | 29 } |
30 } | 30 } |
(...skipping 21 matching lines...) Expand all Loading... |
52 XFA_ReleaseLayoutItem(pNode); | 52 XFA_ReleaseLayoutItem(pNode); |
53 pNode = pNext; | 53 pNode = pNext; |
54 } | 54 } |
55 pNotify->OnLayoutEvent(pDocLayout, pLayoutItem, XFA_LAYOUTEVENT_ItemRemoving); | 55 pNotify->OnLayoutEvent(pDocLayout, pLayoutItem, XFA_LAYOUTEVENT_ItemRemoving); |
56 if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea) { | 56 if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea) { |
57 pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem), | 57 pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem), |
58 XFA_PAGEEVENT_PageRemoved); | 58 XFA_PAGEEVENT_PageRemoved); |
59 } | 59 } |
60 delete pLayoutItem; | 60 delete pLayoutItem; |
61 } | 61 } |
OLD | NEW |