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 "../include/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
8 #include "../include/fsdk_mgr.h" | 8 #include "../include/fsdk_mgr.h" |
9 #include "../include/fpdfview.h" | 9 #include "../include/fpdfview.h" |
10 #include "../include/fsdk_rendercontext.h" | 10 #include "../include/fsdk_rendercontext.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 } | 335 } |
336 | 336 |
337 DLLEXPORT FPDF_BOOL STDCALL FPDF_LoadXFA(FPDF_DOCUMENT document) | 337 DLLEXPORT FPDF_BOOL STDCALL FPDF_LoadXFA(FPDF_DOCUMENT document) |
338 { | 338 { |
339 return document && (static_cast<CPDFXFA_Document *>(document))->LoadXFAD
oc(); | 339 return document && (static_cast<CPDFXFA_Document *>(document))->LoadXFAD
oc(); |
340 } | 340 } |
341 | 341 |
342 | 342 |
343 extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code); | 343 extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code); |
344 | 344 |
345 class CMemFile FX_FINAL: public IFX_FileRead, public CFX_Object | 345 class CMemFile FX_FINAL: public IFX_FileRead |
346 { | 346 { |
347 public: | 347 public: |
348 CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {} | 348 CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {} |
349 | 349 |
350 virtual void Release() {delete this;} | 350 virtual void Release() {delete this;} |
351 virtual FX_FILESIZE GetSize() {return m_size;} | 351 virtual FX_FILESIZE GetSize() {return m_size;} |
352 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs
et, size_t size) | 352 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs
et, size_t size) |
353 { | 353 { |
354 if (offset < 0) { | 354 if (offset < 0) { |
355 return FALSE; | 355 return FALSE; |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 if (!buffer) { | 1088 if (!buffer) { |
1089 buflen = len; | 1089 buflen = len; |
1090 } else if (buflen >= len) { | 1090 } else if (buflen >= len) { |
1091 memcpy(buffer, utf16Name.c_str(), len); | 1091 memcpy(buffer, utf16Name.c_str(), len); |
1092 buflen = len; | 1092 buflen = len; |
1093 } else { | 1093 } else { |
1094 buflen = -1; | 1094 buflen = -1; |
1095 } | 1095 } |
1096 return (FPDF_DEST)pDestObj; | 1096 return (FPDF_DEST)pDestObj; |
1097 } | 1097 } |
OLD | NEW |