From 049e026755f7c36c7594bf4e7891603930669a54 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 7 Nov 2017 15:01:52 +0200 Subject: [PATCH] loplugin:finalclasses in basic,basegfx Change-Id: Iff223782fa0ded0fe46b8b7af35bfd21f331015f Reviewed-on: https://gerrit.libreoffice.org/44535 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/inc/sbstdobj.hxx | 10 +++------- basic/source/inc/namecont.hxx | 6 +++--- basic/source/inc/symtbl.hxx | 3 +-- include/basegfx/color/bcolormodifier.hxx | 3 +-- include/basegfx/pixel/bpixel.hxx | 3 +-- include/basegfx/tuple/b2i64tuple.hxx | 3 +-- include/basic/sbx.hxx | 3 +-- 7 files changed, 11 insertions(+), 20 deletions(-) diff --git a/basic/inc/sbstdobj.hxx b/basic/inc/sbstdobj.hxx index 8fe8c336b848..ba2190b143e2 100644 --- a/basic/inc/sbstdobj.hxx +++ b/basic/inc/sbstdobj.hxx @@ -35,9 +35,8 @@ public: }; // class SbStdPicture -class BASIC_DLLPUBLIC SbStdPicture : public SbxObject +class BASIC_DLLPUBLIC SbStdPicture final : public SbxObject { -protected: Graphic aGraphic; virtual ~SbStdPicture() override; @@ -56,9 +55,8 @@ public: }; // class SbStdFont -class BASIC_DLLPUBLIC SbStdFont : public SbxObject +class BASIC_DLLPUBLIC SbStdFont final : public SbxObject { -protected: bool bBold; bool bItalic; bool bStrikeThrough; @@ -94,10 +92,8 @@ public: }; // class SbStdClipboard -class BASIC_DLLPUBLIC SbStdClipboard : public SbxObject +class BASIC_DLLPUBLIC SbStdClipboard final : public SbxObject { -protected: - virtual ~SbStdClipboard() override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 72016292713f..203660ae6ff0 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -613,13 +613,13 @@ public: }; -class ScriptExtensionIterator +class ScriptExtensionIterator final { public: ScriptExtensionIterator(); OUString nextBasicOrDialogLibrary( bool& rbPureDialogLib ); -protected: +private: css::uno::Reference< css::deployment::XPackage > implGetNextUserScriptPackage( bool& rbPureDialogLib ); css::uno::Reference< css::deployment::XPackage > @@ -648,7 +648,7 @@ protected: int m_iUserPackage; int m_iSharedPackage; - int m_iBundledPackage; + int m_iBundledPackage; ScriptSubPackageIterator* m_pScriptSubPackageIterator; diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx index 5ff54d2f87af..64a11ea814f3 100644 --- a/basic/source/inc/symtbl.hxx +++ b/basic/source/inc/symtbl.hxx @@ -46,10 +46,9 @@ public: }; -class SbiSymPool { +class SbiSymPool final { friend class SbiSymDef; friend class SbiProcDef; -protected: SbiStringPool& rStrings; std::vector> m_Data; SbiSymPool* pParent; diff --git a/include/basegfx/color/bcolormodifier.hxx b/include/basegfx/color/bcolormodifier.hxx index def842fabf59..56b6c0a3a386 100644 --- a/include/basegfx/color/bcolormodifier.hxx +++ b/include/basegfx/color/bcolormodifier.hxx @@ -371,9 +371,8 @@ namespace basegfx All references to BColorModifier members use shared pointers, thus instances of BColorModifierStack can be copied by the default mechanisms if needed. */ - class BASEGFX_DLLPUBLIC BColorModifierStack + class BASEGFX_DLLPUBLIC BColorModifierStack final { - protected: ::std::vector< BColorModifierSharedPtr > maBColorModifiers; public: diff --git a/include/basegfx/pixel/bpixel.hxx b/include/basegfx/pixel/bpixel.hxx index ed1dadc06a09..6ea620b0037c 100644 --- a/include/basegfx/pixel/bpixel.hxx +++ b/include/basegfx/pixel/bpixel.hxx @@ -27,9 +27,8 @@ namespace basegfx { - class BASEGFX_DLLPUBLIC BPixel + class BASEGFX_DLLPUBLIC BPixel final { - protected: union { struct diff --git a/include/basegfx/tuple/b2i64tuple.hxx b/include/basegfx/tuple/b2i64tuple.hxx index 10942b0dd452..ae3ec5f5a969 100644 --- a/include/basegfx/tuple/b2i64tuple.hxx +++ b/include/basegfx/tuple/b2i64tuple.hxx @@ -35,9 +35,8 @@ namespace basegfx @derive Use this class to implement Points or Vectors which are based on two sal_Int64 values */ - class SAL_WARN_UNUSED BASEGFX_DLLPUBLIC B2I64Tuple + class SAL_WARN_UNUSED BASEGFX_DLLPUBLIC B2I64Tuple final { - protected: sal_Int64 mnX; sal_Int64 mnY; diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx index 45d00555ec3d..3bc9b9953017 100644 --- a/include/basic/sbx.hxx +++ b/include/basic/sbx.hxx @@ -218,9 +218,8 @@ public: virtual void Clear() override; }; -class BASIC_DLLPUBLIC SbxStdCollection : public SbxCollection +class BASIC_DLLPUBLIC SbxStdCollection final : public SbxCollection { -protected: OUString aElemClass; bool bAddRemoveOk; virtual ~SbxStdCollection() override;