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 "../../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 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 10 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
11 #include "../include/fpdfxfa/fpdfxfa_app.h" | 11 #include "../include/fpdfxfa/fpdfxfa_app.h" |
12 | 12 |
13 extern void ProcessParseError(FX_DWORD err_code); | |
14 class CFPDF_FileAvailWrap : public IFX_FileAvail { | 13 class CFPDF_FileAvailWrap : public IFX_FileAvail { |
15 public: | 14 public: |
16 CFPDF_FileAvailWrap() { m_pfileAvail = NULL; } | 15 CFPDF_FileAvailWrap() { m_pfileAvail = NULL; } |
17 ~CFPDF_FileAvailWrap() override {} | 16 ~CFPDF_FileAvailWrap() override {} |
18 | 17 |
19 void Set(FX_FILEAVAIL* pfileAvail) { m_pfileAvail = pfileAvail; } | 18 void Set(FX_FILEAVAIL* pfileAvail) { m_pfileAvail = pfileAvail; } |
20 | 19 |
21 // IFX_FileAvail | 20 // IFX_FileAvail |
22 FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) override { | 21 FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) override { |
23 return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size); | 22 return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return -1; | 142 return -1; |
144 CFPDF_DownloadHintsWrap hints_wrap(hints); | 143 CFPDF_DownloadHintsWrap hints_wrap(hints); |
145 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap); | 144 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap); |
146 } | 145 } |
147 | 146 |
148 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) { | 147 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) { |
149 if (avail == NULL) | 148 if (avail == NULL) |
150 return -1; | 149 return -1; |
151 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); | 150 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); |
152 } | 151 } |
OLD | NEW |