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 #ifndef _FPDF_PARSER_ | 7 #ifndef _FPDF_PARSER_ |
8 #define _FPDF_PARSER_ | 8 #define _FPDF_PARSER_ |
9 #ifndef _FX_BASIC_H_ | 9 #ifndef _FX_BASIC_H_ |
10 #include "../fxcrt/fx_ext.h" | 10 #include "../fxcrt/fx_ext.h" |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig); | 793 CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig); |
794 CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig); | 794 CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig); |
795 CFX_ByteString PDF_EncodeString(const CFX_ByteString& src, FX_BOOL bHex = FALSE)
; | 795 CFX_ByteString PDF_EncodeString(const CFX_ByteString& src, FX_BOOL bHex = FALSE)
; |
796 CFX_WideString PDF_DecodeText(const CFX_ByteString& str, CFX_CharMap* pCharMap =
NULL); | 796 CFX_WideString PDF_DecodeText(const CFX_ByteString& str, CFX_CharMap* pCharMap =
NULL); |
797 CFX_WideString PDF_DecodeText(FX_LPCBYTE pData, FX_DWORD size, CFX_CharMap* pCha
rMap = NULL); | 797 CFX_WideString PDF_DecodeText(FX_LPCBYTE pData, FX_DWORD size, CFX_CharMap* pCha
rMap = NULL); |
798 CFX_ByteString PDF_EncodeText(FX_LPCWSTR pString, int len = -1, CFX_CharMap* pCh
arMap = NULL); | 798 CFX_ByteString PDF_EncodeText(FX_LPCWSTR pString, int len = -1, CFX_CharMap* pCh
arMap = NULL); |
799 FX_FLOAT PDF_ClipFloat(FX_FLOAT f); | 799 FX_FLOAT PDF_ClipFloat(FX_FLOAT f); |
800 class CFDF_Document : public CPDF_IndirectObjects | 800 class CFDF_Document : public CPDF_IndirectObjects |
801 { | 801 { |
802 public: | 802 public: |
803 | 803 static CFDF_Document* CreateNewDoc(); |
804 static CFDF_Document*» CreateNewDoc(); | 804 static CFDF_Document* ParseFile(IFX_FileRead *pFile, FX_BOOL bOwnFile = FALS
E); |
805 | 805 static CFDF_Document* ParseMemory(FX_LPCBYTE pData, FX_DWORD size); |
806 static CFDF_Document*» ParseFile(FX_LPCSTR file_path); | |
807 | |
808 static CFDF_Document*» ParseFile(FX_LPCWSTR file_path); | |
809 | |
810 static CFDF_Document*» ParseFile(IFX_FileRead *pFile, FX_BOOL bOwnFile
= FALSE); | |
811 | |
812 static CFDF_Document*» ParseMemory(FX_LPCBYTE pData, FX_DWORD size); | |
813 | 806 |
814 ~CFDF_Document(); | 807 ~CFDF_Document(); |
815 | 808 |
816 FX_BOOL WriteFile(FX_LPCSTR file_path) c
onst; | |
817 | |
818 FX_BOOL WriteFile(FX_LPCWSTR file_path)
const; | |
819 | |
820 FX_BOOL WriteFile(IFX_FileWrite *pFile)
const; | |
821 | |
822 FX_BOOL WriteBuf(CFX_ByteTextBuf& buf) c
onst; | 809 FX_BOOL WriteBuf(CFX_ByteTextBuf& buf) c
onst; |
823 | 810 |
824 CPDF_Dictionary* GetRoot() const | 811 CPDF_Dictionary* GetRoot() const |
825 { | 812 { |
826 return m_pRootDict; | 813 return m_pRootDict; |
827 } | 814 } |
828 | 815 |
829 CFX_WideString GetWin32Path() const; | 816 CFX_WideString GetWin32Path() const; |
830 protected: | 817 protected: |
831 | 818 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 PDF_DATAAVAIL_PAGETREE, | 936 PDF_DATAAVAIL_PAGETREE, |
950 PDF_DATAAVAIL_PAGE, | 937 PDF_DATAAVAIL_PAGE, |
951 PDF_DATAAVAIL_PAGE_LATERLOAD, | 938 PDF_DATAAVAIL_PAGE_LATERLOAD, |
952 PDF_DATAAVAIL_RESOURCES, | 939 PDF_DATAAVAIL_RESOURCES, |
953 PDF_DATAAVAIL_DONE, | 940 PDF_DATAAVAIL_DONE, |
954 PDF_DATAAVAIL_ERROR, | 941 PDF_DATAAVAIL_ERROR, |
955 PDF_DATAAVAIL_LOADALLFILE, | 942 PDF_DATAAVAIL_LOADALLFILE, |
956 PDF_DATAAVAIL_TRAILER_APPEND | 943 PDF_DATAAVAIL_TRAILER_APPEND |
957 }; | 944 }; |
958 #endif | 945 #endif |
OLD | NEW |