From ac8901d9d2ef8c461012b44e67651aaff3a6b5c1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 26 Oct 2017 14:55:54 +0200 Subject: loplugin:finalclasses in sc Change-Id: I83438eaf2c1045a9212a63ed9fd8b3371e9b06aa Reviewed-on: https://gerrit.libreoffice.org/43896 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/inc/chartlis.hxx | 3 +-- sc/inc/compiler.hxx | 3 +-- sc/inc/stlsheet.hxx | 13 +++++-------- 3 files changed, 7 insertions(+), 12 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 3fde82bea979..374e1aaeb20d 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -124,7 +124,7 @@ public: virtual void notify() = 0; }; -class SC_DLLPUBLIC ScChartListenerCollection +class SC_DLLPUBLIC ScChartListenerCollection final { public: typedef std::map> ListenersType; @@ -149,7 +149,6 @@ private: ScChartListenerCollection& operator=( const ScChartListenerCollection& ) = delete; -protected: void Init(); public: diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index cc9040bce26f..d09f8a0af140 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -92,13 +92,12 @@ class CompileFormulaContext; // constants and data types internal to compiler -struct ScRawToken +struct ScRawToken final { friend class ScCompiler; // Friends that use a temporary ScRawToken on the stack (and therefore need // the private dtor) and know what they're doing.. friend class ScTokenArray; -protected: OpCode eOp; formula::StackVar eType; // type of data; this determines how the unions are used public: diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx index e47b4cf96924..cab2e9759702 100644 --- a/sc/inc/stlsheet.hxx +++ b/sc/inc/stlsheet.hxx @@ -28,7 +28,7 @@ class ScStyleSheetPool; -class ScStyleSheet : public SfxStyleSheet +class ScStyleSheet final : public SfxStyleSheet { friend class ScStyleSheetPool; @@ -41,16 +41,11 @@ public: NOTUSED }; -private: - mutable ScStyleSheet::Usage eUsage; - -public: - ScStyleSheet( const ScStyleSheet& rStyle ); virtual bool SetParent ( const OUString& rParentName ) override; SC_DLLPUBLIC void ResetParent(); - virtual SfxItemSet& GetItemSet () override; + SC_DLLPUBLIC virtual SfxItemSet& GetItemSet() override; virtual bool IsUsed () const override; virtual bool HasFollowSupport () const override; virtual bool HasParentSupport () const override; @@ -60,7 +55,7 @@ public: void SetUsage( ScStyleSheet::Usage eUse ) const { eUsage = eUse; } ScStyleSheet::Usage GetUsage() const { return eUsage; } -protected: +private: virtual ~ScStyleSheet() override; ScStyleSheet( const OUString& rName, @@ -69,6 +64,8 @@ protected: sal_uInt16 nMask ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + + mutable ScStyleSheet::Usage eUsage; }; #endif // INCLUDED_SC_INC_STLSHEET_HXX -- cgit