Revert "loplugin:finalclasses"

This reverts commit 9ce9011230a97f3fe4fcd2f8d761781c4300772b.

Reason for revert: see comments in https://gerrit.libreoffice.org/c/core/+/124632

Change-Id: Ibc8b7a8c190e7a8afec793c1202dba97ac6909bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124483
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2021-11-03 13:49:58 +01:00
parent 0464b86787
commit b64efd7b29
15 changed files with 47 additions and 32 deletions

View File

@ -33,7 +33,7 @@ namespace basctl
* *
* @see LibBox Class * @see LibBox Class
*/ */
class LibBoxControl final : public SfxToolBoxControl class LibBoxControl : public SfxToolBoxControl
{ {
public: public:
/*! /*!
@ -121,7 +121,7 @@ public:
* *
* @see LibBoxControl Class * @see LibBoxControl Class
*/ */
class LibBox final : public DocListenerBox class LibBox : public DocListenerBox
{ {
public: public:
/// @param pParent /// @param pParent
@ -136,10 +136,11 @@ public:
*/ */
void Update(const SfxStringItem* pItem); void Update(const SfxStringItem* pItem);
private: protected:
/// Called for setting language when user selects a language in ComboBox /// Called for setting language when user selects a language in ComboBox
virtual void Select() override; virtual void Select() override;
private:
static void ReleaseFocus(); static void ReleaseFocus();
/*! /*!
@ -177,7 +178,7 @@ private:
* *
* @see LanguageBox Class * @see LanguageBox Class
*/ */
class LanguageBoxControl final : public SfxToolBoxControl class LanguageBoxControl : public SfxToolBoxControl
{ {
public: public:
/*! Macro for registering two methods /*! Macro for registering two methods
@ -220,7 +221,7 @@ public:
* *
* @see LanguageBoxControl Class * @see LanguageBoxControl Class
*/ */
class LanguageBox final : public DocListenerBox class LanguageBox : public DocListenerBox
{ {
public: public:
/*! /*!
@ -237,7 +238,7 @@ public:
*/ */
void Update(const SfxStringItem* pItem); void Update(const SfxStringItem* pItem);
private: protected:
/// Called for setting language when user selects a language in ComboBox /// Called for setting language when user selects a language in ComboBox
virtual void Select() override; virtual void Select() override;
@ -249,6 +250,7 @@ private:
*/ */
virtual bool HandleKeyInput(const KeyEvent& rKEvt) override; virtual bool HandleKeyInput(const KeyEvent& rKEvt) override;
private:
/// Delete all languages from ComboBox /// Delete all languages from ComboBox
void ClearBox(); void ClearBox();
/// Switch interface of dialog to selected language /// Switch interface of dialog to selected language

View File

@ -33,7 +33,7 @@ namespace basctl
* in a tree structure which allows user to quickly select the necessary * in a tree structure which allows user to quickly select the necessary
* macro in BasicIDE. * macro in BasicIDE.
*/ */
class ObjectCatalog final : public DockingWindow class ObjectCatalog : public DockingWindow
{ {
public: public:
explicit ObjectCatalog(vcl::Window* pParent); explicit ObjectCatalog(vcl::Window* pParent);

View File

@ -45,13 +45,15 @@ class ObjectCatalog;
bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const OUString& rLibName); bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const OUString& rLibName);
class DialogWindow final : public BaseWindow class DialogWindow: public BaseWindow
{ {
private:
DialogWindowLayout& m_rLayout; DialogWindowLayout& m_rLayout;
std::unique_ptr<DlgEditor> m_pEditor; std::unique_ptr<DlgEditor> m_pEditor;
std::unique_ptr<SfxUndoManager> m_pUndoMgr; // never nullptr std::unique_ptr<SfxUndoManager> m_pUndoMgr; // never nullptr
sal_uInt16 m_nControlSlotId; sal_uInt16 m_nControlSlotId;
protected:
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual void Resize() override; virtual void Resize() override;
virtual void dispose() override; virtual void dispose() override;
@ -112,32 +114,37 @@ public:
// DialogWindowLayout // DialogWindowLayout
class DialogWindowLayout final : public Layout class DialogWindowLayout : public Layout
{ {
public: public:
DialogWindowLayout (vcl::Window* pParent, ObjectCatalog&); DialogWindowLayout (vcl::Window* pParent, ObjectCatalog&);
virtual ~DialogWindowLayout() override; virtual ~DialogWindowLayout() override;
virtual void dispose() override; virtual void dispose() override;
public:
void ShowPropertyBrowser (); void ShowPropertyBrowser ();
void UpdatePropertyBrowser (); void UpdatePropertyBrowser ();
void DisablePropertyBrowser (); void DisablePropertyBrowser ();
public:
// Layout: // Layout:
virtual void Activating (BaseWindow&) override; virtual void Activating (BaseWindow&) override;
virtual void Deactivating () override; virtual void Deactivating () override;
virtual void ExecuteGlobal (SfxRequest&) override; virtual void ExecuteGlobal (SfxRequest&) override;
virtual void GetState (SfxItemSet&, unsigned nWhich) override; virtual void GetState (SfxItemSet&, unsigned nWhich) override;
virtual void UpdateDebug (bool) override {}; virtual void UpdateDebug (bool) override {};
protected:
private:
// Layout: // Layout:
virtual void OnFirstSize (tools::Long nWidth, tools::Long nHeight) override; virtual void OnFirstSize (tools::Long nWidth, tools::Long nHeight) override;
private:
// dockable windows: // dockable windows:
// object catalog (owned by Shell) // object catalog (owned by Shell)
ObjectCatalog& rObjectCatalog; ObjectCatalog& rObjectCatalog;
// property browser (created by this, deleted by toolkit) // property browser (created by this, deleted by toolkit)
VclPtr<PropBrw> pPropertyBrowser; VclPtr<PropBrw> pPropertyBrowser;
void AddPropertyBrowser ();
private:
void AddPropertyBrowser ();
private:
friend class DialogWindow; friend class DialogWindow;
}; };

View File

@ -29,7 +29,7 @@ namespace basctl
class Shell; class Shell;
class Controller final : class Controller :
public comphelper::OMutexAndBroadcastHelper, public comphelper::OMutexAndBroadcastHelper,
public comphelper::OPropertyContainer, public comphelper::OPropertyContainer,
public comphelper::OPropertyArrayUsageHelper<Controller>, public comphelper::OPropertyArrayUsageHelper<Controller>,
@ -58,7 +58,7 @@ public:
// OPropertySetHelper // OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
private: protected:
// OPropertyArrayUsageHelper // OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override; virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
}; };

View File

@ -49,7 +49,7 @@ class TabBar;
class BaseWindow; class BaseWindow;
class LocalizationMgr; class LocalizationMgr;
class Shell final : class Shell :
public SfxViewShell, public SfxViewShell,
public DocumentEventListener public DocumentEventListener
{ {

View File

@ -100,7 +100,7 @@ public:
LibraryLocation GetLocation() const { return m_eLocation; } LibraryLocation GetLocation() const { return m_eLocation; }
}; };
class LibEntry final : public DocumentEntry class LibEntry : public DocumentEntry
{ {
private: private:
OUString m_aLibName; OUString m_aLibName;
@ -171,7 +171,7 @@ public:
*/ */
class SbTreeListBox final : public DocumentEventListener class SbTreeListBox : public DocumentEventListener
{ {
private: private:
std::unique_ptr<weld::TreeView> m_xControl; std::unique_ptr<weld::TreeView> m_xControl;
@ -180,8 +180,9 @@ private:
bool m_bFreezeOnFirstAddRemove; bool m_bFreezeOnFirstAddRemove;
BrowseMode nMode; BrowseMode nMode;
DocumentEventNotifier m_aNotifier; DocumentEventNotifier m_aNotifier;
void SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage); void SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage);
protected:
DECL_LINK(RequestingChildrenHdl, const weld::TreeIter&, bool); DECL_LINK(RequestingChildrenHdl, const weld::TreeIter&, bool);
DECL_LINK(OpenCurrentHdl, weld::TreeView&, bool); DECL_LINK(OpenCurrentHdl, weld::TreeView&, bool);
void ImpCreateLibEntries(const weld::TreeIter& rShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation); void ImpCreateLibEntries(const weld::TreeIter& rShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation);

View File

@ -124,8 +124,9 @@ private:
// basctl::TabBar // basctl::TabBar
// Not to be confused with ::TabBar from svtools. // Not to be confused with ::TabBar from svtools.
class TabBar final : public ::TabBar class TabBar : public ::TabBar
{ {
protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void Command( const CommandEvent& rCEvt ) override; virtual void Command( const CommandEvent& rCEvt ) override;

View File

@ -57,7 +57,7 @@ class DialogWindowLayout;
class DlgEdObj; class DlgEdObj;
class DlgEdHint final : public SfxHint class DlgEdHint: public SfxHint
{ {
public: public:
enum Kind { enum Kind {
@ -92,7 +92,7 @@ class DlgEdForm;
class DlgEdFactory; class DlgEdFactory;
class DlgEdFunc; class DlgEdFunc;
class DlgEditor final : public SfxBroadcaster class DlgEditor: public SfxBroadcaster
{ {
public: public:
enum Mode { enum Mode {

View File

@ -51,7 +51,7 @@ public:
// DlgEdFuncInsert // DlgEdFuncInsert
class DlgEdFuncInsert final : public DlgEdFunc class DlgEdFuncInsert : public DlgEdFunc
{ {
public: public:
explicit DlgEdFuncInsert(DlgEditor& rParent); explicit DlgEdFuncInsert(DlgEditor& rParent);
@ -64,7 +64,7 @@ public:
// DlgEdFuncSelect // DlgEdFuncSelect
class DlgEdFuncSelect final : public DlgEdFunc class DlgEdFuncSelect : public DlgEdFunc
{ {
public: public:
explicit DlgEdFuncSelect(DlgEditor& rParent); explicit DlgEdFuncSelect(DlgEditor& rParent);

View File

@ -31,7 +31,7 @@ class DlgEdObj;
typedef ::cppu::WeakImplHelper<css::beans::XPropertyChangeListener> PropertyChangeListenerHelper; typedef ::cppu::WeakImplHelper<css::beans::XPropertyChangeListener> PropertyChangeListenerHelper;
class DlgEdPropListenerImpl final : public PropertyChangeListenerHelper class DlgEdPropListenerImpl : public PropertyChangeListenerHelper
{ {
private: private:
DlgEdObj& rDlgEdObj; DlgEdObj& rDlgEdObj;
@ -51,7 +51,7 @@ public:
typedef ::cppu::WeakImplHelper<css::container::XContainerListener> ContainerListenerHelper; typedef ::cppu::WeakImplHelper<css::container::XContainerListener> ContainerListenerHelper;
class DlgEdEvtContListenerImpl final : public ContainerListenerHelper class DlgEdEvtContListenerImpl : public ContainerListenerHelper
{ {
private: private:
DlgEdObj& rDlgEdObj; DlgEdObj& rDlgEdObj;

View File

@ -25,7 +25,7 @@ namespace basctl
{ {
// DlgEdModel // DlgEdModel
class DlgEdModel final : public SdrModel class DlgEdModel : public SdrModel
{ {
friend class DlgEdPage; friend class DlgEdPage;

View File

@ -144,19 +144,23 @@ public:
// DlgEdForm // DlgEdForm
class DlgEdForm final : public DlgEdObj class DlgEdForm: public DlgEdObj
{ {
friend class DlgEditor; friend class DlgEditor;
friend class DlgEdFactory; friend class DlgEdFactory;
private:
DlgEditor& rDlgEditor; DlgEditor& rDlgEditor;
std::vector<DlgEdObj*> pChildren; std::vector<DlgEdObj*> pChildren;
mutable ::std::optional< css::awt::DeviceInfo > mpDeviceInfo; mutable ::std::optional< css::awt::DeviceInfo > mpDeviceInfo;
private:
explicit DlgEdForm( explicit DlgEdForm(
SdrModel& rSdrModel, SdrModel& rSdrModel,
DlgEditor&); DlgEditor&);
protected:
virtual void NbcMove( const Size& rSize ) override; virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;

View File

@ -31,7 +31,7 @@ class DlgEditor;
// DlgEdView // DlgEdView
class DlgEdView final : public SdrView class DlgEdView : public SdrView
{ {
private: private:
DlgEditor& rDlgEditor; DlgEditor& rDlgEditor;
@ -48,7 +48,7 @@ public:
virtual void MarkListHasChanged() override; virtual void MarkListHasChanged() override;
virtual void MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) override; virtual void MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) override;
private: protected:
/// override to handle HitTest for some objects specially /// override to handle HitTest for some objects specially
using SdrView::CheckSingleSdrObjectHit; using SdrView::CheckSingleSdrObjectHit;
virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const override; virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const override;

View File

@ -42,7 +42,7 @@ struct LanguageEntry
extern bool localesAreEqual( const css::lang::Locale& rLocaleLeft, extern bool localesAreEqual( const css::lang::Locale& rLocaleLeft,
const css::lang::Locale& rLocaleRight ); const css::lang::Locale& rLocaleRight );
class ManageLanguageDialog final : public weld::GenericDialogController class ManageLanguageDialog : public weld::GenericDialogController
{ {
private: private:
std::shared_ptr<LocalizationMgr> m_xLocalizationMgr; std::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
@ -69,7 +69,7 @@ public:
virtual ~ManageLanguageDialog() override; virtual ~ManageLanguageDialog() override;
}; };
class SetDefaultLanguageDialog final : public weld::GenericDialogController class SetDefaultLanguageDialog : public weld::GenericDialogController
{ {
private: private:
std::shared_ptr<LocalizationMgr> m_xLocalizationMgr; std::shared_ptr<LocalizationMgr> m_xLocalizationMgr;

View File

@ -34,7 +34,7 @@ enum ItemType
TYPE_METHOD TYPE_METHOD
}; };
class SbxItem final : public SfxPoolItem class SbxItem : public SfxPoolItem
{ {
const ScriptDocument m_aDocument; const ScriptDocument m_aDocument;
const OUString m_aLibName; const OUString m_aLibName;