summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/edit/cpdf_creator.cpp2
-rw-r--r--core/fpdfapi/edit/cpdf_creator_embeddertest.cpp2
-rw-r--r--core/fpdfapi/edit/cpdf_stringarchivestream.h2
-rw-r--r--core/fpdfapi/font/cfx_cttgsubtable.h8
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.h2
-rw-r--r--core/fpdfapi/font/cpdf_cmap.h2
-rw-r--r--core/fpdfapi/font/cpdf_truetypefont.h2
-rw-r--r--core/fpdfapi/font/cpdf_type1font.h2
-rw-r--r--core/fpdfapi/font/cpdf_type3font.h2
-rw-r--r--core/fpdfapi/page/cpdf_allstates.h2
-rw-r--r--core/fpdfapi/page/cpdf_clippath.h2
-rw-r--r--core/fpdfapi/page/cpdf_colorspace.cpp14
-rw-r--r--core/fpdfapi/page/cpdf_colorstate.h2
-rw-r--r--core/fpdfapi/page/cpdf_contentmark.h2
-rw-r--r--core/fpdfapi/page/cpdf_contentmarkitem.h2
-rw-r--r--core/fpdfapi/page/cpdf_devicecs.h2
-rw-r--r--core/fpdfapi/page/cpdf_expintfunc.h2
-rw-r--r--core/fpdfapi/page/cpdf_form.h2
-rw-r--r--core/fpdfapi/page/cpdf_formobject.h2
-rw-r--r--core/fpdfapi/page/cpdf_generalstate.h2
-rw-r--r--core/fpdfapi/page/cpdf_iccprofile.h2
-rw-r--r--core/fpdfapi/page/cpdf_image.h2
-rw-r--r--core/fpdfapi/page/cpdf_imageobject.h2
-rw-r--r--core/fpdfapi/page/cpdf_page.h2
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectlist.h2
-rw-r--r--core/fpdfapi/page/cpdf_pathobject.h2
-rw-r--r--core/fpdfapi/page/cpdf_patterncs.h2
-rw-r--r--core/fpdfapi/page/cpdf_psfunc.h2
-rw-r--r--core/fpdfapi/page/cpdf_sampledfunc.h2
-rw-r--r--core/fpdfapi/page/cpdf_shadingobject.h2
-rw-r--r--core/fpdfapi/page/cpdf_shadingpattern.h2
-rw-r--r--core/fpdfapi/page/cpdf_stitchfunc.h2
-rw-r--r--core/fpdfapi/page/cpdf_textobject.h2
-rw-r--r--core/fpdfapi/page/cpdf_textstate.h2
-rw-r--r--core/fpdfapi/page/cpdf_tilingpattern.h2
-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_dictionary.h2
-rw-r--r--core/fpdfapi/parser/cpdf_document_unittest.cpp10
-rw-r--r--core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_name.h2
-rw-r--r--core/fpdfapi/parser/cpdf_null.h2
-rw-r--r--core/fpdfapi/parser/cpdf_number.h2
-rw-r--r--core/fpdfapi/parser/cpdf_object_avail_unittest.cpp10
-rw-r--r--core/fpdfapi/parser/cpdf_object_walker.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_object_walker.h2
-rw-r--r--core/fpdfapi/parser/cpdf_page_object_avail.h2
-rw-r--r--core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp5
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_parser_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_read_validator_unittest.cpp4
-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.h2
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_string.h2
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_dibbase.h2
-rw-r--r--core/fpdfapi/render/cpdf_dibtransferfunc.h2
-rw-r--r--core/fpdfapi/render/cpdf_transferfunc.h2
-rw-r--r--core/fpdfapi/render/cpdf_type3cache.h2
63 files changed, 84 insertions, 85 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index 11b0628b01..7af62806da 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -28,7 +28,7 @@ namespace {
const size_t kArchiveBufferSize = 32768;
-class CFX_FileBufferArchive : public IFX_ArchiveStream {
+class CFX_FileBufferArchive final : public IFX_ArchiveStream {
public:
explicit CFX_FileBufferArchive(const RetainPtr<IFX_WriteStream>& archive);
~CFX_FileBufferArchive() override;
diff --git a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
index 2d431b8424..1f8f788d34 100644
--- a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
+++ b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
@@ -20,7 +20,7 @@
namespace {
-class FileAccess : public FPDF_FILEACCESS {
+class FileAccess final : public FPDF_FILEACCESS {
public:
explicit FileAccess(const std::string& file_name) {
std::string file_path;
diff --git a/core/fpdfapi/edit/cpdf_stringarchivestream.h b/core/fpdfapi/edit/cpdf_stringarchivestream.h
index bb5481e376..aa744a9ea1 100644
--- a/core/fpdfapi/edit/cpdf_stringarchivestream.h
+++ b/core/fpdfapi/edit/cpdf_stringarchivestream.h
@@ -7,7 +7,7 @@
#include "core/fxcrt/fx_stream.h"
-class CPDF_StringArchiveStream : public IFX_ArchiveStream {
+class CPDF_StringArchiveStream final : public IFX_ArchiveStream {
public:
explicit CPDF_StringArchiveStream(std::ostringstream* stream);
~CPDF_StringArchiveStream() override;
diff --git a/core/fpdfapi/font/cfx_cttgsubtable.h b/core/fpdfapi/font/cfx_cttgsubtable.h
index ff488a5ed7..6b23a8db27 100644
--- a/core/fpdfapi/font/cfx_cttgsubtable.h
+++ b/core/fpdfapi/font/cfx_cttgsubtable.h
@@ -64,14 +64,14 @@ class CFX_CTTGSUBTable {
uint16_t CoverageFormat;
};
- struct TCoverageFormat1 : public TCoverageFormatBase {
+ struct TCoverageFormat1 final : public TCoverageFormatBase {
TCoverageFormat1();
~TCoverageFormat1() override;
std::vector<uint16_t> GlyphArray;
};
- struct TCoverageFormat2 : public TCoverageFormatBase {
+ struct TCoverageFormat2 final : public TCoverageFormatBase {
TCoverageFormat2();
~TCoverageFormat2() override;
@@ -94,14 +94,14 @@ class CFX_CTTGSUBTable {
uint16_t SubstFormat;
};
- struct TSubTable1 : public TSubTableBase {
+ struct TSubTable1 final : public TSubTableBase {
TSubTable1();
~TSubTable1() override;
int16_t DeltaGlyphID;
};
- struct TSubTable2 : public TSubTableBase {
+ struct TSubTable2 final : public TSubTableBase {
TSubTable2();
~TSubTable2() override;
diff --git a/core/fpdfapi/font/cpdf_cidfont.h b/core/fpdfapi/font/cpdf_cidfont.h
index 9dde95d75e..7aeb54b877 100644
--- a/core/fpdfapi/font/cpdf_cidfont.h
+++ b/core/fpdfapi/font/cpdf_cidfont.h
@@ -32,7 +32,7 @@ class CPDF_CID2UnicodeMap;
class CPDF_CMap;
class CPDF_StreamAcc;
-class CPDF_CIDFont : public CPDF_Font {
+class CPDF_CIDFont final : public CPDF_Font {
public:
CPDF_CIDFont(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict);
~CPDF_CIDFont() override;
diff --git a/core/fpdfapi/font/cpdf_cmap.h b/core/fpdfapi/font/cpdf_cmap.h
index 45053bdfb5..228c207876 100644
--- a/core/fpdfapi/font/cpdf_cmap.h
+++ b/core/fpdfapi/font/cpdf_cmap.h
@@ -27,7 +27,7 @@ enum CIDCoding : uint8_t {
CIDCODING_UTF16,
};
-class CPDF_CMap : public Retainable {
+class CPDF_CMap final : public Retainable {
public:
enum CodingScheme : uint8_t {
OneByte,
diff --git a/core/fpdfapi/font/cpdf_truetypefont.h b/core/fpdfapi/font/cpdf_truetypefont.h
index d63e8f105a..a3066d74fa 100644
--- a/core/fpdfapi/font/cpdf_truetypefont.h
+++ b/core/fpdfapi/font/cpdf_truetypefont.h
@@ -10,7 +10,7 @@
#include "core/fpdfapi/font/cpdf_simplefont.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_TrueTypeFont : public CPDF_SimpleFont {
+class CPDF_TrueTypeFont final : public CPDF_SimpleFont {
public:
CPDF_TrueTypeFont(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict);
~CPDF_TrueTypeFont() override;
diff --git a/core/fpdfapi/font/cpdf_type1font.h b/core/fpdfapi/font/cpdf_type1font.h
index cbcb9af3b1..0fdfa807d3 100644
--- a/core/fpdfapi/font/cpdf_type1font.h
+++ b/core/fpdfapi/font/cpdf_type1font.h
@@ -10,7 +10,7 @@
#include "core/fpdfapi/font/cpdf_simplefont.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_Type1Font : public CPDF_SimpleFont {
+class CPDF_Type1Font final : public CPDF_SimpleFont {
public:
CPDF_Type1Font(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict);
~CPDF_Type1Font() override;
diff --git a/core/fpdfapi/font/cpdf_type3font.h b/core/fpdfapi/font/cpdf_type3font.h
index 0be1fa3f69..d85bf701df 100644
--- a/core/fpdfapi/font/cpdf_type3font.h
+++ b/core/fpdfapi/font/cpdf_type3font.h
@@ -17,7 +17,7 @@
class CPDF_Dictionary;
class CPDF_Type3Char;
-class CPDF_Type3Font : public CPDF_SimpleFont {
+class CPDF_Type3Font final : public CPDF_SimpleFont {
public:
CPDF_Type3Font(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict);
~CPDF_Type3Font() override;
diff --git a/core/fpdfapi/page/cpdf_allstates.h b/core/fpdfapi/page/cpdf_allstates.h
index 730003a96a..e388b9470f 100644
--- a/core/fpdfapi/page/cpdf_allstates.h
+++ b/core/fpdfapi/page/cpdf_allstates.h
@@ -15,7 +15,7 @@ class CPDF_Array;
class CPDF_Dictionary;
class CPDF_StreamContentParser;
-class CPDF_AllStates : public CPDF_GraphicStates {
+class CPDF_AllStates final : public CPDF_GraphicStates {
public:
CPDF_AllStates();
~CPDF_AllStates() override;
diff --git a/core/fpdfapi/page/cpdf_clippath.h b/core/fpdfapi/page/cpdf_clippath.h
index 91a25cda1a..c0b5ce5011 100644
--- a/core/fpdfapi/page/cpdf_clippath.h
+++ b/core/fpdfapi/page/cpdf_clippath.h
@@ -44,7 +44,7 @@ class CPDF_ClipPath {
void Transform(const CFX_Matrix& matrix);
private:
- class PathData : public Retainable {
+ class PathData final : public Retainable {
public:
using PathAndTypeData = std::pair<CPDF_Path, uint8_t>;
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp
index a3b88b05b8..882b5657d8 100644
--- a/core/fpdfapi/page/cpdf_colorspace.cpp
+++ b/core/fpdfapi/page/cpdf_colorspace.cpp
@@ -105,7 +105,7 @@ bool GetWhitePoint(const CPDF_Dictionary* pDict, float* pPoints) {
return pPoints[0] > 0.0f && pPoints[1] == 1.0f && pPoints[2] > 0.0f;
}
-class CPDF_CalGray : public CPDF_ColorSpace {
+class CPDF_CalGray final : public CPDF_ColorSpace {
public:
explicit CPDF_CalGray(CPDF_Document* pDoc);
~CPDF_CalGray() override {}
@@ -130,7 +130,7 @@ class CPDF_CalGray : public CPDF_ColorSpace {
float m_BlackPoint[kBlackWhitePointCount];
};
-class CPDF_CalRGB : public CPDF_ColorSpace {
+class CPDF_CalRGB final : public CPDF_ColorSpace {
public:
explicit CPDF_CalRGB(CPDF_Document* pDoc);
~CPDF_CalRGB() override {}
@@ -160,7 +160,7 @@ class CPDF_CalRGB : public CPDF_ColorSpace {
bool m_bMatrix = false;
};
-class CPDF_LabCS : public CPDF_ColorSpace {
+class CPDF_LabCS final : public CPDF_ColorSpace {
public:
explicit CPDF_LabCS(CPDF_Document* pDoc);
~CPDF_LabCS() override {}
@@ -190,7 +190,7 @@ class CPDF_LabCS : public CPDF_ColorSpace {
float m_Ranges[kRangesCount];
};
-class CPDF_ICCBasedCS : public CPDF_ColorSpace {
+class CPDF_ICCBasedCS final : public CPDF_ColorSpace {
public:
explicit CPDF_ICCBasedCS(CPDF_Document* pDoc);
~CPDF_ICCBasedCS() override;
@@ -226,7 +226,7 @@ class CPDF_ICCBasedCS : public CPDF_ColorSpace {
std::vector<float> m_pRanges;
};
-class CPDF_IndexedCS : public CPDF_ColorSpace {
+class CPDF_IndexedCS final : public CPDF_ColorSpace {
public:
explicit CPDF_IndexedCS(CPDF_Document* pDoc);
~CPDF_IndexedCS() override;
@@ -248,7 +248,7 @@ class CPDF_IndexedCS : public CPDF_ColorSpace {
std::vector<float> m_pCompMinMax;
};
-class CPDF_SeparationCS : public CPDF_ColorSpace {
+class CPDF_SeparationCS final : public CPDF_ColorSpace {
public:
explicit CPDF_SeparationCS(CPDF_Document* pDoc);
~CPDF_SeparationCS() override;
@@ -270,7 +270,7 @@ class CPDF_SeparationCS : public CPDF_ColorSpace {
enum { None, All, Colorant } m_Type;
};
-class CPDF_DeviceNCS : public CPDF_ColorSpace {
+class CPDF_DeviceNCS final : public CPDF_ColorSpace {
public:
explicit CPDF_DeviceNCS(CPDF_Document* pDoc);
~CPDF_DeviceNCS() override;
diff --git a/core/fpdfapi/page/cpdf_colorstate.h b/core/fpdfapi/page/cpdf_colorstate.h
index 49416db1d5..7b72a2a9d2 100644
--- a/core/fpdfapi/page/cpdf_colorstate.h
+++ b/core/fpdfapi/page/cpdf_colorstate.h
@@ -50,7 +50,7 @@ class CPDF_ColorState {
bool HasRef() const { return !!m_Ref; }
private:
- class ColorData : public Retainable {
+ class ColorData final : public Retainable {
public:
ColorData();
ColorData(const ColorData& src);
diff --git a/core/fpdfapi/page/cpdf_contentmark.h b/core/fpdfapi/page/cpdf_contentmark.h
index dc4cc08838..1395db12f8 100644
--- a/core/fpdfapi/page/cpdf_contentmark.h
+++ b/core/fpdfapi/page/cpdf_contentmark.h
@@ -40,7 +40,7 @@ class CPDF_ContentMark {
size_t FindFirstDifference(const CPDF_ContentMark* other) const;
private:
- class MarkData : public Retainable {
+ class MarkData final : public Retainable {
public:
MarkData();
MarkData(const MarkData& src);
diff --git a/core/fpdfapi/page/cpdf_contentmarkitem.h b/core/fpdfapi/page/cpdf_contentmarkitem.h
index 435aef4b10..a0a92dbc3c 100644
--- a/core/fpdfapi/page/cpdf_contentmarkitem.h
+++ b/core/fpdfapi/page/cpdf_contentmarkitem.h
@@ -17,7 +17,7 @@
class CPDF_Dictionary;
-class CPDF_ContentMarkItem : public Retainable {
+class CPDF_ContentMarkItem final : public Retainable {
public:
enum ParamType { None, PropertiesDict, DirectDict };
diff --git a/core/fpdfapi/page/cpdf_devicecs.h b/core/fpdfapi/page/cpdf_devicecs.h
index bf668c359b..ab88d74c93 100644
--- a/core/fpdfapi/page/cpdf_devicecs.h
+++ b/core/fpdfapi/page/cpdf_devicecs.h
@@ -11,7 +11,7 @@
#include "core/fpdfapi/page/cpdf_colorspace.h"
-class CPDF_DeviceCS : public CPDF_ColorSpace {
+class CPDF_DeviceCS final : public CPDF_ColorSpace {
public:
explicit CPDF_DeviceCS(int family);
~CPDF_DeviceCS() override;
diff --git a/core/fpdfapi/page/cpdf_expintfunc.h b/core/fpdfapi/page/cpdf_expintfunc.h
index c93cc86cff..95bdab68e2 100644
--- a/core/fpdfapi/page/cpdf_expintfunc.h
+++ b/core/fpdfapi/page/cpdf_expintfunc.h
@@ -12,7 +12,7 @@
#include "core/fpdfapi/page/cpdf_function.h"
-class CPDF_ExpIntFunc : public CPDF_Function {
+class CPDF_ExpIntFunc final : public CPDF_Function {
public:
CPDF_ExpIntFunc();
~CPDF_ExpIntFunc() override;
diff --git a/core/fpdfapi/page/cpdf_form.h b/core/fpdfapi/page/cpdf_form.h
index 63cc4a96c1..abb5c40a46 100644
--- a/core/fpdfapi/page/cpdf_form.h
+++ b/core/fpdfapi/page/cpdf_form.h
@@ -19,7 +19,7 @@ class CPDF_AllStates;
class CFX_Matrix;
class CPDF_Type3Char;
-class CPDF_Form : public CPDF_PageObjectHolder {
+class CPDF_Form final : public CPDF_PageObjectHolder {
public:
CPDF_Form(CPDF_Document* pDocument,
CPDF_Dictionary* pPageResources,
diff --git a/core/fpdfapi/page/cpdf_formobject.h b/core/fpdfapi/page/cpdf_formobject.h
index b229dce444..dc53c454c4 100644
--- a/core/fpdfapi/page/cpdf_formobject.h
+++ b/core/fpdfapi/page/cpdf_formobject.h
@@ -14,7 +14,7 @@
class CPDF_Form;
-class CPDF_FormObject : public CPDF_PageObject {
+class CPDF_FormObject final : public CPDF_PageObject {
public:
CPDF_FormObject(int32_t content_stream,
std::unique_ptr<CPDF_Form> pForm,
diff --git a/core/fpdfapi/page/cpdf_generalstate.h b/core/fpdfapi/page/cpdf_generalstate.h
index 4a101b99de..9ee20db8a5 100644
--- a/core/fpdfapi/page/cpdf_generalstate.h
+++ b/core/fpdfapi/page/cpdf_generalstate.h
@@ -77,7 +77,7 @@ class CPDF_GeneralState {
CFX_Matrix* GetMutableMatrix();
private:
- class StateData : public Retainable {
+ class StateData final : public Retainable {
public:
StateData();
StateData(const StateData& that);
diff --git a/core/fpdfapi/page/cpdf_iccprofile.h b/core/fpdfapi/page/cpdf_iccprofile.h
index a9e11700f1..0f13b0be21 100644
--- a/core/fpdfapi/page/cpdf_iccprofile.h
+++ b/core/fpdfapi/page/cpdf_iccprofile.h
@@ -16,7 +16,7 @@
class CLcmsCmm;
class CPDF_Stream;
-class CPDF_IccProfile : public Retainable {
+class CPDF_IccProfile final : public Retainable {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
diff --git a/core/fpdfapi/page/cpdf_image.h b/core/fpdfapi/page/cpdf_image.h
index 4306109199..1be9b4d47f 100644
--- a/core/fpdfapi/page/cpdf_image.h
+++ b/core/fpdfapi/page/cpdf_image.h
@@ -22,7 +22,7 @@ class CPDF_Page;
class PauseIndicatorIface;
class IFX_SeekableReadStream;
-class CPDF_Image : public Retainable {
+class CPDF_Image final : public Retainable {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
diff --git a/core/fpdfapi/page/cpdf_imageobject.h b/core/fpdfapi/page/cpdf_imageobject.h
index d54ef8d818..2e01598b8a 100644
--- a/core/fpdfapi/page/cpdf_imageobject.h
+++ b/core/fpdfapi/page/cpdf_imageobject.h
@@ -14,7 +14,7 @@
class CPDF_Image;
-class CPDF_ImageObject : public CPDF_PageObject {
+class CPDF_ImageObject final : public CPDF_PageObject {
public:
explicit CPDF_ImageObject(int32_t content_stream);
CPDF_ImageObject();
diff --git a/core/fpdfapi/page/cpdf_page.h b/core/fpdfapi/page/cpdf_page.h
index 44bb6d8798..b641253f84 100644
--- a/core/fpdfapi/page/cpdf_page.h
+++ b/core/fpdfapi/page/cpdf_page.h
@@ -23,7 +23,7 @@ class CPDF_Object;
class CPDF_PageRenderCache;
class CPDF_PageRenderContext;
-class CPDF_Page : public IPDF_Page, public CPDF_PageObjectHolder {
+class CPDF_Page final : public IPDF_Page, public CPDF_PageObjectHolder {
public:
class View {}; // Caller implements as desired, empty here due to layering.
diff --git a/core/fpdfapi/page/cpdf_pageobjectlist.h b/core/fpdfapi/page/cpdf_pageobjectlist.h
index 77c7d811e1..1b4bf8f75c 100644
--- a/core/fpdfapi/page/cpdf_pageobjectlist.h
+++ b/core/fpdfapi/page/cpdf_pageobjectlist.h
@@ -12,7 +12,7 @@
class CPDF_PageObject;
-class CPDF_PageObjectList
+class CPDF_PageObjectList final
: public std::deque<std::unique_ptr<CPDF_PageObject>> {
public:
CPDF_PageObject* GetPageObjectByIndex(int index) const;
diff --git a/core/fpdfapi/page/cpdf_pathobject.h b/core/fpdfapi/page/cpdf_pathobject.h
index 5155c40c3d..0a1e4d01f9 100644
--- a/core/fpdfapi/page/cpdf_pathobject.h
+++ b/core/fpdfapi/page/cpdf_pathobject.h
@@ -12,7 +12,7 @@
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_PathObject : public CPDF_PageObject {
+class CPDF_PathObject final : public CPDF_PageObject {
public:
explicit CPDF_PathObject(int32_t content_stream);
CPDF_PathObject();
diff --git a/core/fpdfapi/page/cpdf_patterncs.h b/core/fpdfapi/page/cpdf_patterncs.h
index 23735fd8f2..5de9875dbf 100644
--- a/core/fpdfapi/page/cpdf_patterncs.h
+++ b/core/fpdfapi/page/cpdf_patterncs.h
@@ -13,7 +13,7 @@
class CPDF_Document;
-class CPDF_PatternCS : public CPDF_ColorSpace {
+class CPDF_PatternCS final : public CPDF_ColorSpace {
public:
explicit CPDF_PatternCS(CPDF_Document* pDoc);
~CPDF_PatternCS() override;
diff --git a/core/fpdfapi/page/cpdf_psfunc.h b/core/fpdfapi/page/cpdf_psfunc.h
index 1274c21d50..b81c2e7acd 100644
--- a/core/fpdfapi/page/cpdf_psfunc.h
+++ b/core/fpdfapi/page/cpdf_psfunc.h
@@ -14,7 +14,7 @@
class CPDF_Object;
-class CPDF_PSFunc : public CPDF_Function {
+class CPDF_PSFunc final : public CPDF_Function {
public:
CPDF_PSFunc();
~CPDF_PSFunc() override;
diff --git a/core/fpdfapi/page/cpdf_sampledfunc.h b/core/fpdfapi/page/cpdf_sampledfunc.h
index bd129662cf..579fdcea09 100644
--- a/core/fpdfapi/page/cpdf_sampledfunc.h
+++ b/core/fpdfapi/page/cpdf_sampledfunc.h
@@ -14,7 +14,7 @@
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fxcrt/retain_ptr.h"
-class CPDF_SampledFunc : public CPDF_Function {
+class CPDF_SampledFunc final : public CPDF_Function {
public:
struct SampleEncodeInfo {
float encode_max;
diff --git a/core/fpdfapi/page/cpdf_shadingobject.h b/core/fpdfapi/page/cpdf_shadingobject.h
index af88128443..c246870469 100644
--- a/core/fpdfapi/page/cpdf_shadingobject.h
+++ b/core/fpdfapi/page/cpdf_shadingobject.h
@@ -13,7 +13,7 @@
class CPDF_ShadingPattern;
-class CPDF_ShadingObject : public CPDF_PageObject {
+class CPDF_ShadingObject final : public CPDF_PageObject {
public:
CPDF_ShadingObject(int32_t content_stream,
CPDF_ShadingPattern* pattern,
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.h b/core/fpdfapi/page/cpdf_shadingpattern.h
index d7aa1cb272..dbf80874b6 100644
--- a/core/fpdfapi/page/cpdf_shadingpattern.h
+++ b/core/fpdfapi/page/cpdf_shadingpattern.h
@@ -33,7 +33,7 @@ class CPDF_Document;
class CPDF_Function;
class CPDF_Object;
-class CPDF_ShadingPattern : public CPDF_Pattern {
+class CPDF_ShadingPattern final : public CPDF_Pattern {
public:
CPDF_ShadingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
diff --git a/core/fpdfapi/page/cpdf_stitchfunc.h b/core/fpdfapi/page/cpdf_stitchfunc.h
index 20dac6cbc1..022bd4ee6d 100644
--- a/core/fpdfapi/page/cpdf_stitchfunc.h
+++ b/core/fpdfapi/page/cpdf_stitchfunc.h
@@ -13,7 +13,7 @@
#include "core/fpdfapi/page/cpdf_function.h"
-class CPDF_StitchFunc : public CPDF_Function {
+class CPDF_StitchFunc final : public CPDF_Function {
public:
CPDF_StitchFunc();
~CPDF_StitchFunc() override;
diff --git a/core/fpdfapi/page/cpdf_textobject.h b/core/fpdfapi/page/cpdf_textobject.h
index ac17c6df68..9ed5ff7ff0 100644
--- a/core/fpdfapi/page/cpdf_textobject.h
+++ b/core/fpdfapi/page/cpdf_textobject.h
@@ -23,7 +23,7 @@ class CPDF_TextObjectItem {
CFX_PointF m_Origin;
};
-class CPDF_TextObject : public CPDF_PageObject {
+class CPDF_TextObject final : public CPDF_PageObject {
public:
explicit CPDF_TextObject(int32_t content_stream);
CPDF_TextObject();
diff --git a/core/fpdfapi/page/cpdf_textstate.h b/core/fpdfapi/page/cpdf_textstate.h
index aa128072b6..c1c3ba8015 100644
--- a/core/fpdfapi/page/cpdf_textstate.h
+++ b/core/fpdfapi/page/cpdf_textstate.h
@@ -59,7 +59,7 @@ class CPDF_TextState {
float* GetMutableCTM();
private:
- class TextData : public Retainable {
+ class TextData final : public Retainable {
public:
TextData();
TextData(const TextData& src);
diff --git a/core/fpdfapi/page/cpdf_tilingpattern.h b/core/fpdfapi/page/cpdf_tilingpattern.h
index d9450d7c2f..c79708d635 100644
--- a/core/fpdfapi/page/cpdf_tilingpattern.h
+++ b/core/fpdfapi/page/cpdf_tilingpattern.h
@@ -17,7 +17,7 @@ class CPDF_Document;
class CPDF_Form;
class CPDF_Object;
-class CPDF_TilingPattern : public CPDF_Pattern {
+class CPDF_TilingPattern final : public CPDF_Pattern {
public:
CPDF_TilingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
diff --git a/core/fpdfapi/parser/cfdf_document.h b/core/fpdfapi/parser/cfdf_document.h
index 6efaa4ce06..6ab751e4dd 100644
--- a/core/fpdfapi/parser/cfdf_document.h
+++ b/core/fpdfapi/parser/cfdf_document.h
@@ -17,7 +17,7 @@
class CPDF_Dictionary;
class IFX_SeekableReadStream;
-class CFDF_Document : public CPDF_IndirectObjectHolder {
+class CFDF_Document final : public CPDF_IndirectObjectHolder {
public:
static std::unique_ptr<CFDF_Document> CreateNewDoc();
static std::unique_ptr<CFDF_Document> ParseMemory(
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 1e63983d51..0c9251ca23 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -18,7 +18,7 @@
#include "core/fxcrt/fx_coordinates.h"
#include "third_party/base/ptr_util.h"
-class CPDF_Array : public CPDF_Object {
+class CPDF_Array final : public CPDF_Object {
public:
using const_iterator =
std::vector<std::unique_ptr<CPDF_Object>>::const_iterator;
diff --git a/core/fpdfapi/parser/cpdf_boolean.h b/core/fpdfapi/parser/cpdf_boolean.h
index 61c213bdb9..406381b1b9 100644
--- a/core/fpdfapi/parser/cpdf_boolean.h
+++ b/core/fpdfapi/parser/cpdf_boolean.h
@@ -13,7 +13,7 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_Boolean : public CPDF_Object {
+class CPDF_Boolean final : public CPDF_Object {
public:
CPDF_Boolean();
explicit CPDF_Boolean(bool value);
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index 5cd0e8be22..4930e5e2e3 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -21,7 +21,7 @@
class CPDF_IndirectObjectHolder;
-class CPDF_Dictionary : public CPDF_Object {
+class CPDF_Dictionary final : public CPDF_Object {
public:
using const_iterator =
std::map<ByteString, std::unique_ptr<CPDF_Object>>::const_iterator;
diff --git a/core/fpdfapi/parser/cpdf_document_unittest.cpp b/core/fpdfapi/parser/cpdf_document_unittest.cpp
index c64da6382a..daaab5de32 100644
--- a/core/fpdfapi/parser/cpdf_document_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_document_unittest.cpp
@@ -47,7 +47,7 @@ std::unique_ptr<CPDF_Dictionary> CreateNumberedPage(size_t number) {
return page;
}
-class CPDF_TestDocumentForPages : public CPDF_Document {
+class CPDF_TestDocumentForPages final : public CPDF_Document {
public:
CPDF_TestDocumentForPages() : CPDF_Document() {
// Set up test
@@ -99,7 +99,7 @@ class CPDF_TestDocumentForPages : public CPDF_Document {
}
};
-class CPDF_TestDocumentWithPageWithoutPageNum : public CPDF_Document {
+class CPDF_TestDocumentWithPageWithoutPageNum final : public CPDF_Document {
public:
CPDF_TestDocumentWithPageWithoutPageNum() : CPDF_Document() {
// Set up test
@@ -124,13 +124,13 @@ class CPDF_TestDocumentWithPageWithoutPageNum : public CPDF_Document {
const CPDF_Object* inlined_page_;
};
-class TestLinearized : public CPDF_LinearizedHeader {
+class TestLinearized final : public CPDF_LinearizedHeader {
public:
explicit TestLinearized(CPDF_Dictionary* dict)
: CPDF_LinearizedHeader(dict, 0) {}
};
-class CPDF_TestDocPagesWithoutKids : public CPDF_Document {
+class CPDF_TestDocPagesWithoutKids final : public CPDF_Document {
public:
CPDF_TestDocPagesWithoutKids() : CPDF_Document() {
CPDF_Dictionary* pagesDict = NewIndirect<CPDF_Dictionary>();
@@ -143,7 +143,7 @@ class CPDF_TestDocPagesWithoutKids : public CPDF_Document {
}
};
-class CPDF_TestDocumentAllowSetParser : public CPDF_Document {
+class CPDF_TestDocumentAllowSetParser final : public CPDF_Document {
public:
using CPDF_Document::SetParser;
};
diff --git a/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp b/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp
index c372d74a00..c3b05acbc4 100644
--- a/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp
@@ -40,7 +40,7 @@ std::unique_ptr<CPDF_DataAvail> MakeDataAvailFromFile(
nullptr, MakeValidatorFromFile(file_name), true);
}
-class TestLinearizedHeader : public CPDF_LinearizedHeader {
+class TestLinearizedHeader final : public CPDF_LinearizedHeader {
public:
TestLinearizedHeader(const CPDF_Dictionary* pDict,
FX_FILESIZE szLastXRefOffset)
diff --git a/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp b/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp
index 666264f50b..6f913ca01b 100644
--- a/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp
@@ -14,7 +14,7 @@
namespace {
-class MockIndirectObjectHolder : public CPDF_IndirectObjectHolder {
+class MockIndirectObjectHolder final : public CPDF_IndirectObjectHolder {
public:
MockIndirectObjectHolder() {}
~MockIndirectObjectHolder() override {}
diff --git a/core/fpdfapi/parser/cpdf_name.h b/core/fpdfapi/parser/cpdf_name.h
index eef6bca715..1ef6c64c59 100644
--- a/core/fpdfapi/parser/cpdf_name.h
+++ b/core/fpdfapi/parser/cpdf_name.h
@@ -13,7 +13,7 @@
#include "core/fxcrt/string_pool_template.h"
#include "core/fxcrt/weak_ptr.h"
-class CPDF_Name : public CPDF_Object {
+class CPDF_Name final : public CPDF_Object {
public:
CPDF_Name(WeakPtr<ByteStringPool> pPool, const ByteString& str);
~CPDF_Name() override;
diff --git a/core/fpdfapi/parser/cpdf_null.h b/core/fpdfapi/parser/cpdf_null.h
index 003ad2feee..c72d3b02d5 100644
--- a/core/fpdfapi/parser/cpdf_null.h
+++ b/core/fpdfapi/parser/cpdf_null.h
@@ -11,7 +11,7 @@
#include "core/fpdfapi/parser/cpdf_object.h"
-class CPDF_Null : public CPDF_Object {
+class CPDF_Null final : public CPDF_Object {
public:
CPDF_Null();
diff --git a/core/fpdfapi/parser/cpdf_number.h b/core/fpdfapi/parser/cpdf_number.h
index 4681bb216a..b5faf82bb2 100644
--- a/core/fpdfapi/parser/cpdf_number.h
+++ b/core/fpdfapi/parser/cpdf_number.h
@@ -13,7 +13,7 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_Number : public CPDF_Object {
+class CPDF_Number final : public CPDF_Object {
public:
CPDF_Number();
explicit CPDF_Number(int value);
diff --git a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
index 5c3da70530..e2b23d44f4 100644
--- a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
@@ -20,7 +20,7 @@
namespace {
-class TestReadValidator : public CPDF_ReadValidator {
+class TestReadValidator final : public CPDF_ReadValidator {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
@@ -35,7 +35,7 @@ class TestReadValidator : public CPDF_ReadValidator {
~TestReadValidator() override {}
};
-class TestHolder : public CPDF_IndirectObjectHolder {
+class TestHolder final : public CPDF_IndirectObjectHolder {
public:
enum class ObjectState {
Unavailable,
@@ -93,7 +93,7 @@ class TestHolder : public CPDF_IndirectObjectHolder {
RetainPtr<TestReadValidator> validator_;
};
-class CPDF_ObjectAvailFailOnExclude : public CPDF_ObjectAvail {
+class CPDF_ObjectAvailFailOnExclude final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_ObjectAvailFailOnExclude() override {}
@@ -103,7 +103,7 @@ class CPDF_ObjectAvailFailOnExclude : public CPDF_ObjectAvail {
}
};
-class CPDF_ObjectAvailExcludeArray : public CPDF_ObjectAvail {
+class CPDF_ObjectAvailExcludeArray final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_ObjectAvailExcludeArray() override {}
@@ -112,7 +112,7 @@ class CPDF_ObjectAvailExcludeArray : public CPDF_ObjectAvail {
}
};
-class CPDF_ObjectAvailExcludeTypeKey : public CPDF_ObjectAvail {
+class CPDF_ObjectAvailExcludeTypeKey final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_ObjectAvailExcludeTypeKey() override {}
diff --git a/core/fpdfapi/parser/cpdf_object_walker.cpp b/core/fpdfapi/parser/cpdf_object_walker.cpp
index 8424c0fc89..91638662c3 100644
--- a/core/fpdfapi/parser/cpdf_object_walker.cpp
+++ b/core/fpdfapi/parser/cpdf_object_walker.cpp
@@ -12,7 +12,7 @@
namespace {
-class StreamIterator : public CPDF_ObjectWalker::SubobjectIterator {
+class StreamIterator final : public CPDF_ObjectWalker::SubobjectIterator {
public:
explicit StreamIterator(const CPDF_Stream* stream)
: SubobjectIterator(stream) {}
@@ -33,7 +33,7 @@ class StreamIterator : public CPDF_ObjectWalker::SubobjectIterator {
bool is_finished_ = false;
};
-class DictionaryIterator : public CPDF_ObjectWalker::SubobjectIterator {
+class DictionaryIterator final : public CPDF_ObjectWalker::SubobjectIterator {
public:
explicit DictionaryIterator(const CPDF_Dictionary* dictionary)
: SubobjectIterator(dictionary) {}
@@ -64,7 +64,7 @@ class DictionaryIterator : public CPDF_ObjectWalker::SubobjectIterator {
ByteString dict_key_;
};
-class ArrayIterator : public CPDF_ObjectWalker::SubobjectIterator {
+class ArrayIterator final : public CPDF_ObjectWalker::SubobjectIterator {
public:
explicit ArrayIterator(const CPDF_Array* array) : SubobjectIterator(array) {}
diff --git a/core/fpdfapi/parser/cpdf_object_walker.h b/core/fpdfapi/parser/cpdf_object_walker.h
index 57506b9545..e0fd35de29 100644
--- a/core/fpdfapi/parser/cpdf_object_walker.h
+++ b/core/fpdfapi/parser/cpdf_object_walker.h
@@ -55,7 +55,7 @@ class CPDF_ObjectWalker {
std::stack<std::unique_ptr<SubobjectIterator>> stack_;
};
-class CPDF_NonConstObjectWalker : public CPDF_ObjectWalker {
+class CPDF_NonConstObjectWalker final : public CPDF_ObjectWalker {
public:
explicit CPDF_NonConstObjectWalker(CPDF_Object* root)
: CPDF_ObjectWalker(root) {}
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail.h b/core/fpdfapi/parser/cpdf_page_object_avail.h
index 8c740ed045..b62ca4c33a 100644
--- a/core/fpdfapi/parser/cpdf_page_object_avail.h
+++ b/core/fpdfapi/parser/cpdf_page_object_avail.h
@@ -9,7 +9,7 @@
// Helper for check availability of page's object tree.
// Exclude references to pages.
-class CPDF_PageObjectAvail : public CPDF_ObjectAvail {
+class CPDF_PageObjectAvail final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_PageObjectAvail() override;
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
index 14ba0e3273..f278b6e57c 100644
--- a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
@@ -21,8 +21,7 @@
namespace {
-
-class TestReadValidator : public CPDF_ReadValidator {
+class TestReadValidator final : public CPDF_ReadValidator {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
@@ -37,7 +36,7 @@ class TestReadValidator : public CPDF_ReadValidator {
~TestReadValidator() override {}
};
-class TestHolder : public CPDF_IndirectObjectHolder {
+class TestHolder final : public CPDF_IndirectObjectHolder {
public:
enum class ObjectState {
Unavailable,
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 029851570a..32629bc873 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -47,7 +47,7 @@ uint32_t GetVarInt(const uint8_t* p, int32_t n) {
return result;
}
-class ObjectsHolderStub : public CPDF_Parser::ParsedObjectsHolder {
+class ObjectsHolderStub final : public CPDF_Parser::ParsedObjectsHolder {
public:
ObjectsHolderStub() = default;
~ObjectsHolderStub() override = default;
diff --git a/core/fpdfapi/parser/cpdf_parser_unittest.cpp b/core/fpdfapi/parser/cpdf_parser_unittest.cpp
index 00f3770e87..28c907a101 100644
--- a/core/fpdfapi/parser/cpdf_parser_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_parser_unittest.cpp
@@ -29,7 +29,7 @@ CPDF_CrossRefTable::ObjectInfo GetObjInfo(const CPDF_Parser& parser,
} // namespace
// A wrapper class to help test member functions of CPDF_Parser.
-class CPDF_TestParser : public CPDF_Parser {
+class CPDF_TestParser final : public CPDF_Parser {
public:
CPDF_TestParser() {}
~CPDF_TestParser() {}
diff --git a/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp b/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp
index 640269884d..cf8b9b65a1 100644
--- a/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp
@@ -20,7 +20,7 @@ std::pair<FX_FILESIZE, FX_FILESIZE> MakeRange(uint32_t start, uint32_t end) {
return std::pair<FX_FILESIZE, FX_FILESIZE>(start, end);
}
-class MockFileAvail : public CPDF_DataAvail::FileAvail {
+class MockFileAvail final : public CPDF_DataAvail::FileAvail {
public:
MockFileAvail() : available_range_(0, 0) {}
~MockFileAvail() override {}
@@ -42,7 +42,7 @@ class MockFileAvail : public CPDF_DataAvail::FileAvail {
std::pair<FX_FILESIZE, FX_FILESIZE> available_range_;
};
-class MockDownloadHints : public CPDF_DataAvail::DownloadHints {
+class MockDownloadHints final : public CPDF_DataAvail::DownloadHints {
public:
MockDownloadHints() : last_requested_range_(0, 0) {}
~MockDownloadHints() override {}
diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h
index cdb5d5e674..cb9c6ed1d4 100644
--- a/core/fpdfapi/parser/cpdf_reference.h
+++ b/core/fpdfapi/parser/cpdf_reference.h
@@ -15,7 +15,7 @@
class CPDF_IndirectObjectHolder;
-class CPDF_Reference : public CPDF_Object {
+class CPDF_Reference final : public CPDF_Object {
public:
CPDF_Reference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
~CPDF_Reference() override;
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h
index 3deb9cddec..9d8cf6d896 100644
--- a/core/fpdfapi/parser/cpdf_stream.h
+++ b/core/fpdfapi/parser/cpdf_stream.h
@@ -15,7 +15,7 @@
#include "core/fpdfapi/parser/cpdf_object.h"
#include "core/fxcrt/fx_stream.h"
-class CPDF_Stream : public CPDF_Object {
+class CPDF_Stream final : public CPDF_Object {
public:
CPDF_Stream();
CPDF_Stream(std::unique_ptr<uint8_t, FxFreeDeleter> pData,
diff --git a/core/fpdfapi/parser/cpdf_stream_acc.h b/core/fpdfapi/parser/cpdf_stream_acc.h
index 5d18723df5..fae8ba0516 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc.h
+++ b/core/fpdfapi/parser/cpdf_stream_acc.h
@@ -16,7 +16,7 @@
#include "core/fxcrt/retain_ptr.h"
#include "third_party/base/span.h"
-class CPDF_StreamAcc : public Retainable {
+class CPDF_StreamAcc final : public Retainable {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
diff --git a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
index dcebf0b3a7..1fbb342548 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
@@ -12,7 +12,7 @@
namespace {
-class InvalidStream : public IFX_SeekableReadStream {
+class InvalidStream final : public IFX_SeekableReadStream {
public:
InvalidStream() = default;
~InvalidStream() override = default;
diff --git a/core/fpdfapi/parser/cpdf_string.h b/core/fpdfapi/parser/cpdf_string.h
index 144fe64cba..75cc3c4fe1 100644
--- a/core/fpdfapi/parser/cpdf_string.h
+++ b/core/fpdfapi/parser/cpdf_string.h
@@ -15,7 +15,7 @@
#include "core/fxcrt/string_pool_template.h"
#include "core/fxcrt/weak_ptr.h"
-class CPDF_String : public CPDF_Object {
+class CPDF_String final : public CPDF_Object {
public:
CPDF_String();
CPDF_String(WeakPtr<ByteStringPool> pPool, const ByteString& str, bool bHex);
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 65a8d78b13..bba96d9b34 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -34,7 +34,7 @@ namespace {
enum class ReadStatus { Normal, Backslash, Octal, FinishOctal, CarriageReturn };
-class ReadableSubStream : public IFX_SeekableReadStream {
+class ReadableSubStream final : public IFX_SeekableReadStream {
public:
ReadableSubStream(const RetainPtr<IFX_SeekableReadStream>& pFileRead,
FX_FILESIZE part_offset,
diff --git a/core/fpdfapi/render/cpdf_dibbase.h b/core/fpdfapi/render/cpdf_dibbase.h
index a1008470b6..423069db25 100644
--- a/core/fpdfapi/render/cpdf_dibbase.h
+++ b/core/fpdfapi/render/cpdf_dibbase.h
@@ -39,7 +39,7 @@ struct DIB_COMP_DATA {
#define FPDF_HUGE_IMAGE_SIZE 60000000
-class CPDF_DIBBase : public CFX_DIBBase {
+class CPDF_DIBBase final : public CFX_DIBBase {
public:
enum class LoadState : uint8_t { kFail, kSuccess, kContinue };
diff --git a/core/fpdfapi/render/cpdf_dibtransferfunc.h b/core/fpdfapi/render/cpdf_dibtransferfunc.h
index 61abd2e23c..62e0157665 100644
--- a/core/fpdfapi/render/cpdf_dibtransferfunc.h
+++ b/core/fpdfapi/render/cpdf_dibtransferfunc.h
@@ -15,7 +15,7 @@
class CPDF_TransferFunc;
-class CPDF_DIBTransferFunc : public CFX_FilteredDIB {
+class CPDF_DIBTransferFunc final : public CFX_FilteredDIB {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
diff --git a/core/fpdfapi/render/cpdf_transferfunc.h b/core/fpdfapi/render/cpdf_transferfunc.h
index e8964727c6..d45184eb92 100644
--- a/core/fpdfapi/render/cpdf_transferfunc.h
+++ b/core/fpdfapi/render/cpdf_transferfunc.h
@@ -14,7 +14,7 @@
class CPDF_Document;
class CFX_DIBBase;
-class CPDF_TransferFunc : public Retainable {
+class CPDF_TransferFunc final : public Retainable {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
diff --git a/core/fpdfapi/render/cpdf_type3cache.h b/core/fpdfapi/render/cpdf_type3cache.h
index f0bfbd63b6..de802c589b 100644
--- a/core/fpdfapi/render/cpdf_type3cache.h
+++ b/core/fpdfapi/render/cpdf_type3cache.h
@@ -18,7 +18,7 @@
class CPDF_Type3Glyphs;
-class CPDF_Type3Cache : public Retainable {
+class CPDF_Type3Cache final : public Retainable {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);