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

Unified Diff: core/include/fpdfapi/fpdf_parser.h

Issue 1156203004: Merge to XFA: kill IPDF_DocParser(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_objects.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_parser.h
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index 0dc9ca64a381e8c856444f01a68ee743b5f884b2..34568e79ca8fda2b1e09b74ffa2e9bdd3cdc7c03 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -11,7 +11,6 @@
#include "fpdf_objects.h"
class CPDF_Document;
-class IPDF_DocParser;
class CPDF_Parser;
class CPDF_SecurityHandler;
class CPDF_StandardSecurityHandler;
@@ -61,14 +60,12 @@ public:
class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects
{
public:
-
- CPDF_Document(IPDF_DocParser* pParser);
-
CPDF_Document();
+ explicit CPDF_Document(CPDF_Parser* pParser);
~CPDF_Document();
- IPDF_DocParser* GetParser() const
+ CPDF_Parser* GetParser() const
{
return m_pParser;
}
@@ -370,33 +367,6 @@ struct PARSE_CONTEXT {
FX_FILESIZE m_DataEnd;
};
-class IPDF_DocParser
-{
-public:
- virtual ~IPDF_DocParser() { }
- virtual FX_DWORD GetRootObjNum() = 0;
-
- virtual FX_DWORD GetInfoObjNum() = 0;
-
- virtual CPDF_Object* ParseIndirectObject(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, PARSE_CONTEXT* pContext = NULL) = 0;
-
- virtual FX_DWORD GetLastObjNum() = 0;
-
- virtual CPDF_Array* GetIDArray() = 0;
-
- virtual CPDF_Dictionary* GetEncryptDict() = 0;
-
- FX_BOOL IsEncrypted()
- {
- return GetEncryptDict() != NULL;
- }
-
- virtual FX_DWORD GetPermissions(FX_BOOL bCheckRevision = FALSE) = 0;
-
- virtual FX_BOOL IsOwner() = 0;
-
- virtual FX_BOOL IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) = 0;
-};
#define PDFPARSE_ERROR_SUCCESS 0
#define PDFPARSE_ERROR_FILE 1
@@ -404,24 +374,22 @@ public:
#define PDFPARSE_ERROR_PASSWORD 3
#define PDFPARSE_ERROR_HANDLER 4
#define PDFPARSE_ERROR_CERT 5
-class CPDF_Parser FX_FINAL : public IPDF_DocParser
+
+class CPDF_Parser
{
public:
-
CPDF_Parser();
- ~CPDF_Parser() override;
+ ~CPDF_Parser();
FX_DWORD StartParse(FX_LPCSTR filename, FX_BOOL bReParse = FALSE);
-
FX_DWORD StartParse(FX_LPCWSTR filename, FX_BOOL bReParse = FALSE);
-
FX_DWORD StartParse(IFX_FileRead* pFile, FX_BOOL bReParse = FALSE, FX_BOOL bOwnFileRead = TRUE);
void CloseParser(FX_BOOL bReParse = FALSE);
- virtual FX_DWORD GetPermissions(FX_BOOL bCheckRevision = FALSE) FX_OVERRIDE;
+ FX_DWORD GetPermissions(FX_BOOL bCheckRevision = FALSE);
- virtual FX_BOOL IsOwner() FX_OVERRIDE;
+ FX_BOOL IsOwner();
void SetPassword(const FX_CHAR* password)
{
@@ -464,21 +432,30 @@ public:
{
return m_pDocument;
}
- CFX_ArrayTemplate<CPDF_Dictionary *> * GetOtherTrailers()
+
+ CFX_ArrayTemplate<CPDF_Dictionary*>* GetOtherTrailers()
{
return &m_Trailers;
}
- virtual FX_DWORD GetRootObjNum() FX_OVERRIDE;
- virtual FX_DWORD GetInfoObjNum() FX_OVERRIDE;
- virtual CPDF_Array* GetIDArray() FX_OVERRIDE;
- virtual CPDF_Dictionary* GetEncryptDict() FX_OVERRIDE
+ FX_DWORD GetRootObjNum();
+ FX_DWORD GetInfoObjNum() ;
+ CPDF_Array* GetIDArray() ;
+
+ CPDF_Dictionary* GetEncryptDict()
{
return m_pEncryptDict;
}
- virtual CPDF_Object* ParseIndirectObject(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, PARSE_CONTEXT* pContext = NULL) FX_OVERRIDE;
- virtual FX_DWORD GetLastObjNum() FX_OVERRIDE;
- virtual FX_BOOL IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) FX_OVERRIDE;
+
+ FX_BOOL IsEncrypted()
+ {
+ return GetEncryptDict() != NULL;
+ }
+
+
+ CPDF_Object* ParseIndirectObject(CPDF_IndirectObjects* pObjList, FX_DWORD objnum, PARSE_CONTEXT* pContext = NULL) ;
+ FX_DWORD GetLastObjNum();
+ FX_BOOL IsFormStream(FX_DWORD objnum, FX_BOOL& bForm);
FX_FILESIZE GetObjectOffset(FX_DWORD objnum);
« no previous file with comments | « core/include/fpdfapi/fpdf_objects.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698