summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 21:49:19 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 21:49:19 -0700
commit62b2e912dc2a508972fbf01b25f7449c39ff1543 (patch)
tree47a244dc5891b2a338ca529b796e12994e642cbc /core/src/fpdfapi/fpdf_page
parentbdf72c353af5b8a34ef5efdeddfff36d2089a158 (diff)
downloadpdfium-62b2e912dc2a508972fbf01b25f7449c39ff1543.tar.xz
Merge to XFA: Use override in more classes in core/
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1292613003 . (cherry picked from commit c2c3f7b5f0396409451a9d344f35ec1929a76e9f) Review URL: https://codereview.chromium.org/1296043002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp41
1 files changed, 30 insertions, 11 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
index 87ff0a3b63..1ee062ee7c 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -463,18 +463,23 @@ typedef struct {
int sizes;
} SampleEncodeInfo;
typedef struct { FX_FLOAT decode_max, decode_min; } SampleDecodeInfo;
+
class CPDF_SampledFunc : public CPDF_Function {
public:
CPDF_SampledFunc();
- virtual ~CPDF_SampledFunc();
- virtual FX_BOOL v_Init(CPDF_Object* pObj);
- virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const;
+ ~CPDF_SampledFunc() override;
+
+ // CPDF_Function
+ FX_BOOL v_Init(CPDF_Object* pObj) override;
+ FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
+
SampleEncodeInfo* m_pEncodeInfo;
SampleDecodeInfo* m_pDecodeInfo;
FX_DWORD m_nBitsPerSample;
FX_DWORD m_SampleMax;
CPDF_StreamAcc* m_pSampleStream;
};
+
CPDF_SampledFunc::CPDF_SampledFunc() {
m_pSampleStream = NULL;
m_pEncodeInfo = NULL;
@@ -620,12 +625,16 @@ FX_BOOL CPDF_SampledFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const {
}
return TRUE;
}
+
class CPDF_PSFunc : public CPDF_Function {
public:
- virtual FX_BOOL v_Init(CPDF_Object* pObj);
- virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const;
+ // CPDF_Function
+ FX_BOOL v_Init(CPDF_Object* pObj) override;
+ FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
+
CPDF_PSEngine m_PS;
};
+
FX_BOOL CPDF_PSFunc::v_Init(CPDF_Object* pObj) {
CPDF_Stream* pStream = (CPDF_Stream*)pObj;
CPDF_StreamAcc acc;
@@ -648,17 +657,22 @@ FX_BOOL CPDF_PSFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const {
}
return TRUE;
}
+
class CPDF_ExpIntFunc : public CPDF_Function {
public:
CPDF_ExpIntFunc();
- virtual ~CPDF_ExpIntFunc();
- virtual FX_BOOL v_Init(CPDF_Object* pObj);
- virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const;
+ ~CPDF_ExpIntFunc() override;
+
+ // CPDF_Function
+ FX_BOOL v_Init(CPDF_Object* pObj) override;
+ FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
+
FX_FLOAT m_Exponent;
FX_FLOAT* m_pBeginValues;
FX_FLOAT* m_pEndValues;
int m_nOrigOutputs;
};
+
CPDF_ExpIntFunc::CPDF_ExpIntFunc() {
m_pBeginValues = NULL;
m_pEndValues = NULL;
@@ -708,17 +722,22 @@ FX_BOOL CPDF_ExpIntFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const {
}
return TRUE;
}
+
class CPDF_StitchFunc : public CPDF_Function {
public:
CPDF_StitchFunc();
- virtual ~CPDF_StitchFunc();
- virtual FX_BOOL v_Init(CPDF_Object* pObj);
- virtual FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const;
+ ~CPDF_StitchFunc() override;
+
+ // CPDF_Function
+ FX_BOOL v_Init(CPDF_Object* pObj) override;
+ FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override;
+
int m_nSubs;
CPDF_Function** m_pSubFunctions;
FX_FLOAT* m_pBounds;
FX_FLOAT* m_pEncode;
};
+
CPDF_StitchFunc::CPDF_StitchFunc() {
m_nSubs = 0;
m_pSubFunctions = NULL;