| 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 "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
| 9 | 9 |
| 10 extern void ProcessParseError(FX_DWORD err_code); | 10 extern void ProcessParseError(FX_DWORD err_code); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 m_pFileAccess = pFile; | 43 m_pFileAccess = pFile; |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual FX_FILESIZE GetSize() | 46 virtual FX_FILESIZE GetSize() |
| 47 { | 47 { |
| 48 return m_pFileAccess->m_FileLen; | 48 return m_pFileAccess->m_FileLen; |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs
et, size_t size) | 51 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs
et, size_t size) |
| 52 { | 52 { |
| 53 » » return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset,
(FX_LPBYTE)buffer, size); | 53 » » return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset,
(uint8_t*)buffer, size); |
| 54 } | 54 } |
| 55 | 55 |
| 56 virtual void Release() | 56 virtual void Release() |
| 57 { | 57 { |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 FPDF_FILEACCESS* m_pFileAccess; | 61 FPDF_FILEACCESS* m_pFileAccess; |
| 62 }; | 62 }; |
| 63 | 63 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 CFPDF_DownloadHintsWrap hints_wrap(hints); | 156 CFPDF_DownloadHintsWrap hints_wrap(hints); |
| 157 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap)
; | 157 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap)
; |
| 158 } | 158 } |
| 159 | 159 |
| 160 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) | 160 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) |
| 161 { | 161 { |
| 162 if (avail == NULL) return -1; | 162 if (avail == NULL) return -1; |
| 163 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); | 163 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); |
| 164 | 164 |
| 165 } | 165 } |
| OLD | NEW |