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

Side by Side Diff: fpdfsdk/src/fpdf_dataavail.cpp

Issue 1413883005: More master side changes for convergence with XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove fn. Created 5 years, 1 month 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
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 "../../public/fpdf_dataavail.h" 7 #include "../../public/fpdf_dataavail.h"
8 #include "../../public/fpdf_formfill.h" 8 #include "../../public/fpdf_formfill.h"
9 #include "../include/fsdk_define.h" 9 #include "../include/fsdk_define.h"
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 FX_DWORD err_code = pParser->StartAsynParse( 105 FX_DWORD err_code = pParser->StartAsynParse(
106 ((CFPDF_DataAvail*)avail)->m_pDataAvail->GetFileRead()); 106 ((CFPDF_DataAvail*)avail)->m_pDataAvail->GetFileRead());
107 if (err_code) { 107 if (err_code) {
108 delete pParser; 108 delete pParser;
109 ProcessParseError(err_code); 109 ProcessParseError(err_code);
110 return NULL; 110 return NULL;
111 } 111 }
112 ((CFPDF_DataAvail*)avail)->m_pDataAvail->SetDocument(pParser->GetDocument()); 112 ((CFPDF_DataAvail*)avail)->m_pDataAvail->SetDocument(pParser->GetDocument());
113 CheckUnSupportError(pParser->GetDocument(), FPDF_ERR_SUCCESS); 113 CheckUnSupportError(pParser->GetDocument(), FPDF_ERR_SUCCESS);
114 return pParser->GetDocument(); 114 return FPDFDocumentFromCPDFDocument(pParser->GetDocument());
115 } 115 }
116 116
117 DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) { 117 DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) {
118 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(doc); 118 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(doc);
119 if (!doc) 119 if (!doc)
120 return 0; 120 return 0;
121 return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo(); 121 return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo();
122 } 122 }
123 123
124 DLLEXPORT int STDCALL FPDFAvail_IsPageAvail(FPDF_AVAIL avail, 124 DLLEXPORT int STDCALL FPDFAvail_IsPageAvail(FPDF_AVAIL avail,
(...skipping 12 matching lines...) Expand all
137 return -1; 137 return -1;
138 CFPDF_DownloadHintsWrap hints_wrap(hints); 138 CFPDF_DownloadHintsWrap hints_wrap(hints);
139 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap); 139 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap);
140 } 140 }
141 141
142 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) { 142 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) {
143 if (avail == NULL) 143 if (avail == NULL)
144 return -1; 144 return -1;
145 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); 145 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF();
146 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698