summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-03 10:53:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-03 11:05:15 +0100
commit9ce9011230a97f3fe4fcd2f8d761781c4300772b (patch)
tree62d6da05db98527087257f7e056e14d8e876f37a
parent8a4bcae71053b2db33d80036a0707edbe1ddb270 (diff)
loplugin:finalclasses
Change-Id: I72ffe7dbeb1558820ac4368ef551611096da0104 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basctl/source/inc/IDEComboBox.hxx14
-rw-r--r--basctl/source/inc/ObjectCatalog.hxx2
-rw-r--r--basctl/source/inc/baside3.hxx17
-rw-r--r--basctl/source/inc/basidectrlr.hxx4
-rw-r--r--basctl/source/inc/basidesh.hxx2
-rw-r--r--basctl/source/inc/bastype2.hxx7
-rw-r--r--basctl/source/inc/bastypes.hxx3
-rw-r--r--basctl/source/inc/dlged.hxx4
-rw-r--r--basctl/source/inc/dlgedfunc.hxx4
-rw-r--r--basctl/source/inc/dlgedlist.hxx4
-rw-r--r--basctl/source/inc/dlgedmod.hxx2
-rw-r--r--basctl/source/inc/dlgedobj.hxx6
-rw-r--r--basctl/source/inc/dlgedview.hxx4
-rw-r--r--basctl/source/inc/managelang.hxx4
-rw-r--r--basctl/source/inc/sbxitem.hxx2
15 files changed, 32 insertions, 47 deletions
diff --git a/basctl/source/inc/IDEComboBox.hxx b/basctl/source/inc/IDEComboBox.hxx
index a5e7008a42e9..5c5fdfc8385b 100644
--- a/basctl/source/inc/IDEComboBox.hxx
+++ b/basctl/source/inc/IDEComboBox.hxx
@@ -33,7 +33,7 @@ namespace basctl
*
* @see LibBox Class
*/
-class LibBoxControl : public SfxToolBoxControl
+class LibBoxControl final : public SfxToolBoxControl
{
public:
/*!
@@ -121,7 +121,7 @@ public:
*
* @see LibBoxControl Class
*/
-class LibBox : public DocListenerBox
+class LibBox final : public DocListenerBox
{
public:
/// @param pParent
@@ -136,11 +136,10 @@ public:
*/
void Update(const SfxStringItem* pItem);
-protected:
+private:
/// Called for setting language when user selects a language in ComboBox
virtual void Select() override;
-private:
static void ReleaseFocus();
/*!
@@ -178,7 +177,7 @@ private:
*
* @see LanguageBox Class
*/
-class LanguageBoxControl : public SfxToolBoxControl
+class LanguageBoxControl final : public SfxToolBoxControl
{
public:
/*! Macro for registering two methods
@@ -221,7 +220,7 @@ public:
*
* @see LanguageBoxControl Class
*/
-class LanguageBox : public DocListenerBox
+class LanguageBox final : public DocListenerBox
{
public:
/*!
@@ -238,7 +237,7 @@ public:
*/
void Update(const SfxStringItem* pItem);
-protected:
+private:
/// Called for setting language when user selects a language in ComboBox
virtual void Select() override;
@@ -250,7 +249,6 @@ protected:
*/
virtual bool HandleKeyInput(const KeyEvent& rKEvt) override;
-private:
/// Delete all languages from ComboBox
void ClearBox();
/// Switch interface of dialog to selected language
diff --git a/basctl/source/inc/ObjectCatalog.hxx b/basctl/source/inc/ObjectCatalog.hxx
index a5b63eef424a..8ea0cd023b67 100644
--- a/basctl/source/inc/ObjectCatalog.hxx
+++ b/basctl/source/inc/ObjectCatalog.hxx
@@ -33,7 +33,7 @@ namespace basctl
* in a tree structure which allows user to quickly select the necessary
* macro in BasicIDE.
*/
-class ObjectCatalog : public DockingWindow
+class ObjectCatalog final : public DockingWindow
{
public:
explicit ObjectCatalog(vcl::Window* pParent);
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index f5d367182d0a..3eef27cd2f63 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -45,15 +45,13 @@ class ObjectCatalog;
bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const OUString& rLibName);
-class DialogWindow: public BaseWindow
+class DialogWindow final : public BaseWindow
{
-private:
DialogWindowLayout& m_rLayout;
std::unique_ptr<DlgEditor> m_pEditor;
std::unique_ptr<SfxUndoManager> m_pUndoMgr; // never nullptr
sal_uInt16 m_nControlSlotId;
-protected:
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual void Resize() override;
virtual void dispose() override;
@@ -114,37 +112,32 @@ public:
// DialogWindowLayout
-class DialogWindowLayout : public Layout
+class DialogWindowLayout final : public Layout
{
public:
DialogWindowLayout (vcl::Window* pParent, ObjectCatalog&);
virtual ~DialogWindowLayout() override;
virtual void dispose() override;
-public:
void ShowPropertyBrowser ();
void UpdatePropertyBrowser ();
void DisablePropertyBrowser ();
-public:
// Layout:
virtual void Activating (BaseWindow&) override;
virtual void Deactivating () override;
virtual void ExecuteGlobal (SfxRequest&) override;
virtual void GetState (SfxItemSet&, unsigned nWhich) override;
virtual void UpdateDebug (bool) override {};
-protected:
- // Layout:
- virtual void OnFirstSize (tools::Long nWidth, tools::Long nHeight) override;
private:
+ // Layout:
+ virtual void OnFirstSize (tools::Long nWidth, tools::Long nHeight) override;
// dockable windows:
// object catalog (owned by Shell)
ObjectCatalog& rObjectCatalog;
// property browser (created by this, deleted by toolkit)
VclPtr<PropBrw> pPropertyBrowser;
-
-private:
void AddPropertyBrowser ();
-private:
+
friend class DialogWindow;
};
diff --git a/basctl/source/inc/basidectrlr.hxx b/basctl/source/inc/basidectrlr.hxx
index a32e1ffd94af..449ad0b4dc5e 100644
--- a/basctl/source/inc/basidectrlr.hxx
+++ b/basctl/source/inc/basidectrlr.hxx
@@ -29,7 +29,7 @@ namespace basctl
class Shell;
-class Controller :
+class Controller final :
public comphelper::OMutexAndBroadcastHelper,
public comphelper::OPropertyContainer,
public comphelper::OPropertyArrayUsageHelper<Controller>,
@@ -58,7 +58,7 @@ public:
// OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
-protected:
+private:
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
};
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 2d494cd8d4ee..e09601d65ec2 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -49,7 +49,7 @@ class TabBar;
class BaseWindow;
class LocalizationMgr;
-class Shell :
+class Shell final :
public SfxViewShell,
public DocumentEventListener
{
diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx
index e2e81a26916c..cfc916867c63 100644
--- a/basctl/source/inc/bastype2.hxx
+++ b/basctl/source/inc/bastype2.hxx
@@ -100,7 +100,7 @@ public:
LibraryLocation GetLocation() const { return m_eLocation; }
};
-class LibEntry : public DocumentEntry
+class LibEntry final : public DocumentEntry
{
private:
OUString m_aLibName;
@@ -171,7 +171,7 @@ public:
*/
-class SbTreeListBox : public DocumentEventListener
+class SbTreeListBox final : public DocumentEventListener
{
private:
std::unique_ptr<weld::TreeView> m_xControl;
@@ -180,9 +180,8 @@ private:
bool m_bFreezeOnFirstAddRemove;
BrowseMode nMode;
DocumentEventNotifier m_aNotifier;
- void SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage);
-protected:
+ void SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage);
DECL_LINK(RequestingChildrenHdl, const weld::TreeIter&, bool);
DECL_LINK(OpenCurrentHdl, weld::TreeView&, bool);
void ImpCreateLibEntries(const weld::TreeIter& rShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation);
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index e6e306a73b5a..19fe8bbe8c62 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -124,9 +124,8 @@ private:
// basctl::TabBar
// Not to be confused with ::TabBar from svtools.
-class TabBar : public ::TabBar
+class TabBar final : public ::TabBar
{
-protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void Command( const CommandEvent& rCEvt ) override;
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 82d3a14f605d..8948b75a56c3 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -57,7 +57,7 @@ class DialogWindowLayout;
class DlgEdObj;
-class DlgEdHint: public SfxHint
+class DlgEdHint final : public SfxHint
{
public:
enum Kind {
@@ -92,7 +92,7 @@ class DlgEdForm;
class DlgEdFactory;
class DlgEdFunc;
-class DlgEditor: public SfxBroadcaster
+class DlgEditor final : public SfxBroadcaster
{
public:
enum Mode {
diff --git a/basctl/source/inc/dlgedfunc.hxx b/basctl/source/inc/dlgedfunc.hxx
index 9e20f39015a8..bbb128bf3938 100644
--- a/basctl/source/inc/dlgedfunc.hxx
+++ b/basctl/source/inc/dlgedfunc.hxx
@@ -51,7 +51,7 @@ public:
// DlgEdFuncInsert
-class DlgEdFuncInsert : public DlgEdFunc
+class DlgEdFuncInsert final : public DlgEdFunc
{
public:
explicit DlgEdFuncInsert(DlgEditor& rParent);
@@ -64,7 +64,7 @@ public:
// DlgEdFuncSelect
-class DlgEdFuncSelect : public DlgEdFunc
+class DlgEdFuncSelect final : public DlgEdFunc
{
public:
explicit DlgEdFuncSelect(DlgEditor& rParent);
diff --git a/basctl/source/inc/dlgedlist.hxx b/basctl/source/inc/dlgedlist.hxx
index 373f38b1467a..5243153c6ee9 100644
--- a/basctl/source/inc/dlgedlist.hxx
+++ b/basctl/source/inc/dlgedlist.hxx
@@ -31,7 +31,7 @@ class DlgEdObj;
typedef ::cppu::WeakImplHelper<css::beans::XPropertyChangeListener> PropertyChangeListenerHelper;
-class DlgEdPropListenerImpl : public PropertyChangeListenerHelper
+class DlgEdPropListenerImpl final : public PropertyChangeListenerHelper
{
private:
DlgEdObj& rDlgEdObj;
@@ -51,7 +51,7 @@ public:
typedef ::cppu::WeakImplHelper<css::container::XContainerListener> ContainerListenerHelper;
-class DlgEdEvtContListenerImpl : public ContainerListenerHelper
+class DlgEdEvtContListenerImpl final : public ContainerListenerHelper
{
private:
DlgEdObj& rDlgEdObj;
diff --git a/basctl/source/inc/dlgedmod.hxx b/basctl/source/inc/dlgedmod.hxx
index 24a97905b1d3..885b25f2a13a 100644
--- a/basctl/source/inc/dlgedmod.hxx
+++ b/basctl/source/inc/dlgedmod.hxx
@@ -25,7 +25,7 @@ namespace basctl
{
// DlgEdModel
-class DlgEdModel : public SdrModel
+class DlgEdModel final : public SdrModel
{
friend class DlgEdPage;
diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx
index d5e29cf48caf..86fa02c696af 100644
--- a/basctl/source/inc/dlgedobj.hxx
+++ b/basctl/source/inc/dlgedobj.hxx
@@ -144,23 +144,19 @@ public:
// DlgEdForm
-class DlgEdForm: public DlgEdObj
+class DlgEdForm final : public DlgEdObj
{
friend class DlgEditor;
friend class DlgEdFactory;
-private:
DlgEditor& rDlgEditor;
std::vector<DlgEdObj*> pChildren;
-
mutable ::std::optional< css::awt::DeviceInfo > mpDeviceInfo;
-private:
explicit DlgEdForm(
SdrModel& rSdrModel,
DlgEditor&);
-protected:
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
diff --git a/basctl/source/inc/dlgedview.hxx b/basctl/source/inc/dlgedview.hxx
index 195dee840344..b8c7ce88ca2c 100644
--- a/basctl/source/inc/dlgedview.hxx
+++ b/basctl/source/inc/dlgedview.hxx
@@ -31,7 +31,7 @@ class DlgEditor;
// DlgEdView
-class DlgEdView : public SdrView
+class DlgEdView final : public SdrView
{
private:
DlgEditor& rDlgEditor;
@@ -48,7 +48,7 @@ public:
virtual void MarkListHasChanged() override;
virtual void MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) override;
-protected:
+private:
/// override to handle HitTest for some objects specially
using SdrView::CheckSingleSdrObjectHit;
virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const override;
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
index 722ec60c46ac..642bdf81daf7 100644
--- a/basctl/source/inc/managelang.hxx
+++ b/basctl/source/inc/managelang.hxx
@@ -42,7 +42,7 @@ struct LanguageEntry
extern bool localesAreEqual( const css::lang::Locale& rLocaleLeft,
const css::lang::Locale& rLocaleRight );
-class ManageLanguageDialog : public weld::GenericDialogController
+class ManageLanguageDialog final : public weld::GenericDialogController
{
private:
std::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
@@ -69,7 +69,7 @@ public:
virtual ~ManageLanguageDialog() override;
};
-class SetDefaultLanguageDialog : public weld::GenericDialogController
+class SetDefaultLanguageDialog final : public weld::GenericDialogController
{
private:
std::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx
index e5f8d65d900f..a443404e0cd6 100644
--- a/basctl/source/inc/sbxitem.hxx
+++ b/basctl/source/inc/sbxitem.hxx
@@ -34,7 +34,7 @@ enum ItemType
TYPE_METHOD
};
-class SbxItem : public SfxPoolItem
+class SbxItem final : public SfxPoolItem
{
const ScriptDocument m_aDocument;
const OUString m_aLibName;