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

Side by Side Diff: xfa/fxfa/app/xfa_ffdoc.cpp

Issue 2089443002: Convert XFA_ELEMENT to an enum class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More unknown checks Created 4 years, 6 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 | « fpdfsdk/fsdk_annothandler.cpp ('k') | xfa/fxfa/app/xfa_ffdochandler.cpp » ('j') | 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 "xfa/fxfa/include/xfa_ffdoc.h" 7 #include "xfa/fxfa/include/xfa_ffdoc.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 return iStatus; 286 return iStatus;
287 } 287 }
288 void CXFA_FFDoc::StopLoad() { 288 void CXFA_FFDoc::StopLoad() {
289 m_pApp->GetXFAFontMgr()->LoadDocFonts(this); 289 m_pApp->GetXFAFontMgr()->LoadDocFonts(this);
290 m_dwDocType = XFA_DOCTYPE_Static; 290 m_dwDocType = XFA_DOCTYPE_Static;
291 CXFA_Node* pConfig = ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Config)); 291 CXFA_Node* pConfig = ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Config));
292 if (!pConfig) { 292 if (!pConfig) {
293 return; 293 return;
294 } 294 }
295 CXFA_Node* pAcrobat = pConfig->GetFirstChildByClass(XFA_ELEMENT_Acrobat); 295 CXFA_Node* pAcrobat = pConfig->GetFirstChildByClass(XFA_Element::Acrobat);
296 if (!pAcrobat) { 296 if (!pAcrobat) {
297 return; 297 return;
298 } 298 }
299 CXFA_Node* pAcrobat7 = pAcrobat->GetFirstChildByClass(XFA_ELEMENT_Acrobat7); 299 CXFA_Node* pAcrobat7 = pAcrobat->GetFirstChildByClass(XFA_Element::Acrobat7);
300 if (!pAcrobat7) { 300 if (!pAcrobat7) {
301 return; 301 return;
302 } 302 }
303 CXFA_Node* pDynamicRender = 303 CXFA_Node* pDynamicRender =
304 pAcrobat7->GetFirstChildByClass(XFA_ELEMENT_DynamicRender); 304 pAcrobat7->GetFirstChildByClass(XFA_Element::DynamicRender);
305 if (!pDynamicRender) { 305 if (!pDynamicRender) {
306 return; 306 return;
307 } 307 }
308 CFX_WideString wsType; 308 CFX_WideString wsType;
309 if (pDynamicRender->TryContent(wsType) && wsType == FX_WSTRC(L"required")) { 309 if (pDynamicRender->TryContent(wsType) && wsType == FX_WSTRC(L"required")) {
310 m_dwDocType = XFA_DOCTYPE_Dynamic; 310 m_dwDocType = XFA_DOCTYPE_Dynamic;
311 } 311 }
312 } 312 }
313 313
314 CXFA_FFDocView* CXFA_FFDoc::CreateDocView(uint32_t dwView) { 314 CXFA_FFDocView* CXFA_FFDoc::CreateDocView(uint32_t dwView) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 return !!pExport->Export( 489 return !!pExport->Export(
490 pFile, pNode, 0, bsChecksum.GetLength() ? bsChecksum.c_str() : nullptr); 490 pFile, pNode, 0, bsChecksum.GetLength() ? bsChecksum.c_str() : nullptr);
491 } 491 }
492 492
493 FX_BOOL CXFA_FFDoc::ImportData(IFX_FileRead* pStream, FX_BOOL bXDP) { 493 FX_BOOL CXFA_FFDoc::ImportData(IFX_FileRead* pStream, FX_BOOL bXDP) {
494 std::unique_ptr<CXFA_DataImporter> importer( 494 std::unique_ptr<CXFA_DataImporter> importer(
495 new CXFA_DataImporter(m_pDocument)); 495 new CXFA_DataImporter(m_pDocument));
496 return importer->ImportData(pStream); 496 return importer->ImportData(pStream);
497 } 497 }
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_annothandler.cpp ('k') | xfa/fxfa/app/xfa_ffdochandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698