diff options
author | Lei Zhang <thestig@chromium.org> | 2015-08-14 14:07:43 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-08-14 14:07:43 -0700 |
commit | c2c3f7b5f0396409451a9d344f35ec1929a76e9f (patch) | |
tree | b1c696afdca13e8087e18014b19a6c82415f72d5 /core/include/fpdfapi | |
parent | c6540e037ed1a9546d5a90455bf440a24b181ab4 (diff) | |
download | pdfium-c2c3f7b5f0396409451a9d344f35ec1929a76e9f.tar.xz |
Use override in more classes in core/
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1292613003 .
Diffstat (limited to 'core/include/fpdfapi')
-rw-r--r-- | core/include/fpdfapi/fpdf_pageobj.h | 16 | ||||
-rw-r--r-- | core/include/fpdfapi/fpdf_parser.h | 66 | ||||
-rw-r--r-- | core/include/fpdfapi/fpdf_resource.h | 4 |
3 files changed, 43 insertions, 43 deletions
diff --git a/core/include/fpdfapi/fpdf_pageobj.h b/core/include/fpdfapi/fpdf_pageobj.h index be81244ef4..7ea51cc814 100644 --- a/core/include/fpdfapi/fpdf_pageobj.h +++ b/core/include/fpdfapi/fpdf_pageobj.h @@ -70,9 +70,7 @@ class CPDF_Path : public CFX_CountRef<CFX_PathData> { class CPDF_ClipPathData { public: CPDF_ClipPathData(); - CPDF_ClipPathData(const CPDF_ClipPathData&); - ~CPDF_ClipPathData(); void SetCount(int path_count, int text_count); @@ -88,6 +86,7 @@ class CPDF_ClipPathData { CPDF_TextObject** m_pTextList; }; + class CPDF_ClipPath : public CFX_CountRef<CPDF_ClipPathData> { public: FX_DWORD GetPathCount() const { return m_pObject->m_PathCount; } @@ -492,12 +491,14 @@ class CPDF_TextObject : public CPDF_PageObject { class CPDF_PathObject : public CPDF_PageObject { public: CPDF_PathObject() { m_Type = PDFPAGE_PATH; } + ~CPDF_PathObject() override {} - virtual ~CPDF_PathObject() {} void Transform(const CFX_AffineMatrix& maxtrix) override; void SetGraphState(CPDF_GraphState GraphState); + void CalcBoundingBox(); + CPDF_Path m_Path; int m_FillType; @@ -506,8 +507,6 @@ class CPDF_PathObject : public CPDF_PageObject { CFX_AffineMatrix m_Matrix; - void CalcBoundingBox(); - protected: void CopyData(const CPDF_PageObject* pSrcObject) override; }; @@ -515,8 +514,8 @@ class CPDF_PathObject : public CPDF_PageObject { class CPDF_ImageObject : public CPDF_PageObject { public: CPDF_ImageObject(); + ~CPDF_ImageObject() override; - virtual ~CPDF_ImageObject(); void Transform(const CFX_AffineMatrix& matrix) override; CPDF_Image* m_pImage; @@ -532,8 +531,7 @@ class CPDF_ImageObject : public CPDF_PageObject { class CPDF_ShadingObject : public CPDF_PageObject { public: CPDF_ShadingObject(); - - virtual ~CPDF_ShadingObject(); + ~CPDF_ShadingObject() override; CPDF_ShadingPattern* m_pShading; @@ -553,8 +551,8 @@ class CPDF_FormObject : public CPDF_PageObject { m_Type = PDFPAGE_FORM; m_pForm = NULL; } + ~CPDF_FormObject() override; - virtual ~CPDF_FormObject(); void Transform(const CFX_AffineMatrix& matrix) override; CPDF_Form* m_pForm; diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index cb4e15e25d..a83cec194c 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -547,17 +547,18 @@ class CPDF_SecurityHandler { class CPDF_StandardSecurityHandler : public CPDF_SecurityHandler { public: CPDF_StandardSecurityHandler(); - - virtual ~CPDF_StandardSecurityHandler(); - virtual FX_BOOL OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict); - virtual FX_DWORD GetPermissions(); - virtual FX_BOOL IsOwner() { return m_bOwner; } - virtual FX_BOOL GetCryptInfo(int& cipher, - const uint8_t*& buffer, - int& keylen); - virtual FX_BOOL IsMetadataEncrypted(); - virtual CPDF_CryptoHandler* CreateCryptoHandler(); - virtual CPDF_StandardSecurityHandler* GetStandardHandler() { return this; } + ~CPDF_StandardSecurityHandler() override; + + // CPDF_SecurityHandler + FX_BOOL OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict) override; + FX_DWORD GetPermissions() override; + FX_BOOL IsOwner() override { return m_bOwner; } + FX_BOOL GetCryptInfo(int& cipher, + const uint8_t*& buffer, + int& keylen) override; + FX_BOOL IsMetadataEncrypted() override; + CPDF_CryptoHandler* CreateCryptoHandler() override; + CPDF_StandardSecurityHandler* GetStandardHandler() override { return this; } void OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_Array* pIdArray, @@ -683,29 +684,30 @@ class CPDF_CryptoHandler { class CPDF_StandardCryptoHandler : public CPDF_CryptoHandler { public: CPDF_StandardCryptoHandler(); - - virtual ~CPDF_StandardCryptoHandler(); + ~CPDF_StandardCryptoHandler() override; + + // CPDF_CryptoHandler + FX_BOOL Init(CPDF_Dictionary* pEncryptDict, + CPDF_SecurityHandler* pSecurityHandler) override; + FX_DWORD DecryptGetSize(FX_DWORD src_size) override; + void* DecryptStart(FX_DWORD objnum, FX_DWORD gennum) override; + FX_BOOL DecryptStream(void* context, + const uint8_t* src_buf, + FX_DWORD src_size, + CFX_BinaryBuf& dest_buf) override; + FX_BOOL DecryptFinish(void* context, CFX_BinaryBuf& dest_buf) override; + FX_DWORD EncryptGetSize(FX_DWORD objnum, + FX_DWORD version, + const uint8_t* src_buf, + FX_DWORD src_size) override; + FX_BOOL EncryptContent(FX_DWORD objnum, + FX_DWORD version, + const uint8_t* src_buf, + FX_DWORD src_size, + uint8_t* dest_buf, + FX_DWORD& dest_size) override; FX_BOOL Init(int cipher, const uint8_t* key, int keylen); - virtual FX_BOOL Init(CPDF_Dictionary* pEncryptDict, - CPDF_SecurityHandler* pSecurityHandler); - virtual FX_DWORD DecryptGetSize(FX_DWORD src_size); - virtual void* DecryptStart(FX_DWORD objnum, FX_DWORD gennum); - virtual FX_BOOL DecryptStream(void* context, - const uint8_t* src_buf, - FX_DWORD src_size, - CFX_BinaryBuf& dest_buf); - virtual FX_BOOL DecryptFinish(void* context, CFX_BinaryBuf& dest_buf); - virtual FX_DWORD EncryptGetSize(FX_DWORD objnum, - FX_DWORD version, - const uint8_t* src_buf, - FX_DWORD src_size); - virtual FX_BOOL EncryptContent(FX_DWORD objnum, - FX_DWORD version, - const uint8_t* src_buf, - FX_DWORD src_size, - uint8_t* dest_buf, - FX_DWORD& dest_size); protected: virtual void CryptBlock(FX_BOOL bEncrypt, diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h index c41a306d54..5b6f3498fe 100644 --- a/core/include/fpdfapi/fpdf_resource.h +++ b/core/include/fpdfapi/fpdf_resource.h @@ -664,7 +664,7 @@ class CPDF_TilingPattern : public CPDF_Pattern { CPDF_Object* pPatternObj, const CFX_AffineMatrix* parentMatrix); - virtual ~CPDF_TilingPattern(); + ~CPDF_TilingPattern() override; FX_BOOL Load(); @@ -685,7 +685,7 @@ class CPDF_ShadingPattern : public CPDF_Pattern { FX_BOOL bShading, const CFX_AffineMatrix* parentMatrix); - virtual ~CPDF_ShadingPattern(); + ~CPDF_ShadingPattern() override; CPDF_Object* m_pShadingObj; |