diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-02 15:33:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-03 07:54:27 +0100 |
commit | 5da6c31a76a95a19bd15ebdb0d1321b7d1240cc7 (patch) | |
tree | ebcb8eeeb54defa839ee82d97d3a17602639c1b9 /sdext/source/pdfimport | |
parent | 6299c8cae923198c55d47320fa8a89bbcd5b0f2b (diff) |
loplugin:finalclasses
Change-Id: I10ff73f89c965beb3cfb5fc3a40dd959d8f77aaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124600
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext/source/pdfimport')
-rw-r--r-- | sdext/source/pdfimport/inc/genericelements.hxx | 25 | ||||
-rw-r--r-- | sdext/source/pdfimport/inc/pdfiprocessor.hxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/inc/pdfparse.hxx | 28 |
3 files changed, 24 insertions, 31 deletions
diff --git a/sdext/source/pdfimport/inc/genericelements.hxx b/sdext/source/pdfimport/inc/genericelements.hxx index ff0ba6f52d84..63325213f59a 100644 --- a/sdext/source/pdfimport/inc/genericelements.hxx +++ b/sdext/source/pdfimport/inc/genericelements.hxx @@ -107,16 +107,15 @@ namespace pdfi std::list<std::unique_ptr<Element>> Children; }; - struct ListElement : public Element + struct ListElement final : public Element { ListElement() : Element( nullptr ) {} virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override; }; - struct HyperlinkElement : public Element + struct HyperlinkElement final : public Element { friend class ElementFactory; - protected: HyperlinkElement( Element* pParent, const OUString& rURI ) : Element( pParent ), URI( rURI ) {} public: @@ -157,10 +156,9 @@ namespace pdfi sal_Int32 ZOrder; }; - struct FrameElement : public DrawElement + struct FrameElement final : public DrawElement { friend class ElementFactory; - protected: FrameElement( Element* pParent, sal_Int32 nGCId ) : DrawElement( pParent, nGCId ) {} @@ -168,10 +166,9 @@ namespace pdfi virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override; }; - struct TextElement : public GraphicalElement + struct TextElement final : public GraphicalElement { friend class ElementFactory; - protected: TextElement( Element* pParent, sal_Int32 nGCId, sal_Int32 nFontId ) : GraphicalElement( pParent, nGCId ), FontId( nFontId ) {} @@ -182,10 +179,9 @@ namespace pdfi sal_Int32 FontId; }; - struct ParagraphElement : public Element + struct ParagraphElement final : public Element { friend class ElementFactory; - protected: explicit ParagraphElement( Element* pParent ) : Element( pParent ), Type( Normal ), bRtl( false ) {} public: @@ -204,10 +200,9 @@ namespace pdfi bool bRtl; }; - struct PolyPolyElement : public DrawElement + struct PolyPolyElement final : public DrawElement { friend class ElementFactory; - protected: PolyPolyElement( Element* pParent, sal_Int32 nGCId, const basegfx::B2DPolyPolygon& rPolyPoly, sal_Int8 nAction ); @@ -224,10 +219,9 @@ namespace pdfi sal_Int8 Action; }; - struct ImageElement : public DrawElement + struct ImageElement final : public DrawElement { friend class ElementFactory; - protected: ImageElement( Element* pParent, sal_Int32 nGCId, ImageId nImage ) : DrawElement( pParent, nGCId ), Image( nImage ) {} @@ -237,10 +231,9 @@ namespace pdfi ImageId Image; }; - struct PageElement : public Element + struct PageElement final : public Element { friend class ElementFactory; - protected: PageElement( Element* pParent, sal_Int32 nPageNr ) : Element( pParent ), PageNumber( nPageNr ), Hyperlinks(), TopMargin( 0.0 ), BottomMargin( 0.0 ), LeftMargin( 0.0 ), RightMargin( 0.0 ) @@ -267,7 +260,7 @@ namespace pdfi std::unique_ptr<Element> FooterElement; }; - struct DocumentElement : public Element + struct DocumentElement final : public Element { friend class ElementFactory; public: diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx b/sdext/source/pdfimport/inc/pdfiprocessor.hxx index 3305f0bf715e..c872ead78917 100644 --- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx +++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx @@ -52,7 +52,7 @@ namespace pdfi Creates the internal DOM tree from the render calls */ - class PDFIProcessor : public ContentSink + class PDFIProcessor final : public ContentSink { public: css::uno::Reference< diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx index abb674a48d22..9d74085aba03 100644 --- a/sdext/source/pdfimport/inc/pdfparse.hxx +++ b/sdext/source/pdfimport/inc/pdfparse.hxx @@ -68,7 +68,7 @@ protected: static void setEmitData( EmitContext& rContext, EmitImplData* pNewEmitData ); }; -struct PDFComment : public PDFEntry +struct PDFComment final : public PDFEntry { OString m_aComment; @@ -86,7 +86,7 @@ struct PDFValue : public PDFEntry virtual ~PDFValue() override; }; -struct PDFName : public PDFValue +struct PDFName final : public PDFValue { OString m_aName; @@ -99,7 +99,7 @@ struct PDFName : public PDFValue OUString getFilteredName() const; }; -struct PDFString : public PDFValue +struct PDFString final : public PDFValue { OString m_aString; @@ -112,7 +112,7 @@ struct PDFString : public PDFValue OString getFilteredString() const; }; -struct PDFNumber : public PDFValue +struct PDFNumber final : public PDFValue { double m_fValue; @@ -123,7 +123,7 @@ struct PDFNumber : public PDFValue virtual PDFEntry* clone() const override; }; -struct PDFBool : public PDFValue +struct PDFBool final : public PDFValue { bool m_bValue; @@ -134,7 +134,7 @@ struct PDFBool : public PDFValue virtual PDFEntry* clone() const override; }; -struct PDFObjectRef : public PDFValue +struct PDFObjectRef final : public PDFValue { unsigned int m_nNumber; unsigned int m_nGeneration; @@ -146,7 +146,7 @@ struct PDFObjectRef : public PDFValue virtual PDFEntry* clone() const override; }; -struct PDFNull : public PDFValue +struct PDFNull final : public PDFValue { PDFNull() {} virtual ~PDFNull() override; @@ -172,7 +172,7 @@ struct PDFContainer : public PDFEntry { return findObject( pRef->m_nNumber, pRef->m_nGeneration ); } }; -struct PDFArray : public PDFContainer +struct PDFArray final : public PDFContainer { PDFArray() {} virtual ~PDFArray() override; @@ -180,7 +180,7 @@ struct PDFArray : public PDFContainer virtual PDFEntry* clone() const override; }; -struct PDFDict : public PDFContainer +struct PDFDict final : public PDFContainer { typedef std::unordered_map<OString,PDFEntry*> Map; Map m_aMap; @@ -200,7 +200,7 @@ struct PDFDict : public PDFContainer PDFEntry* buildMap(); }; -struct PDFStream : public PDFEntry +struct PDFStream final : public PDFEntry { unsigned int m_nBeginOffset; unsigned int m_nEndOffset; // offset of the byte after the stream @@ -215,7 +215,7 @@ struct PDFStream : public PDFEntry unsigned int getDictLength( const PDFContainer* pObjectContainer ) const; // get contents of the "Length" entry of the dict }; -struct PDFTrailer : public PDFContainer +struct PDFTrailer final : public PDFContainer { PDFDict* m_pDict; @@ -226,7 +226,7 @@ struct PDFTrailer : public PDFContainer }; struct PDFFileImplData; -struct PDFFile : public PDFContainer +struct PDFFile final : public PDFContainer { private: mutable std::unique_ptr<PDFFileImplData> m_pData; @@ -255,7 +255,7 @@ public: unsigned int nObject, unsigned int nGeneration ) const; }; -struct PDFObject : public PDFContainer +struct PDFObject final : public PDFContainer { PDFEntry* m_pObject; PDFStream* m_pStream; @@ -279,7 +279,7 @@ private: bool getDeflatedStream( std::unique_ptr<char[]>& rpStream, unsigned int* pBytes, const PDFContainer* pObjectContainer, EmitContext& rContext ) const; }; -struct PDFPart : public PDFContainer +struct PDFPart final : public PDFContainer { PDFPart() : PDFContainer() {} virtual ~PDFPart() override; |