diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-12 14:35:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-13 10:07:50 +0200 |
commit | ec20e65469924868fdc02960ef3ed07b245c9c18 (patch) | |
tree | d87da7d288c48b44ec06f9df267ebbdac09b4e01 /extensions | |
parent | 38b4b7590d520fb53fabc40c5c95346546b2fdc3 (diff) |
loplugin:mergeclasses, merge IControlContext with OBrowserListBox
Change-Id: Ib3e54c9fe8d9445ad799e4b06c41443093af87fb
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 12 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.hxx | 27 |
2 files changed, 12 insertions, 27 deletions
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 72de87e075d2..98b4a43ed803 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -131,15 +131,15 @@ namespace pcr }; private: - IControlContext* m_pContext; - NotificationMode m_eMode; + VclPtr<OBrowserListBox> m_pContext; + NotificationMode m_eMode; public: /** creates an instance @param _rContextImpl the instance to delegate events to */ - PropertyControlContext_Impl( IControlContext& _rContextImpl ); + PropertyControlContext_Impl( OBrowserListBox& _rContextImpl ); /** disposes the context. @@ -150,7 +150,7 @@ namespace pcr void SAL_CALL dispose(); /** sets the notification mode, so that notifications received from the controls are - forwarded to our IControlContext either synchronously or asynchronously + forwarded to our OBrowserListBox either synchronously or asynchronously @param _eMode the new notification mode */ @@ -172,7 +172,7 @@ namespace pcr virtual void processEvent( const ::comphelper::AnyEvent& _rEvent ) override; private: - /** processes the given event, i.e. notifies it to our IControlContext + /** processes the given event, i.e. notifies it to our OBrowserListBox @param _rEvent the event no notify @precond @@ -200,7 +200,7 @@ namespace pcr }; - PropertyControlContext_Impl::PropertyControlContext_Impl( IControlContext& _rContextImpl ) + PropertyControlContext_Impl::PropertyControlContext_Impl( OBrowserListBox& _rContextImpl ) :m_pContext( &_rContextImpl ) ,m_eMode( eAsynchronously ) { diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index 041011478249..8bfa46708815 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -69,22 +69,8 @@ namespace pcr typedef ::std::vector< ListBoxLine > ListBoxLines; - /** non-UNO version of XPropertyControlContext - */ - class SAL_NO_VTABLE IControlContext - { - public: - virtual void SAL_CALL focusGained( const css::uno::Reference< css::inspection::XPropertyControl >& Control ) throw (css::uno::RuntimeException) = 0; - virtual void SAL_CALL valueChanged( const css::uno::Reference< css::inspection::XPropertyControl >& Control ) throw (css::uno::RuntimeException) = 0; - virtual void SAL_CALL activateNextControl( const css::uno::Reference< css::inspection::XPropertyControl >& CurrentControl ) throw (css::uno::RuntimeException) = 0; - - protected: - ~IControlContext() {} - }; - class OBrowserListBox :public Control ,public IButtonClickListener - ,public IControlContext ,public PcrClient { protected: @@ -156,15 +142,14 @@ namespace pcr sal_Int32 GetMinimumHeight(); - bool IsModified( ) const; - void CommitModified( ); + bool IsModified( ) const; + void CommitModified( ); - protected: - // IControlContext - virtual void SAL_CALL focusGained( const css::uno::Reference< css::inspection::XPropertyControl >& Control ) throw (css::uno::RuntimeException) override; - virtual void SAL_CALL valueChanged( const css::uno::Reference< css::inspection::XPropertyControl >& Control ) throw (css::uno::RuntimeException) override; - virtual void SAL_CALL activateNextControl( const css::uno::Reference< css::inspection::XPropertyControl >& CurrentControl ) throw (css::uno::RuntimeException) override; + void SAL_CALL focusGained( const css::uno::Reference< css::inspection::XPropertyControl >& Control ) throw (css::uno::RuntimeException); + void SAL_CALL valueChanged( const css::uno::Reference< css::inspection::XPropertyControl >& Control ) throw (css::uno::RuntimeException); + void SAL_CALL activateNextControl( const css::uno::Reference< css::inspection::XPropertyControl >& CurrentControl ) throw (css::uno::RuntimeException); + protected: // IButtonClickListener void buttonClicked( OBrowserLine* _pLine, bool _bPrimary ) override; |