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

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

Issue 1951653002: Return bool rather than bitwise-and for FX_BOOL (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More bool, fix nits. Created 4 years, 7 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/include/xfa_ffwidget.h ('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 "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
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
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 }
OLDNEW
« no previous file with comments | « xfa/fxfa/include/xfa_ffwidget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698