diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-27 20:18:04 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-27 20:18:04 +0000 |
commit | 55865454c43fbc3b163cff166544ba0a060dcbc4 (patch) | |
tree | 66cefeed22a38d19db07e63b315c9f09832d11b2 /core | |
parent | 76525c4a9d2aa6d1f2685d8483e3d491fd361df1 (diff) | |
download | pdfium-55865454c43fbc3b163cff166544ba0a060dcbc4.tar.xz |
The final game: mark everything final.
Then revert the ones that break compilation.
Fix one IWYU noticed during presubmit.
Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7
Reviewed-on: https://pdfium-review.googlesource.com/41470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core')
111 files changed, 136 insertions, 137 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); diff --git a/core/fpdfdoc/cpdf_occontext.h b/core/fpdfdoc/cpdf_occontext.h index 67763610f4..16b28ba06f 100644 --- a/core/fpdfdoc/cpdf_occontext.h +++ b/core/fpdfdoc/cpdf_occontext.h @@ -17,7 +17,7 @@ class CPDF_Dictionary; class CPDF_Document; class CPDF_PageObject; -class CPDF_OCContext : public Retainable { +class CPDF_OCContext final : public Retainable { public: enum UsageType { View = 0, Design, Print, Export }; diff --git a/core/fpdfdoc/cpdf_structelement.h b/core/fpdfdoc/cpdf_structelement.h index 79e8dd92c8..355599ff87 100644 --- a/core/fpdfdoc/cpdf_structelement.h +++ b/core/fpdfdoc/cpdf_structelement.h @@ -34,7 +34,7 @@ class CPDF_StructKid { uint32_t m_ContentId; // For PageContent, StreamContent. }; -class CPDF_StructElement : public Retainable { +class CPDF_StructElement final : public Retainable { public: template <typename T, typename... Args> friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); diff --git a/core/fpdfdoc/cpvt_floatrect.h b/core/fpdfdoc/cpvt_floatrect.h index c5eb2202bb..4dca3aaa43 100644 --- a/core/fpdfdoc/cpvt_floatrect.h +++ b/core/fpdfdoc/cpvt_floatrect.h @@ -9,7 +9,7 @@ #include "core/fxcrt/fx_coordinates.h" -class CPVT_FloatRect : public CFX_FloatRect { +class CPVT_FloatRect final : public CFX_FloatRect { public: CPVT_FloatRect() { left = top = right = bottom = 0.0f; } diff --git a/core/fpdfdoc/cpvt_fontmap.h b/core/fpdfdoc/cpvt_fontmap.h index f1a27753ac..6d8ca062c1 100644 --- a/core/fpdfdoc/cpvt_fontmap.h +++ b/core/fpdfdoc/cpvt_fontmap.h @@ -17,7 +17,7 @@ class CPDF_Document; class CPDF_Dictionary; class CPDF_Font; -class CPVT_FontMap : public IPVT_FontMap { +class CPVT_FontMap final : public IPVT_FontMap { public: CPVT_FontMap(CPDF_Document* pDoc, CPDF_Dictionary* pResDict, diff --git a/core/fpdftext/cpdf_linkextract_unittest.cpp b/core/fpdftext/cpdf_linkextract_unittest.cpp index 30438e6c10..f4bd197dda 100644 --- a/core/fpdftext/cpdf_linkextract_unittest.cpp +++ b/core/fpdftext/cpdf_linkextract_unittest.cpp @@ -7,7 +7,7 @@ #include "testing/gtest/include/gtest/gtest.h" // Class to help test functions in CPDF_LinkExtract class. -class CPDF_TestLinkExtract : public CPDF_LinkExtract { +class CPDF_TestLinkExtract final : public CPDF_LinkExtract { public: CPDF_TestLinkExtract() : CPDF_LinkExtract(nullptr) {} diff --git a/core/fxcodec/bmp/cfx_bmpcontext.h b/core/fxcodec/bmp/cfx_bmpcontext.h index 198d080fb8..89e6463872 100644 --- a/core/fxcodec/bmp/cfx_bmpcontext.h +++ b/core/fxcodec/bmp/cfx_bmpcontext.h @@ -10,7 +10,7 @@ #include "core/fxcodec/bmp/cfx_bmpdecompressor.h" #include "core/fxcodec/bmp/fx_bmp.h" -class CFX_BmpContext : public CCodec_BmpModule::Context { +class CFX_BmpContext final : public CCodec_BmpModule::Context { public: CFX_BmpContext(CCodec_BmpModule* pModule, CCodec_BmpModule::Delegate* pDelegate); diff --git a/core/fxcodec/codec/ccodec_pngmodule.cpp b/core/fxcodec/codec/ccodec_pngmodule.cpp index 98db4e272e..2c22f6bdba 100644 --- a/core/fxcodec/codec/ccodec_pngmodule.cpp +++ b/core/fxcodec/codec/ccodec_pngmodule.cpp @@ -23,7 +23,7 @@ #define PNG_ERROR_SIZE 256 -class CPngContext : public CCodec_PngModule::Context { +class CPngContext final : public CCodec_PngModule::Context { public: CPngContext(CCodec_PngModule* pModule, CCodec_PngModule::Delegate* pDelegate); ~CPngContext() override; diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp index 5f74b28cdc..78f631cba9 100644 --- a/core/fxcodec/codec/ccodec_tiffmodule.cpp +++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp @@ -32,7 +32,7 @@ struct TiffDeleter { } // namespace -class CTiffContext : public CCodec_TiffModule::Context { +class CTiffContext final : public CCodec_TiffModule::Context { public: CTiffContext() = default; ~CTiffContext() override = default; diff --git a/core/fxcodec/codec/cfx_codec_memory.h b/core/fxcodec/codec/cfx_codec_memory.h index e726dc5320..2907e892d2 100644 --- a/core/fxcodec/codec/cfx_codec_memory.h +++ b/core/fxcodec/codec/cfx_codec_memory.h @@ -8,7 +8,7 @@ #include "core/fxcrt/retain_ptr.h" #include "third_party/base/span.h" -class CFX_CodecMemory : public Retainable { +class CFX_CodecMemory final : public Retainable { public: template <typename T, typename... Args> friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index 54245a5b99..053aa71da2 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -1517,7 +1517,7 @@ CFX_DIBAttribute::~CFX_DIBAttribute() { } #endif // PDF_ENABLE_XFA -class CCodec_RLScanlineDecoder : public CCodec_ScanlineDecoder { +class CCodec_RLScanlineDecoder final : public CCodec_ScanlineDecoder { public: CCodec_RLScanlineDecoder(); ~CCodec_RLScanlineDecoder() override; diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp index aabc110010..c6e71b6b60 100644 --- a/core/fxcodec/codec/fx_codec_fax.cpp +++ b/core/fxcodec/codec/fx_codec_fax.cpp @@ -447,7 +447,7 @@ void FaxGet1DLine(const uint8_t* src_buf, } // namespace -class CCodec_FaxDecoder : public CCodec_ScanlineDecoder { +class CCodec_FaxDecoder final : public CCodec_ScanlineDecoder { public: CCodec_FaxDecoder(const uint8_t* src_buf, uint32_t src_size, diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp index 39d27a4955..11bdf67c42 100644 --- a/core/fxcodec/codec/fx_codec_flate.cpp +++ b/core/fxcodec/codec/fx_codec_flate.cpp @@ -623,7 +623,7 @@ uint32_t CCodec_FlateScanlineDecoder::GetSrcOffset() { return FlateGetPossiblyTruncatedTotalIn(m_pFlate.get()); } -class CCodec_FlatePredictorScanlineDecoder +class CCodec_FlatePredictorScanlineDecoder final : public CCodec_FlateScanlineDecoder { public: CCodec_FlatePredictorScanlineDecoder(const uint8_t* src_buf, diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index 4c37465386..d8e94b0285 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -29,7 +29,7 @@ extern "C" { #endif } // extern "C" -class CJpegContext : public CCodec_JpegModule::Context { +class CJpegContext final : public CCodec_JpegModule::Context { public: CJpegContext(); ~CJpegContext() override; @@ -162,7 +162,7 @@ static bool JpegLoadInfo(const uint8_t* src_buf, return true; } -class CCodec_JpegDecoder : public CCodec_ScanlineDecoder { +class CCodec_JpegDecoder final : public CCodec_ScanlineDecoder { public: CCodec_JpegDecoder(); ~CCodec_JpegDecoder() override; diff --git a/core/fxcodec/gif/cfx_gifcontext_unittest.cpp b/core/fxcodec/gif/cfx_gifcontext_unittest.cpp index 0d8941f72f..25f12b2724 100644 --- a/core/fxcodec/gif/cfx_gifcontext_unittest.cpp +++ b/core/fxcodec/gif/cfx_gifcontext_unittest.cpp @@ -7,7 +7,7 @@ #include "core/fxcrt/unowned_ptr.h" #include "testing/gtest/include/gtest/gtest.h" -class CFX_GifContextForTest : public CFX_GifContext { +class CFX_GifContextForTest final : public CFX_GifContext { public: CFX_GifContextForTest(CCodec_GifModule* gif_module, CCodec_GifModule::Delegate* delegate) diff --git a/core/fxcrt/cfx_fileaccess_posix.h b/core/fxcrt/cfx_fileaccess_posix.h index 381f115a13..7b8230de18 100644 --- a/core/fxcrt/cfx_fileaccess_posix.h +++ b/core/fxcrt/cfx_fileaccess_posix.h @@ -16,7 +16,7 @@ #error "Included on the wrong platform" #endif -class CFX_FileAccess_Posix : public FileAccessIface { +class CFX_FileAccess_Posix final : public FileAccessIface { public: CFX_FileAccess_Posix(); ~CFX_FileAccess_Posix() override; diff --git a/core/fxcrt/cfx_fileaccess_windows.h b/core/fxcrt/cfx_fileaccess_windows.h index 4352a2b521..fad2ed6f94 100644 --- a/core/fxcrt/cfx_fileaccess_windows.h +++ b/core/fxcrt/cfx_fileaccess_windows.h @@ -14,7 +14,7 @@ #error "Included on the wrong platform" #endif -class CFX_FileAccess_Windows : public FileAccessIface { +class CFX_FileAccess_Windows final : public FileAccessIface { public: CFX_FileAccess_Windows(); ~CFX_FileAccess_Windows() override; diff --git a/core/fxcrt/cfx_memorystream.h b/core/fxcrt/cfx_memorystream.h index 99e39a8ef3..c09c39011b 100644 --- a/core/fxcrt/cfx_memorystream.h +++ b/core/fxcrt/cfx_memorystream.h @@ -13,7 +13,7 @@ #include "core/fxcrt/fx_stream.h" #include "core/fxcrt/retain_ptr.h" -class CFX_MemoryStream : public IFX_SeekableStream { +class CFX_MemoryStream final : public IFX_SeekableStream { public: template <typename T, typename... Args> friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); diff --git a/core/fxcrt/cfx_seekablemultistream.h b/core/fxcrt/cfx_seekablemultistream.h index 4bd26b9863..ac15386b99 100644 --- a/core/fxcrt/cfx_seekablemultistream.h +++ b/core/fxcrt/cfx_seekablemultistream.h @@ -15,7 +15,7 @@ class CPDF_Stream; class CPDF_StreamAcc; -class CFX_SeekableMultiStream : public IFX_SeekableStream { +class CFX_SeekableMultiStream final : public IFX_SeekableStream { public: explicit CFX_SeekableMultiStream( const std::vector<const CPDF_Stream*>& streams); diff --git a/core/fxcrt/cfx_seekablestreamproxy.h b/core/fxcrt/cfx_seekablestreamproxy.h index 9b6b3a11c9..b193b1801a 100644 --- a/core/fxcrt/cfx_seekablestreamproxy.h +++ b/core/fxcrt/cfx_seekablestreamproxy.h @@ -13,7 +13,7 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/retain_ptr.h" -class CFX_SeekableStreamProxy : public IFX_SeekableReadStream { +class CFX_SeekableStreamProxy final : public IFX_SeekableReadStream { public: enum class From { Begin = 0, diff --git a/core/fxcrt/cfx_widetextbuf.h b/core/fxcrt/cfx_widetextbuf.h index 84553a3e59..483f75d318 100644 --- a/core/fxcrt/cfx_widetextbuf.h +++ b/core/fxcrt/cfx_widetextbuf.h @@ -11,7 +11,7 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" -class CFX_WideTextBuf : public CFX_BinaryBuf { +class CFX_WideTextBuf final : public CFX_BinaryBuf { public: void AppendChar(wchar_t wch); size_t GetLength() const override; diff --git a/core/fxcrt/css/cfx_csscolorvalue.h b/core/fxcrt/css/cfx_csscolorvalue.h index f59c0c5d3d..0156caa786 100644 --- a/core/fxcrt/css/cfx_csscolorvalue.h +++ b/core/fxcrt/css/cfx_csscolorvalue.h @@ -9,7 +9,7 @@ #include "core/fxcrt/css/cfx_cssvalue.h" -class CFX_CSSColorValue : public CFX_CSSValue { +class CFX_CSSColorValue final : public CFX_CSSValue { public: explicit CFX_CSSColorValue(FX_ARGB color); ~CFX_CSSColorValue() override; diff --git a/core/fxcrt/css/cfx_csscomputedstyle.h b/core/fxcrt/css/cfx_csscomputedstyle.h index 5080a7a3c2..f97f3f1d7d 100644 --- a/core/fxcrt/css/cfx_csscomputedstyle.h +++ b/core/fxcrt/css/cfx_csscomputedstyle.h @@ -15,7 +15,7 @@ class CFX_CSSValueList; -class CFX_CSSComputedStyle : public Retainable { +class CFX_CSSComputedStyle final : public Retainable { public: class InheritedData { public: diff --git a/core/fxcrt/css/cfx_cssenumvalue.h b/core/fxcrt/css/cfx_cssenumvalue.h index 0d6b87e85d..c397761d5a 100644 --- a/core/fxcrt/css/cfx_cssenumvalue.h +++ b/core/fxcrt/css/cfx_cssenumvalue.h @@ -9,7 +9,7 @@ #include "core/fxcrt/css/cfx_cssvalue.h" -class CFX_CSSEnumValue : public CFX_CSSValue { +class CFX_CSSEnumValue final : public CFX_CSSValue { public: explicit CFX_CSSEnumValue(CFX_CSSPropertyValue value); ~CFX_CSSEnumValue() override; diff --git a/core/fxcrt/css/cfx_cssnumbervalue.h b/core/fxcrt/css/cfx_cssnumbervalue.h index a49328d663..a977750f08 100644 --- a/core/fxcrt/css/cfx_cssnumbervalue.h +++ b/core/fxcrt/css/cfx_cssnumbervalue.h @@ -23,7 +23,7 @@ enum class CFX_CSSNumberType { Picas, }; -class CFX_CSSNumberValue : public CFX_CSSValue { +class CFX_CSSNumberValue final : public CFX_CSSValue { public: CFX_CSSNumberValue(CFX_CSSNumberType type, float value); ~CFX_CSSNumberValue() override; diff --git a/core/fxcrt/css/cfx_cssstringvalue.h b/core/fxcrt/css/cfx_cssstringvalue.h index d72078a630..d49393c305 100644 --- a/core/fxcrt/css/cfx_cssstringvalue.h +++ b/core/fxcrt/css/cfx_cssstringvalue.h @@ -9,7 +9,7 @@ #include "core/fxcrt/css/cfx_cssvalue.h" -class CFX_CSSStringValue : public CFX_CSSValue { +class CFX_CSSStringValue final : public CFX_CSSValue { public: explicit CFX_CSSStringValue(const WideString& value); ~CFX_CSSStringValue() override; diff --git a/core/fxcrt/css/cfx_cssvaluelist.h b/core/fxcrt/css/cfx_cssvaluelist.h index d2b0c6e7d1..5e04c649b9 100644 --- a/core/fxcrt/css/cfx_cssvaluelist.h +++ b/core/fxcrt/css/cfx_cssvaluelist.h @@ -11,7 +11,7 @@ #include "core/fxcrt/css/cfx_cssvalue.h" -class CFX_CSSValueList : public CFX_CSSValue { +class CFX_CSSValueList final : public CFX_CSSValue { public: explicit CFX_CSSValueList(std::vector<RetainPtr<CFX_CSSValue>>& list); ~CFX_CSSValueList() override; diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h index f84c5ee220..05e60c47b5 100644 --- a/core/fxcrt/fx_coordinates.h +++ b/core/fxcrt/fx_coordinates.h @@ -132,7 +132,7 @@ using CFX_Size = CFX_STemplate<int32_t>; using CFX_SizeF = CFX_STemplate<float>; template <class BaseType> -class CFX_VTemplate : public CFX_PTemplate<BaseType> { +class CFX_VTemplate final : public CFX_PTemplate<BaseType> { public: using CFX_PTemplate<BaseType>::x; using CFX_PTemplate<BaseType>::y; diff --git a/core/fxcrt/observable_unittest.cpp b/core/fxcrt/observable_unittest.cpp index 63e61b8513..5c55805afb 100644 --- a/core/fxcrt/observable_unittest.cpp +++ b/core/fxcrt/observable_unittest.cpp @@ -12,7 +12,7 @@ namespace fxcrt { namespace { -class PseudoObservable : public Observable<PseudoObservable> { +class PseudoObservable final : public Observable<PseudoObservable> { public: PseudoObservable() {} int SomeMethod() { return 42; } diff --git a/core/fxcrt/shared_copy_on_write_unittest.cpp b/core/fxcrt/shared_copy_on_write_unittest.cpp index 57e33d1019..6764c69300 100644 --- a/core/fxcrt/shared_copy_on_write_unittest.cpp +++ b/core/fxcrt/shared_copy_on_write_unittest.cpp @@ -29,7 +29,7 @@ class Observer { std::map<std::string, int> destruction_counts_; }; -class Object : public Retainable { +class Object final : public Retainable { public: Object(Observer* observer, const std::string& name) : name_(name), observer_(observer) { diff --git a/core/fxcrt/xml/cfx_xmlchardata.h b/core/fxcrt/xml/cfx_xmlchardata.h index 9e5669a464..71e9407ca2 100644 --- a/core/fxcrt/xml/cfx_xmlchardata.h +++ b/core/fxcrt/xml/cfx_xmlchardata.h @@ -14,7 +14,7 @@ class CFX_XMLDocument; -class CFX_XMLCharData : public CFX_XMLText { +class CFX_XMLCharData final : public CFX_XMLText { public: explicit CFX_XMLCharData(const WideString& wsCData); ~CFX_XMLCharData() override; diff --git a/core/fxcrt/xml/cfx_xmlelement.h b/core/fxcrt/xml/cfx_xmlelement.h index 394866042c..f54587c4e4 100644 --- a/core/fxcrt/xml/cfx_xmlelement.h +++ b/core/fxcrt/xml/cfx_xmlelement.h @@ -16,7 +16,7 @@ class CFX_XMLDocument; -class CFX_XMLElement : public CFX_XMLNode { +class CFX_XMLElement final : public CFX_XMLNode { public: explicit CFX_XMLElement(const WideString& wsTag); ~CFX_XMLElement() override; diff --git a/core/fxcrt/xml/cfx_xmlinstruction.h b/core/fxcrt/xml/cfx_xmlinstruction.h index 8962d73ac1..18f84c3c3d 100644 --- a/core/fxcrt/xml/cfx_xmlinstruction.h +++ b/core/fxcrt/xml/cfx_xmlinstruction.h @@ -15,7 +15,7 @@ class CFX_XMLDocument; -class CFX_XMLInstruction : public CFX_XMLNode { +class CFX_XMLInstruction final : public CFX_XMLNode { public: explicit CFX_XMLInstruction(const WideString& wsTarget); ~CFX_XMLInstruction() override; diff --git a/core/fxge/agg/fx_agg_driver.h b/core/fxge/agg/fx_agg_driver.h index 167b211746..6d6b988c3a 100644 --- a/core/fxge/agg/fx_agg_driver.h +++ b/core/fxge/agg/fx_agg_driver.h @@ -30,7 +30,7 @@ class CAgg_PathData { agg::path_storage m_PathData; }; -class CFX_AggDeviceDriver : public RenderDeviceDriverIface { +class CFX_AggDeviceDriver final : public RenderDeviceDriverIface { public: CFX_AggDeviceDriver(const RetainPtr<CFX_DIBitmap>& pBitmap, bool bRgbByteOrder, diff --git a/core/fxge/android/cfx_androidfontinfo.h b/core/fxge/android/cfx_androidfontinfo.h index 62ad7184fe..f671bfbbb7 100644 --- a/core/fxge/android/cfx_androidfontinfo.h +++ b/core/fxge/android/cfx_androidfontinfo.h @@ -14,7 +14,7 @@ class CFPF_SkiaFontMgr; -class CFX_AndroidFontInfo : public SystemFontInfoIface { +class CFX_AndroidFontInfo final : public SystemFontInfoIface { public: CFX_AndroidFontInfo(); ~CFX_AndroidFontInfo() override; diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp index f4a62a62d8..62ac33c51b 100644 --- a/core/fxge/apple/fx_mac_imp.cpp +++ b/core/fxge/apple/fx_mac_imp.cpp @@ -35,7 +35,7 @@ const struct { {"Times-Italic", "Times New Roman Italic"}, }; -class CFX_MacFontInfo : public CFX_FolderFontInfo { +class CFX_MacFontInfo final : public CFX_FolderFontInfo { public: CFX_MacFontInfo() {} ~CFX_MacFontInfo() override {} diff --git a/core/fxge/cfx_defaultrenderdevice.h b/core/fxge/cfx_defaultrenderdevice.h index 07e3cc57c9..937088f2b2 100644 --- a/core/fxge/cfx_defaultrenderdevice.h +++ b/core/fxge/cfx_defaultrenderdevice.h @@ -12,7 +12,7 @@ class SkPictureRecorder; -class CFX_DefaultRenderDevice : public CFX_RenderDevice { +class CFX_DefaultRenderDevice final : public CFX_RenderDevice { public: CFX_DefaultRenderDevice(); ~CFX_DefaultRenderDevice() override; diff --git a/core/fxge/cfx_graphstatedata.h b/core/fxge/cfx_graphstatedata.h index 1afff83c1c..a907f2a922 100644 --- a/core/fxge/cfx_graphstatedata.h +++ b/core/fxge/cfx_graphstatedata.h @@ -10,7 +10,7 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/retain_ptr.h" -class CFX_GraphStateData : public Retainable { +class CFX_GraphStateData final : public Retainable { public: enum LineCap { LineCapButt = 0, LineCapRound = 1, LineCapSquare = 2 }; diff --git a/core/fxge/cfx_pathdata.h b/core/fxge/cfx_pathdata.h index 5c2be627bf..9d96407de9 100644 --- a/core/fxge/cfx_pathdata.h +++ b/core/fxge/cfx_pathdata.h @@ -29,7 +29,7 @@ class FX_PATHPOINT { bool m_CloseFigure; }; -class CFX_PathData : public Retainable { +class CFX_PathData final : public Retainable { public: CFX_PathData(); CFX_PathData(const CFX_PathData& src); diff --git a/core/fxge/cfx_unicodeencodingex.h b/core/fxge/cfx_unicodeencodingex.h index 5632d9665d..d9d349a88b 100644 --- a/core/fxge/cfx_unicodeencodingex.h +++ b/core/fxge/cfx_unicodeencodingex.h @@ -15,7 +15,7 @@ #include "core/fxge/cfx_unicodeencoding.h" #include "core/fxge/fx_dib.h" -class CFX_UnicodeEncodingEx : public CFX_UnicodeEncoding { +class CFX_UnicodeEncodingEx final : public CFX_UnicodeEncoding { public: CFX_UnicodeEncodingEx(CFX_Font* pFont, uint32_t EncodingID); ~CFX_UnicodeEncodingEx() override; diff --git a/core/fxge/cfx_windowsrenderdevice.h b/core/fxge/cfx_windowsrenderdevice.h index 9701ca5186..4470a74c45 100644 --- a/core/fxge/cfx_windowsrenderdevice.h +++ b/core/fxge/cfx_windowsrenderdevice.h @@ -36,7 +36,7 @@ extern PDFiumEnsureTypefaceCharactersAccessible #endif extern WindowsPrintMode g_pdfium_print_mode; -class CFX_WindowsRenderDevice : public CFX_RenderDevice { +class CFX_WindowsRenderDevice final : public CFX_RenderDevice { public: static RenderDeviceDriverIface* CreateDriver(HDC hDC); diff --git a/core/fxge/dib/cfx_bitmapcomposer.h b/core/fxge/dib/cfx_bitmapcomposer.h index f1bf0e9f32..50a53dbc2b 100644 --- a/core/fxge/dib/cfx_bitmapcomposer.h +++ b/core/fxge/dib/cfx_bitmapcomposer.h @@ -18,7 +18,7 @@ class CFX_ClipRgn; class CFX_DIBitmap; -class CFX_BitmapComposer : public ScanlineComposerIface { +class CFX_BitmapComposer final : public ScanlineComposerIface { public: CFX_BitmapComposer(); ~CFX_BitmapComposer() override; diff --git a/core/fxge/dib/cfx_bitmapstorer.h b/core/fxge/dib/cfx_bitmapstorer.h index 7d3482fc3f..3da1f70487 100644 --- a/core/fxge/dib/cfx_bitmapstorer.h +++ b/core/fxge/dib/cfx_bitmapstorer.h @@ -16,7 +16,7 @@ #include "core/fxge/dib/scanlinecomposer_iface.h" #include "third_party/base/stl_util.h" -class CFX_BitmapStorer : public ScanlineComposerIface { +class CFX_BitmapStorer final : public ScanlineComposerIface { public: CFX_BitmapStorer(); ~CFX_BitmapStorer() override; diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp index 0042462c89..66446ce52c 100644 --- a/core/fxge/dib/cfx_imagetransformer.cpp +++ b/core/fxge/dib/cfx_imagetransformer.cpp @@ -180,7 +180,7 @@ class CPDF_FixedMatrix { const int f; }; -class CFX_BilinearMatrix : public CPDF_FixedMatrix { +class CFX_BilinearMatrix final : public CPDF_FixedMatrix { public: explicit CFX_BilinearMatrix(const CFX_Matrix& src) : CPDF_FixedMatrix(src) {} diff --git a/core/fxge/fx_ge_linux.cpp b/core/fxge/fx_ge_linux.cpp index d2da781881..4d4f4e625e 100644 --- a/core/fxge/fx_ge_linux.cpp +++ b/core/fxge/fx_ge_linux.cpp @@ -66,7 +66,7 @@ size_t GetJapanesePreference(const char* facearr, return 2; } -class CFX_LinuxFontInfo : public CFX_FolderFontInfo { +class CFX_LinuxFontInfo final : public CFX_FolderFontInfo { public: CFX_LinuxFontInfo() {} ~CFX_LinuxFontInfo() override {} diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h index ce6ca6b000..4baeacbce5 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -22,7 +22,7 @@ class SkPictureRecorder; class SkiaState; struct SkIRect; -class CFX_SkiaDeviceDriver : public RenderDeviceDriverIface { +class CFX_SkiaDeviceDriver final : public RenderDeviceDriverIface { public: CFX_SkiaDeviceDriver(const RetainPtr<CFX_DIBitmap>& pBitmap, bool bRgbByteOrder, diff --git a/core/fxge/win32/cfx_windowsdib.h b/core/fxge/win32/cfx_windowsdib.h index c64fc7dc16..4b7de7d5f9 100644 --- a/core/fxge/win32/cfx_windowsdib.h +++ b/core/fxge/win32/cfx_windowsdib.h @@ -24,7 +24,7 @@ struct WINDIB_Open_Args_ { const wchar_t* path_name; }; -class CFX_WindowsDIB : public CFX_DIBitmap { +class CFX_WindowsDIB final : public CFX_DIBitmap { public: template <typename T, typename... Args> friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); diff --git a/core/fxge/win32/cpsoutput.h b/core/fxge/win32/cpsoutput.h index 49317a64a5..04e5ac1fa0 100644 --- a/core/fxge/win32/cpsoutput.h +++ b/core/fxge/win32/cpsoutput.h @@ -12,7 +12,7 @@ #include "core/fxcrt/fx_stream.h" #include "core/fxcrt/fx_system.h" -class CPSOutput : public IFX_WriteStream { +class CPSOutput final : public IFX_WriteStream { public: enum class OutputMode { kExtEscape, kGdiComment }; diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index 76a1d8800e..0bc68c46b9 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -188,7 +188,7 @@ class CGdiDeviceDriver : public RenderDeviceDriverIface { int m_RenderCaps; }; -class CGdiDisplayDriver : public CGdiDeviceDriver { +class CGdiDisplayDriver final : public CGdiDeviceDriver { public: explicit CGdiDisplayDriver(HDC hDC); ~CGdiDisplayDriver() override; @@ -229,7 +229,7 @@ class CGdiDisplayDriver : public CGdiDeviceDriver { int render_flags); }; -class CGdiPrinterDriver : public CGdiDeviceDriver { +class CGdiPrinterDriver final : public CGdiDeviceDriver { public: explicit CGdiPrinterDriver(HDC hDC); ~CGdiPrinterDriver() override; @@ -269,7 +269,7 @@ class CGdiPrinterDriver : public CGdiDeviceDriver { const int m_VertSize; }; -class CPSPrinterDriver : public RenderDeviceDriverIface { +class CPSPrinterDriver final : public RenderDeviceDriverIface { public: CPSPrinterDriver(HDC hDC, WindowsPrintMode mode, bool bCmykOutput); ~CPSPrinterDriver() override; @@ -334,7 +334,7 @@ class CPSPrinterDriver : public RenderDeviceDriverIface { CFX_PSRenderer m_PSRenderer; }; -class CTextOnlyPrinterDriver : public RenderDeviceDriverIface { +class CTextOnlyPrinterDriver final : public RenderDeviceDriverIface { public: explicit CTextOnlyPrinterDriver(HDC hDC); ~CTextOnlyPrinterDriver() override; |