diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-02 09:42:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-02 12:38:30 +0100 |
commit | 12c7643c5129e3db9200f2564793188ddb5a3917 (patch) | |
tree | f0534b2c5ecd776ec2f25e4f15857938837cd6d8 /extensions/source/propctrlr | |
parent | e335dab103f1f917c527664f8c7ff9babe5e83cb (diff) |
loplugin:finalclasses in filter,extensions
Change-Id: I2822b8c5a91feaf47466356c01728d32a85bbae9
Reviewed-on: https://gerrit.libreoffice.org/44190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source/propctrlr')
13 files changed, 32 insertions, 65 deletions
diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index dfdbefaa4e90..9ec019fe9c64 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -72,10 +72,9 @@ namespace pcr typedef std::vector< ListBoxLine > ListBoxLines; - class OBrowserListBox :public Control + class OBrowserListBox final : public Control ,public IButtonClickListener { - protected: VclPtr<Window> m_aLinesPlayground; VclPtr<ScrollBar> m_aVScroll; VclPtr<InspectorHelpWindow> m_pHelpWindow; @@ -94,7 +93,6 @@ namespace pcr ::rtl::Reference< PropertyControlContext_Impl > m_pControlContextImpl; - protected: void PositionLine( ListBoxLines::size_type _nIndex ); void UpdatePosNSize(); void UpdatePlayGround(); @@ -152,12 +150,12 @@ namespace pcr /// @throws css::uno::RuntimeException void SAL_CALL activateNextControl( const css::uno::Reference< css::inspection::XPropertyControl >& CurrentControl ); - protected: + private: // IButtonClickListener void buttonClicked( OBrowserLine* _pLine, bool _bPrimary ) override; using Window::SetHelpText; - private: + DECL_LINK( ScrollHdl, ScrollBar*, void ); /** retrieves the index of a given control in our line list @@ -198,7 +196,6 @@ namespace pcr */ long impl_getPrefererredHelpHeight(); - private: using Window::Activate; }; diff --git a/extensions/source/propctrlr/browserview.hxx b/extensions/source/propctrlr/browserview.hxx index 394d3ebf4aa4..30203162fdab 100644 --- a/extensions/source/propctrlr/browserview.hxx +++ b/extensions/source/propctrlr/browserview.hxx @@ -31,13 +31,12 @@ namespace pcr class OPropertyEditor; - class OPropertyBrowserView : public vcl::Window + class OPropertyBrowserView final : public vcl::Window { VclPtr<OPropertyEditor> m_pPropBox; sal_uInt16 m_nActivePage; Link<LinkParamNone*,void> m_aPageActivationHandler; - protected: virtual void Resize() override; virtual void GetFocus() override; virtual bool EventNotify( NotifyEvent& _rNEvt ) override; @@ -58,7 +57,7 @@ namespace pcr css::awt::Size getMinimumSize(); - protected: + private: DECL_LINK(OnPageActivation, LinkParamNone*, void); }; diff --git a/extensions/source/propctrlr/cellbindinghelper.hxx b/extensions/source/propctrlr/cellbindinghelper.hxx index 2fe8de94be89..a2f73741fed1 100644 --- a/extensions/source/propctrlr/cellbindinghelper.hxx +++ b/extensions/source/propctrlr/cellbindinghelper.hxx @@ -36,9 +36,8 @@ namespace pcr /** encapsulates functionality related to binding a form control to a spreadsheet cell */ - class CellBindingHelper + class CellBindingHelper final { - protected: css::uno::Reference< css::beans::XPropertySet > m_xControlModel; // the model we work for css::uno::Reference< css::sheet::XSpreadsheetDocument > @@ -54,7 +53,6 @@ namespace pcr const css::uno::Reference< css::frame::XModel >& _rxContextDocument ); - public: /** determines whether the given model is a spreadsheet document model <p>If this method returns <FALSE/>, you cannot instantiate a CellBindingHelper with @@ -196,7 +194,7 @@ namespace pcr css::uno::Reference< css::sheet::XSpreadsheet >& _out_rxSheet ) const; - protected: + private: /** creates an address object from a string representation of a cell address */ bool convertStringAddress( diff --git a/extensions/source/propctrlr/defaultforminspection.hxx b/extensions/source/propctrlr/defaultforminspection.hxx index e1ded25292fe..cd55848bfc09 100644 --- a/extensions/source/propctrlr/defaultforminspection.hxx +++ b/extensions/source/propctrlr/defaultforminspection.hxx @@ -30,16 +30,14 @@ namespace pcr class OPropertyInfoService; - class DefaultFormComponentInspectorModel : public ImplInspectorModel + class DefaultFormComponentInspectorModel final : public ImplInspectorModel { - private: bool m_bUseFormComponentHandlers; bool m_bConstructed; /// access to property meta data std::unique_ptr< OPropertyInfoService > m_pInfoService; - protected: virtual ~DefaultFormComponentInspectorModel() override; // XServiceInfo @@ -63,10 +61,9 @@ namespace pcr static css::uno::Reference< css::uno::XInterface > SAL_CALL Create(const css::uno::Reference< css::uno::XComponentContext >&); - public: explicit DefaultFormComponentInspectorModel( bool _bUseFormFormComponentHandlers = true ); - protected: + private: // Service constructors void createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines ); }; diff --git a/extensions/source/propctrlr/defaulthelpprovider.hxx b/extensions/source/propctrlr/defaulthelpprovider.hxx index c5181b1f2d24..702e2b7ee2a2 100644 --- a/extensions/source/propctrlr/defaulthelpprovider.hxx +++ b/extensions/source/propctrlr/defaulthelpprovider.hxx @@ -39,7 +39,7 @@ namespace pcr typedef ::cppu::WeakImplHelper < css::inspection::XPropertyControlObserver , css::lang::XInitialization > DefaultHelpProvider_Base; - class DefaultHelpProvider : public DefaultHelpProvider_Base + class DefaultHelpProvider final : public DefaultHelpProvider_Base { private: bool m_bConstructed; @@ -57,7 +57,7 @@ namespace pcr static css::uno::Reference< css::uno::XInterface > SAL_CALL Create(const css::uno::Reference< css::uno::XComponentContext >&); - protected: + private: virtual ~DefaultHelpProvider() override; // XPropertyControlObserver @@ -67,11 +67,9 @@ namespace pcr // XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; - protected: // Service constructors void create( const css::uno::Reference< css::inspection::XObjectInspectorUI >& _rxUI ); - private: static vcl::Window* impl_getVclControlWindow_nothrow( const css::uno::Reference< css::inspection::XPropertyControl >& _rxControl ); static OUString impl_getHelpText_nothrow( const css::uno::Reference< css::inspection::XPropertyControl >& _rxControl ); }; diff --git a/extensions/source/propctrlr/eventhandler.hxx b/extensions/source/propctrlr/eventhandler.hxx index 21e87766a07d..bf6582623dd1 100644 --- a/extensions/source/propctrlr/eventhandler.hxx +++ b/extensions/source/propctrlr/eventhandler.hxx @@ -73,7 +73,7 @@ namespace pcr typedef ::cppu::WeakComponentImplHelper < css::inspection::XPropertyHandler , css::lang::XServiceInfo > EventHandler_Base; - class EventHandler : public EventHandler_Base + class EventHandler final : public EventHandler_Base { private: mutable ::osl::Mutex m_aMutex; @@ -102,14 +102,13 @@ namespace pcr static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static( ); static css::uno::Reference< css::uno::XInterface > Create( const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); - protected: + private: explicit EventHandler( const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); virtual ~EventHandler() override; - protected: // XPropertyHandler overridables virtual void SAL_CALL inspect( const css::uno::Reference< css::uno::XInterface >& _rxIntrospectee ) override; virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& _rPropertyName ) override; @@ -137,7 +136,6 @@ namespace pcr virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - private: /** returns the script events associated with our introspectee @param _out_rEvents Takes, upon successful return, the events currently associated with the introspectee @@ -240,7 +238,6 @@ namespace pcr */ bool impl_filterMethod_nothrow( const EventDescription& _rEvent ) const; - private: EventHandler( const EventHandler& ) = delete; EventHandler& operator=( const EventHandler& ) = delete; }; diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx index 7e5e750ba027..2f0370c64746 100644 --- a/extensions/source/propctrlr/formmetadata.hxx +++ b/extensions/source/propctrlr/formmetadata.hxx @@ -34,10 +34,9 @@ namespace pcr //= OPropertyInfoService - class OPropertyInfoService + class OPropertyInfoService final :public IPropertyInfoService { - protected: static sal_uInt16 s_nCount; static OPropertyInfoImpl* s_pPropertyInfos; // TODO: a real structure which allows quick access by name as well as by id @@ -53,7 +52,7 @@ namespace pcr bool isComposeable( const OUString& _rPropertyName ) const; - protected: + private: static const OPropertyInfoImpl* getPropertyInfo(); static const OPropertyInfoImpl* getPropertyInfo(const OUString& _rName); diff --git a/extensions/source/propctrlr/genericpropertyhandler.hxx b/extensions/source/propctrlr/genericpropertyhandler.hxx index 6cca09093ca4..c85732fc412d 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.hxx +++ b/extensions/source/propctrlr/genericpropertyhandler.hxx @@ -53,12 +53,10 @@ namespace pcr typedef ::cppu::WeakComponentImplHelper < css::inspection::XPropertyHandler , css::lang::XServiceInfo > GenericPropertyHandler_Base; - class GenericPropertyHandler : public GenericPropertyHandler_Base + class GenericPropertyHandler final : public GenericPropertyHandler_Base { - private: mutable ::osl::Mutex m_aMutex; - private: /// the service factory for creating services css::uno::Reference< css::uno::XComponentContext > m_xContext; /// need this to keep alive as long as m_xComponent lives @@ -87,14 +85,13 @@ namespace pcr static css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static( ); static css::uno::Reference< css::uno::XInterface > Create( const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); - protected: + private: explicit GenericPropertyHandler( const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); virtual ~GenericPropertyHandler() override; - protected: // XPropertyHandler overridables virtual void SAL_CALL inspect( const css::uno::Reference< css::uno::XInterface >& _rxIntrospectee ) override; virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& _rPropertyName ) override; @@ -125,7 +122,6 @@ namespace pcr virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - private: /** ensures that ->m_aProperties is initialized @precond our mutex is locked @@ -137,7 +133,6 @@ namespace pcr ::rtl::Reference< IPropertyEnumRepresentation > impl_getEnumConverter( const css::uno::Type& _rEnumType ); - private: GenericPropertyHandler( const GenericPropertyHandler& ) = delete; GenericPropertyHandler& operator=( const GenericPropertyHandler& ) = delete; }; diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx index 5a74e9200c27..0c7adb04554f 100644 --- a/extensions/source/propctrlr/propertyeditor.hxx +++ b/extensions/source/propctrlr/propertyeditor.hxx @@ -39,7 +39,7 @@ namespace pcr //= OPropertyEditor - class OPropertyEditor : public Control + class OPropertyEditor final : public Control { private: typedef std::map< OUString, sal_uInt16 > MapStringToPageId; @@ -51,7 +51,6 @@ namespace pcr HiddenPage( sal_uInt16 _nPos, TabPage* _pPage ) : nPos( _nPos ), pPage( _pPage ) { } }; - private: VclPtr<TabControl> m_aTabControl; IPropertyLineListener* m_pListener; IPropertyControlObserver* m_pObserver; @@ -64,7 +63,6 @@ namespace pcr MapStringToPageId m_aPropertyPageIds; std::map< sal_uInt16, HiddenPage > m_aHiddenPages; - protected: void Resize() override; void GetFocus() override; @@ -112,11 +110,10 @@ namespace pcr void CommitModified(); - protected: + private: using Window::SetHelpText; using Window::Update; - private: OBrowserPage* getPage( sal_uInt16& _rPageId ); const OBrowserPage* getPage( sal_uInt16& _rPageId ) const; @@ -134,7 +131,6 @@ namespace pcr static void setHelpSectionText( OBrowserPage& _rPage, const void* _pPointerToOUString ); void setHelpLineLimits( OBrowserPage& _rPage, const void* ); - protected: DECL_LINK(OnPageDeactivate, TabControl*, bool); DECL_LINK(OnPageActivate, TabControl*, void); }; diff --git a/extensions/source/propctrlr/pushbuttonnavigation.hxx b/extensions/source/propctrlr/pushbuttonnavigation.hxx index 2ee906b0c406..5929b0854e56 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.hxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.hxx @@ -31,9 +31,8 @@ namespace pcr //= PushButtonNavigation - class PushButtonNavigation + class PushButtonNavigation final { - protected: css::uno::Reference< css::beans::XPropertySet > m_xControlModel; bool m_bIsPushButton; diff --git a/extensions/source/propctrlr/selectlabeldialog.hxx b/extensions/source/propctrlr/selectlabeldialog.hxx index e31f86a88e60..be83dc484fd0 100644 --- a/extensions/source/propctrlr/selectlabeldialog.hxx +++ b/extensions/source/propctrlr/selectlabeldialog.hxx @@ -35,7 +35,7 @@ namespace pcr // OSelectLabelDialog - class OSelectLabelDialog + class OSelectLabelDialog final :public ModalDialog { VclPtr<FixedText> m_pMainDesc; @@ -59,7 +59,7 @@ namespace pcr css::uno::Reference< css::beans::XPropertySet > GetSelected() const { return m_pNoAssignment->IsChecked() ? css::uno::Reference< css::beans::XPropertySet > () : m_xSelectedControl; } - protected: + private: sal_Int32 InsertEntries(const css::uno::Reference< css::uno::XInterface >& _xContainer, SvTreeListEntry* pContainerEntry); DECL_LINK(OnEntrySelected, SvTreeListBox*, void); diff --git a/extensions/source/propctrlr/sqlcommanddesign.hxx b/extensions/source/propctrlr/sqlcommanddesign.hxx index c562617ed1c8..fe99a7ece42c 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.hxx +++ b/extensions/source/propctrlr/sqlcommanddesign.hxx @@ -46,7 +46,7 @@ namespace pcr /** encapsulates the code for calling and managing a query design frame, used for interactively designing the Command property of a ->RowSet */ - class SQLCommandDesigner : public SQLCommandDesigner_Base + class SQLCommandDesigner final : public SQLCommandDesigner_Base { private: css::uno::Reference< css::uno::XComponentContext > m_xContext; @@ -107,14 +107,13 @@ namespace pcr */ void dispose(); - protected: + private: // XPropertyChangeListener virtual void SAL_CALL propertyChange( const css::beans::PropertyChangeEvent& evt ) override; // XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override; - protected: virtual ~SQLCommandDesigner() override; /** opens a new frame for interactively designing an SQL command @@ -164,7 +163,6 @@ namespace pcr */ bool impl_trySuspendDesigner_nothrow() const; - private: SQLCommandDesigner( const SQLCommandDesigner& ) = delete; SQLCommandDesigner& operator=( const SQLCommandDesigner& ) = delete; }; diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx index b4fdb34e1196..1a48386a73b9 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -110,9 +110,8 @@ namespace pcr //= OEditControl typedef CommonBehaviourControl< css::inspection::XPropertyControl, Edit > OEditControl_Base; - class OEditControl : public OEditControl_Base + class OEditControl final : public OEditControl_Base { - protected: bool m_bIsPassword : 1; public: @@ -123,7 +122,7 @@ namespace pcr virtual void SAL_CALL setValue( const css::uno::Any& _value ) override; virtual css::uno::Type SAL_CALL getValueType() override; - protected: + private: // CommonBehaviourControlHelper::modified virtual void setModified() override; }; @@ -175,9 +174,8 @@ namespace pcr //= OHyperlinkControl typedef CommonBehaviourControl< css::inspection::XHyperlinkControl, HyperlinkInput > OHyperlinkControl_Base; - class OHyperlinkControl : public OHyperlinkControl_Base + class OHyperlinkControl final : public OHyperlinkControl_Base { - private: ::comphelper::OInterfaceContainerHelper2 m_aActionListeners; public: @@ -192,11 +190,10 @@ namespace pcr virtual void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& listener ) override; virtual void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& listener ) override; - protected: + private: // XComponent virtual void SAL_CALL disposing() override; - protected: DECL_LINK( OnHyperlinkClicked, void*, void ); }; @@ -310,7 +307,7 @@ namespace pcr //= OComboboxControl typedef CommonBehaviourControl< css::inspection::XStringListControl, ComboBox > OComboboxControl_Base; - class OComboboxControl : public OComboboxControl_Base + class OComboboxControl final : public OComboboxControl_Base { public: OComboboxControl( vcl::Window* pParent, WinBits nWinStyle ); @@ -326,7 +323,7 @@ namespace pcr virtual void SAL_CALL appendListEntry( const OUString& NewEntry ) override; virtual css::uno::Sequence< OUString > SAL_CALL getListEntries( ) override; - protected: + private: DECL_LINK( OnEntrySelected, ComboBox&, void ); }; @@ -344,9 +341,8 @@ namespace pcr class OMultilineFloatingEdit; /** an Edit field which can be used as ControlWindow, and has a drop-down button */ - class DropDownEditControl : public Edit + class DropDownEditControl final : public Edit { - private: VclPtr<OMultilineFloatingEdit> m_pFloatingEdit; VclPtr<MultiLineEdit> m_pImplEdit; VclPtr<PushButton> m_pDropdownButton; @@ -370,15 +366,13 @@ namespace pcr StlSyntaxSequence< OUString > GetStringListValue() const; - protected: + private: // Window overridables virtual bool PreNotify( NotifyEvent& rNEvt ) override; virtual void Resize() override; - protected: long FindPos(long nSinglePos); - private: DECL_LINK( ReturnHdl, FloatingWindow*, void ); DECL_LINK( DropDownHdl, Button*, void ); |