summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-09-17 18:25:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-17 18:25:32 +0000
commitcb798258c433bec7087948fcbfff14d1e7683006 (patch)
treebc873a405dbfe7c957d75a1748acce11c7f473e7 /core/fpdfapi
parentc5709dd345c748016a637b2104544895223f8fc7 (diff)
downloadpdfium-cb798258c433bec7087948fcbfff14d1e7683006.tar.xz
Fix final/protected conflicts.
Classes marked |final| should not have |protected| members. In turn, "private field m_dwEncryptObjNum is not used" warning is produced. Change-Id: I51a96aca5a5f499381a6764d892962f7f2dc0327 Reviewed-on: https://pdfium-review.googlesource.com/42611 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.h2
-rw-r--r--core/fpdfapi/font/cpdf_truetypefont.h2
-rw-r--r--core/fpdfapi/font/cpdf_type3font.h4
-rw-r--r--core/fpdfapi/parser/cfdf_document.h2
-rw-r--r--core/fpdfapi/parser/cpdf_array.h2
-rw-r--r--core/fpdfapi/parser/cpdf_boolean.h2
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.h3
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.h2
-rw-r--r--core/fpdfapi/parser/cpdf_name.h2
-rw-r--r--core/fpdfapi/parser/cpdf_object_avail_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_page_object_avail.h2
-rw-r--r--core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_reference.h2
-rw-r--r--core/fpdfapi/parser/cpdf_stream.h2
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc.h3
-rw-r--r--core/fpdfapi/parser/cpdf_string.h2
16 files changed, 16 insertions, 20 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.h b/core/fpdfapi/font/cpdf_cidfont.h
index 7aeb54b877..5cbeeda7f5 100644
--- a/core/fpdfapi/font/cpdf_cidfont.h
+++ b/core/fpdfapi/font/cpdf_cidfont.h
@@ -62,7 +62,7 @@ class CPDF_CIDFont final : public CPDF_Font {
void GetVertOrigin(uint16_t CID, short& vx, short& vy) const;
int GetCharSize(uint32_t charcode) const;
- protected:
+ private:
void LoadGB2312();
int GetGlyphIndex(uint32_t unicodeb, bool* pVertGlyph);
int GetVerticalGlyph(int index, bool* pVertGlyph);
diff --git a/core/fpdfapi/font/cpdf_truetypefont.h b/core/fpdfapi/font/cpdf_truetypefont.h
index a3066d74fa..158a5df85c 100644
--- a/core/fpdfapi/font/cpdf_truetypefont.h
+++ b/core/fpdfapi/font/cpdf_truetypefont.h
@@ -20,7 +20,7 @@ class CPDF_TrueTypeFont final : public CPDF_SimpleFont {
const CPDF_TrueTypeFont* AsTrueTypeFont() const override;
CPDF_TrueTypeFont* AsTrueTypeFont() override;
- protected:
+ private:
// CPDF_Font:
bool Load() override;
diff --git a/core/fpdfapi/font/cpdf_type3font.h b/core/fpdfapi/font/cpdf_type3font.h
index d85bf701df..fb32323642 100644
--- a/core/fpdfapi/font/cpdf_type3font.h
+++ b/core/fpdfapi/font/cpdf_type3font.h
@@ -37,9 +37,6 @@ class CPDF_Type3Font final : public CPDF_SimpleFont {
CFX_Matrix& GetFontMatrix() { return m_FontMatrix; }
- protected:
- CFX_Matrix m_FontMatrix;
-
private:
// CPDF_Font:
bool Load() override;
@@ -47,6 +44,7 @@ class CPDF_Type3Font final : public CPDF_SimpleFont {
// CPDF_SimpleFont:
void LoadGlyphMap() override;
+ CFX_Matrix m_FontMatrix;
uint32_t m_CharWidthL[256];
UnownedPtr<CPDF_Dictionary> m_pCharProcs;
UnownedPtr<CPDF_Dictionary> m_pPageResources;
diff --git a/core/fpdfapi/parser/cfdf_document.h b/core/fpdfapi/parser/cfdf_document.h
index 6ab751e4dd..7298f4e1c5 100644
--- a/core/fpdfapi/parser/cfdf_document.h
+++ b/core/fpdfapi/parser/cfdf_document.h
@@ -29,7 +29,7 @@ class CFDF_Document final : public CPDF_IndirectObjectHolder {
ByteString WriteToString() const;
CPDF_Dictionary* GetRoot() const { return m_pRootDict.Get(); }
- protected:
+ private:
void ParseStream(const RetainPtr<IFX_SeekableReadStream>& pFile);
UnownedPtr<CPDF_Dictionary> m_pRootDict;
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 0c9251ca23..c4686c08e1 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -112,7 +112,7 @@ class CPDF_Array final : public CPDF_Object {
const_iterator begin() const { return m_Objects.begin(); }
const_iterator end() const { return m_Objects.end(); }
- protected:
+ private:
std::unique_ptr<CPDF_Object> CloneNonCyclic(
bool bDirect,
std::set<const CPDF_Object*>* pVisited) const override;
diff --git a/core/fpdfapi/parser/cpdf_boolean.h b/core/fpdfapi/parser/cpdf_boolean.h
index 406381b1b9..5aa63afd4c 100644
--- a/core/fpdfapi/parser/cpdf_boolean.h
+++ b/core/fpdfapi/parser/cpdf_boolean.h
@@ -31,7 +31,7 @@ class CPDF_Boolean final : public CPDF_Object {
bool WriteTo(IFX_ArchiveStream* archive,
const CPDF_Encryptor* encryptor) const override;
- protected:
+ private:
bool m_bValue;
};
diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h
index 100e2ae296..4dff3ce0c9 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.h
+++ b/core/fpdfapi/parser/cpdf_data_avail.h
@@ -112,7 +112,7 @@ class CPDF_DataAvail final : public CPDF_Document::Observer {
const CPDF_HintTables* GetHintTables() const { return m_pHintTables.get(); }
- protected:
+ private:
class PageNode {
public:
PageNode();
@@ -184,7 +184,6 @@ class CPDF_DataAvail final : public CPDF_Document::Observer {
bool m_bPagesLoad = false;
std::unique_ptr<CPDF_PageObjectAvail> m_pFormAvail;
std::vector<std::unique_ptr<CPDF_Object>> m_PagesArray;
- uint32_t m_dwEncryptObjNum = 0;
bool m_bTotalLoadPageTree = false;
bool m_bCurPageDictLoadOK = false;
PageNode m_PageNode;
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index 4930e5e2e3..1876a610a2 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -106,7 +106,7 @@ class CPDF_Dictionary final : public CPDF_Object {
WeakPtr<ByteStringPool> GetByteStringPool() const { return m_pPool; }
- protected:
+ private:
ByteString MaybeIntern(const ByteString& str);
std::unique_ptr<CPDF_Object> CloneNonCyclic(
bool bDirect,
diff --git a/core/fpdfapi/parser/cpdf_name.h b/core/fpdfapi/parser/cpdf_name.h
index 1ef6c64c59..ee5a6ce9c8 100644
--- a/core/fpdfapi/parser/cpdf_name.h
+++ b/core/fpdfapi/parser/cpdf_name.h
@@ -30,7 +30,7 @@ class CPDF_Name final : public CPDF_Object {
bool WriteTo(IFX_ArchiveStream* archive,
const CPDF_Encryptor* encryptor) const override;
- protected:
+ private:
ByteString m_Name;
};
diff --git a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
index e2b23d44f4..7dc1dcc050 100644
--- a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
@@ -27,7 +27,7 @@ class TestReadValidator final : public CPDF_ReadValidator {
void SimulateReadError() { ReadBlock(nullptr, 0, 1); }
- protected:
+ private:
TestReadValidator()
: CPDF_ReadValidator(
pdfium::MakeRetain<CFX_InvalidSeekableReadStream>(100),
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail.h b/core/fpdfapi/parser/cpdf_page_object_avail.h
index b62ca4c33a..bb9e80a669 100644
--- a/core/fpdfapi/parser/cpdf_page_object_avail.h
+++ b/core/fpdfapi/parser/cpdf_page_object_avail.h
@@ -14,7 +14,7 @@ class CPDF_PageObjectAvail final : public CPDF_ObjectAvail {
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_PageObjectAvail() override;
- protected:
+ private:
bool ExcludeObject(const CPDF_Object* object) const override;
};
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
index f278b6e57c..57ab09c219 100644
--- a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
@@ -28,7 +28,7 @@ class TestReadValidator final : public CPDF_ReadValidator {
void SimulateReadError() { ReadBlock(nullptr, 0, 1); }
- protected:
+ private:
TestReadValidator()
: CPDF_ReadValidator(
pdfium::MakeRetain<CFX_InvalidSeekableReadStream>(100),
diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h
index cb9c6ed1d4..f7b03ac721 100644
--- a/core/fpdfapi/parser/cpdf_reference.h
+++ b/core/fpdfapi/parser/cpdf_reference.h
@@ -42,7 +42,7 @@ class CPDF_Reference final : public CPDF_Object {
uint32_t GetRefObjNum() const { return m_RefObjNum; }
void SetRef(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
- protected:
+ private:
std::unique_ptr<CPDF_Object> CloneNonCyclic(
bool bDirect,
std::set<const CPDF_Object*>* pVisited) const override;
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h
index 9d8cf6d896..aada80e35c 100644
--- a/core/fpdfapi/parser/cpdf_stream.h
+++ b/core/fpdfapi/parser/cpdf_stream.h
@@ -62,7 +62,7 @@ class CPDF_Stream final : public CPDF_Object {
bool IsMemoryBased() const { return m_bMemoryBased; }
bool HasFilter() const;
- protected:
+ private:
std::unique_ptr<CPDF_Object> CloneNonCyclic(
bool bDirect,
std::set<const CPDF_Object*>* pVisited) const override;
diff --git a/core/fpdfapi/parser/cpdf_stream_acc.h b/core/fpdfapi/parser/cpdf_stream_acc.h
index 3c42639828..ddbdc6ae0f 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc.h
+++ b/core/fpdfapi/parser/cpdf_stream_acc.h
@@ -41,13 +41,12 @@ class CPDF_StreamAcc final : public Retainable {
const CPDF_Dictionary* GetImageParam() const { return m_pImageParam.Get(); }
std::unique_ptr<uint8_t, FxFreeDeleter> DetachData();
- protected:
+ private:
explicit CPDF_StreamAcc(const CPDF_Stream* pStream);
~CPDF_StreamAcc() override;
void LoadAllData(bool bRawAccess, uint32_t estimated_size, bool bImageAcc);
- private:
uint8_t* m_pData = nullptr;
uint32_t m_dwSize = 0;
bool m_bNewBuf = false;
diff --git a/core/fpdfapi/parser/cpdf_string.h b/core/fpdfapi/parser/cpdf_string.h
index 75cc3c4fe1..d3fc2c5911 100644
--- a/core/fpdfapi/parser/cpdf_string.h
+++ b/core/fpdfapi/parser/cpdf_string.h
@@ -36,7 +36,7 @@ class CPDF_String final : public CPDF_Object {
bool IsHex() const { return m_bHex; }
- protected:
+ private:
ByteString m_String;
bool m_bHex;
};