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 "core/fxcrt/include/fx_ext.h" | 7 #include "core/fxcrt/include/fx_ext.h" |
8 #include "xfa/fxfa/app/xfa_ffnotify.h" | 8 #include "xfa/fxfa/app/xfa_ffnotify.h" |
9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
10 #include "xfa/fxfa/parser/xfa_basic_imp.h" | 10 #include "xfa/fxfa/parser/xfa_basic_imp.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 191 } |
192 void CXFA_Document::SetFlag(uint32_t dwFlag, FX_BOOL bOn) { | 192 void CXFA_Document::SetFlag(uint32_t dwFlag, FX_BOOL bOn) { |
193 if (bOn) { | 193 if (bOn) { |
194 m_dwDocFlags |= dwFlag; | 194 m_dwDocFlags |= dwFlag; |
195 } else { | 195 } else { |
196 m_dwDocFlags &= ~dwFlag; | 196 m_dwDocFlags &= ~dwFlag; |
197 } | 197 } |
198 } | 198 } |
199 FX_BOOL CXFA_Document::IsInteractive() { | 199 FX_BOOL CXFA_Document::IsInteractive() { |
200 if (m_dwDocFlags & XFA_DOCFLAG_HasInteractive) { | 200 if (m_dwDocFlags & XFA_DOCFLAG_HasInteractive) { |
201 return m_dwDocFlags & XFA_DOCFLAG_Interactive; | 201 return !!(m_dwDocFlags & XFA_DOCFLAG_Interactive); |
202 } | 202 } |
203 CXFA_Node* pConfig = ToNode(GetXFAObject(XFA_HASHCODE_Config)); | 203 CXFA_Node* pConfig = ToNode(GetXFAObject(XFA_HASHCODE_Config)); |
204 if (!pConfig) { | 204 if (!pConfig) { |
205 return FALSE; | 205 return FALSE; |
206 } | 206 } |
207 CFX_WideString wsInteractive; | 207 CFX_WideString wsInteractive; |
208 CXFA_Node* pPresent = pConfig->GetFirstChildByClass(XFA_ELEMENT_Present); | 208 CXFA_Node* pPresent = pConfig->GetFirstChildByClass(XFA_ELEMENT_Present); |
209 if (!pPresent) { | 209 if (!pPresent) { |
210 return FALSE; | 210 return FALSE; |
211 } | 211 } |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { | 414 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { |
415 continue; | 415 continue; |
416 } | 416 } |
417 } | 417 } |
418 if (!pProtoNode) { | 418 if (!pProtoNode) { |
419 continue; | 419 continue; |
420 } | 420 } |
421 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); | 421 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); |
422 } | 422 } |
423 } | 423 } |
OLD | NEW |