summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-15 14:27:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-15 18:57:42 +0200
commit270bb6ef005c7b8932dfac0b801bfe65a2fb966c (patch)
tree1dc395c171987083c8fb6dcd3475b9307e548c43 /basic
parent20635ed31945d500685f7f667f0694410e49906c (diff)
loplugin:finalclasses in basic
Change-Id: I3ec4ccb58dc3823eee8b6ab8bda31b128ee24569 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122146 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/inc/sbobjmod.hxx2
-rw-r--r--basic/inc/sbprop.hxx4
-rw-r--r--basic/source/inc/dlgcont.hxx6
-rw-r--r--basic/source/inc/errobject.hxx2
-rw-r--r--basic/source/inc/namecont.hxx4
-rw-r--r--basic/source/inc/propacc.hxx2
-rw-r--r--basic/source/inc/sbintern.hxx10
-rw-r--r--basic/source/inc/sbjsmeth.hxx2
-rw-r--r--basic/source/inc/sbjsmod.hxx2
-rw-r--r--basic/source/inc/sbunoobj.hxx22
-rw-r--r--basic/source/inc/scriptcont.hxx6
-rw-r--r--basic/source/inc/stdobj.hxx2
-rw-r--r--basic/source/inc/symtbl.hxx4
13 files changed, 34 insertions, 34 deletions
diff --git a/basic/inc/sbobjmod.hxx b/basic/inc/sbobjmod.hxx
index 7cfa0cd81f9b..1a2a87cc5856 100644
--- a/basic/inc/sbobjmod.hxx
+++ b/basic/inc/sbobjmod.hxx
@@ -80,7 +80,7 @@ public:
class SbUserFormModuleInstance* CreateInstance();
};
-class SbUserFormModuleInstance : public SbUserFormModule
+class SbUserFormModuleInstance final : public SbUserFormModule
{
SbUserFormModule* m_pParentModule;
diff --git a/basic/inc/sbprop.hxx b/basic/inc/sbprop.hxx
index e554267f9e0b..8c185cc8a474 100644
--- a/basic/inc/sbprop.hxx
+++ b/basic/inc/sbprop.hxx
@@ -24,7 +24,7 @@
class SbModule;
-class SbProperty : public SbxProperty
+class SbProperty final : public SbxProperty
{
friend class SbiFactory;
friend class SbModule;
@@ -39,7 +39,7 @@ public:
typedef tools::SvRef<SbProperty> SbPropertyRef;
-class SbProcedureProperty : public SbxProperty
+class SbProcedureProperty final : public SbxProperty
{
bool mbSet; // Flag for set command
diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx
index 4be36fec9160..58d1dbeb65f4 100644
--- a/basic/source/inc/dlgcont.hxx
+++ b/basic/source/inc/dlgcont.hxx
@@ -31,7 +31,7 @@ namespace basic
{
-class SfxDialogLibraryContainer : public SfxLibraryContainer
+class SfxDialogLibraryContainer final : public SfxLibraryContainer
{
// Methods to distinguish between different library types
virtual rtl::Reference<SfxLibrary> implCreateLibrary( const OUString& aName ) override;
@@ -88,7 +88,7 @@ public:
typedef ::cppu::ImplHelper1 < css::resource::XStringResourceSupplier
> SfxDialogLibrary_BASE;
-class SfxDialogLibrary :public SfxLibrary
+class SfxDialogLibrary final : public SfxLibrary
,public SfxDialogLibrary_BASE
{
SfxDialogLibraryContainer* m_pParent;
@@ -140,7 +140,7 @@ public:
static bool containsValidDialog( const css::uno::Any& aElement );
-protected:
+private:
virtual bool isLibraryElementValid(const css::uno::Any& rElement) const override;
};
diff --git a/basic/source/inc/errobject.hxx b/basic/source/inc/errobject.hxx
index c43e88667f80..db46f5e971e2 100644
--- a/basic/source/inc/errobject.hxx
+++ b/basic/source/inc/errobject.hxx
@@ -21,7 +21,7 @@
#include "sbunoobj.hxx"
#include <ooo/vba/XErrObject.hpp>
-class SbxErrObject : public SbUnoObject
+class SbxErrObject final : public SbUnoObject
{
class ErrObject* m_pErrObject;
css::uno::Reference<ooo::vba::XErrObject> m_xErr;
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index 059d48354d72..096f614a84d2 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -62,7 +62,7 @@ typedef ::cppu::WeakImplHelper<
css::util::XChangesNotifier > NameContainer_BASE;
-class NameContainer : public ::cppu::BaseMutex, public NameContainer_BASE
+class NameContainer final : public ::cppu::BaseMutex, public NameContainer_BASE
{
typedef std::unordered_map < OUString, sal_Int32 > NameContainerNameMap;
@@ -160,7 +160,7 @@ typedef ::comphelper::OListenerContainerBase<
css::script::vba::XVBAScriptListener,
css::script::vba::VBAScriptEvent > VBAScriptListenerContainer_BASE;
-class VBAScriptListenerContainer : public VBAScriptListenerContainer_BASE
+class VBAScriptListenerContainer final : public VBAScriptListenerContainer_BASE
{
public:
explicit VBAScriptListenerContainer( ::osl::Mutex& rMutex );
diff --git a/basic/source/inc/propacc.hxx b/basic/source/inc/propacc.hxx
index f6df70797434..66dd26cefe63 100644
--- a/basic/source/inc/propacc.hxx
+++ b/basic/source/inc/propacc.hxx
@@ -32,7 +32,7 @@ typedef ::cppu::WeakImplHelper< css::beans::XPropertySet,
css::beans::XPropertyAccess > SbPropertyValuesHelper;
-class SbPropertyValues: public SbPropertyValuesHelper
+class SbPropertyValues final : public SbPropertyValuesHelper
{
SbPropertyValueArr_Impl m_aPropVals;
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index bf0439724c4f..0f1b4d3114b5 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -37,7 +37,7 @@ class SbiInstance;
class SbModule;
class BasicManager;
-class SbiFactory : public SbxFactory
+class SbiFactory final : public SbxFactory
{
public:
virtual SbxBaseRef Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
@@ -60,7 +60,7 @@ struct SbClassData
// #115824: Factory class to create class objects (type command)
// Implementation: sb.cxx
-class SbClassFactory : public SbxFactory
+class SbClassFactory final : public SbxFactory
{
SbxObjectRef xClassModules;
@@ -78,14 +78,14 @@ public:
};
// Factory class to create user defined objects (type command)
-class SbTypeFactory : public SbxFactory
+class SbTypeFactory final : public SbxFactory
{
public:
virtual SbxBaseRef Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
virtual SbxObjectRef CreateObject( const OUString& ) override;
};
-class SbFormFactory : public SbxFactory
+class SbFormFactory final : public SbxFactory
{
public:
virtual SbxBaseRef Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
@@ -93,7 +93,7 @@ public:
};
// Factory class to create OLE objects
-class SbOLEFactory : public SbxFactory
+class SbOLEFactory final : public SbxFactory
{
public:
virtual SbxBaseRef Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
diff --git a/basic/source/inc/sbjsmeth.hxx b/basic/source/inc/sbjsmeth.hxx
index 6121d4c98f17..36e3842565e5 100644
--- a/basic/source/inc/sbjsmeth.hxx
+++ b/basic/source/inc/sbjsmeth.hxx
@@ -25,7 +25,7 @@
// All the basic-specific methods must be overridden virtually and must
// be deactivated. The differentiation of normal modules is done by RTTI.
-class SbJScriptMethod : public SbMethod
+class SbJScriptMethod final : public SbMethod
{
public:
SbJScriptMethod(SbxDataType);
diff --git a/basic/source/inc/sbjsmod.hxx b/basic/source/inc/sbjsmod.hxx
index 59be6230bbaf..128c0e243e95 100644
--- a/basic/source/inc/sbjsmod.hxx
+++ b/basic/source/inc/sbjsmod.hxx
@@ -25,7 +25,7 @@
// All the basic-specific methods must be overridden virtually and must
// be deactivated. The differentiation of normal modules is done by RTTI.
-class SbJScriptModule : public SbModule
+class SbJScriptModule final : public SbModule
{
virtual bool LoadData(SvStream&, sal_uInt16) override;
virtual bool StoreData(SvStream&) const override;
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 839f883ababb..1f3042951e51 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -61,7 +61,7 @@ public:
void setValue( const css::uno::Any& );
};
-class SbUnoStructRefObject: public SbxObject
+class SbUnoStructRefObject final : public SbxObject
{
struct caseLessComp
{
@@ -146,7 +146,7 @@ typedef tools::SvRef<SbUnoObject> SbUnoObjectRef;
void clearUnoMethods();
void clearUnoMethodsForBasic( StarBASIC const * pBasic );
-class SbUnoMethod : public SbxMethod
+class SbUnoMethod final : public SbxMethod
{
friend class SbUnoObject;
friend void clearUnoMethods();
@@ -175,7 +175,7 @@ public:
};
-class SbUnoProperty : public SbxProperty
+class SbUnoProperty final : public SbxProperty
{
friend class SbUnoObject;
friend class SbUnoStructRefObject;
@@ -201,7 +201,7 @@ public:
};
// factory class to create uno-structs per DIM AS NEW
-class SbUnoFactory : public SbxFactory
+class SbUnoFactory final : public SbxFactory
{
public:
virtual SbxBaseRef Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
@@ -209,7 +209,7 @@ public:
};
// wrapper for a uno-class
-class SbUnoClass : public SbxObject
+class SbUnoClass final : public SbxObject
{
const css::uno::Reference< css::reflection::XIdlClass > m_xClass;
@@ -237,7 +237,7 @@ SbUnoClass* findUnoClass( const OUString& rName );
// Wrapper for UNO Service
-class SbUnoService : public SbxObject
+class SbUnoService final : public SbxObject
{
const css::uno::Reference< css::reflection::XServiceTypeDescription2 > m_xServiceTypeDesc;
bool m_bNeedsInit;
@@ -258,7 +258,7 @@ public:
SbUnoService* findUnoService( const OUString& rName );
-class SbUnoServiceCtor : public SbxMethod
+class SbUnoServiceCtor final : public SbxMethod
{
friend class SbUnoService;
@@ -276,7 +276,7 @@ public:
// Wrapper for UNO Singleton
-class SbUnoSingleton : public SbxObject
+class SbUnoSingleton final : public SbxObject
{
public:
SbUnoSingleton( const OUString& aName_ );
@@ -288,7 +288,7 @@ SbUnoSingleton* findUnoSingleton( const OUString& rName );
// #105565 Special Object to wrap a strongly typed Uno Any
-class SbUnoAnyObject: public SbxObject
+class SbUnoAnyObject final : public SbxObject
{
css::uno::Any mVal;
@@ -307,7 +307,7 @@ public:
// #112509 Special SbxArray to transport named parameters for calls
// to OLEAutomation objects through the UNO OLE automation bridge
-class AutomationNamedArgsSbxArray : public SbxArray
+class AutomationNamedArgsSbxArray final : public SbxArray
{
css::uno::Sequence< OUString > maNameSeq;
public:
@@ -339,7 +339,7 @@ void clearNativeObjectWrapperVector();
// #118116 Collection object
-class BasicCollection : public SbxObject
+class BasicCollection final : public SbxObject
{
friend class SbiRuntime;
SbxArrayRef xItemArray;
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index 29a384942ad3..592c3ad9d31b 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -29,7 +29,7 @@ namespace basic
{
-class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPassword
+class SfxScriptLibraryContainer final : public SfxLibraryContainer, public OldBasicPassword
{
css::uno::Reference< css::container::XNameAccess > mxCodeNameAccess;
@@ -106,7 +106,7 @@ typedef std::unordered_map< OUString, css::script::ModuleInfo > ModuleInfoMap;
typedef ::cppu::ImplHelper1< css::script::vba::XVBAModuleInfo > SfxScriptLibrary_BASE;
-class SfxScriptLibrary : public SfxLibrary, public SfxScriptLibrary_BASE
+class SfxScriptLibrary final : public SfxLibrary, public SfxScriptLibrary_BASE
{
friend class SfxScriptLibraryContainer;
@@ -150,7 +150,7 @@ public:
static bool containsValidModule( const css::uno::Any& _rElement );
-protected:
+private:
virtual bool isLibraryElementValid(const css::uno::Any& rElement) const override;
};
diff --git a/basic/source/inc/stdobj.hxx b/basic/source/inc/stdobj.hxx
index 39b353306203..18df1fbbdda7 100644
--- a/basic/source/inc/stdobj.hxx
+++ b/basic/source/inc/stdobj.hxx
@@ -24,7 +24,7 @@
class StarBASIC;
class SbStdFactory;
-class SbiStdObject : public SbxObject
+class SbiStdObject final : public SbxObject
{
std::unique_ptr<SbStdFactory> pStdFactory;
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index d025024918c3..b8a2f6ebbaad 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -158,7 +158,7 @@ private:
};
-class SbiProcDef : public SbiSymDef { // procedure definition (from basic):
+class SbiProcDef final : public SbiSymDef { // procedure definition (from basic):
SbiSymPool aParams;
SbiSymPool aLabels; // local jump targets
OUString aLibName;
@@ -201,7 +201,7 @@ private:
};
-class SbiConstDef : public SbiSymDef
+class SbiConstDef final : public SbiSymDef
{
double nVal;
OUString aVal;