From 6bdfb757338118778b622b401d16606cf96caca6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 13 Oct 2016 15:31:05 +0200 Subject: loplugin:mergeclasses merge svx::ISlotInvalidator with svx::FmTextControlShell Change-Id: I828ef52bc093d3fa2946f813a2dd09ac6b34e94c --- svx/source/form/fmtextcontrolfeature.cxx | 3 ++- svx/source/inc/fmslotinvalidator.hxx | 9 --------- svx/source/inc/fmtextcontrolfeature.hxx | 5 +++-- svx/source/inc/fmtextcontrolshell.hxx | 7 ++----- 4 files changed, 7 insertions(+), 17 deletions(-) (limited to 'svx') diff --git a/svx/source/form/fmtextcontrolfeature.cxx b/svx/source/form/fmtextcontrolfeature.cxx index 75ff5755f604..feea0056f88b 100644 --- a/svx/source/form/fmtextcontrolfeature.cxx +++ b/svx/source/form/fmtextcontrolfeature.cxx @@ -18,6 +18,7 @@ */ #include "fmtextcontrolfeature.hxx" +#include "fmtextcontrolshell.hxx" #include @@ -31,7 +32,7 @@ namespace svx using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; - FmTextControlFeature::FmTextControlFeature( const Reference< XDispatch >& _rxDispatcher, const URL& _rFeatureURL, SfxSlotId _nSlotId, ISlotInvalidator* _pInvalidator ) + FmTextControlFeature::FmTextControlFeature( const Reference< XDispatch >& _rxDispatcher, const URL& _rFeatureURL, SfxSlotId _nSlotId, FmTextControlShell* _pInvalidator ) :m_xDispatcher ( _rxDispatcher ) ,m_aFeatureURL ( _rFeatureURL ) ,m_nSlotId ( _nSlotId ) diff --git a/svx/source/inc/fmslotinvalidator.hxx b/svx/source/inc/fmslotinvalidator.hxx index 783e7263c2b6..024c4b8bc0d7 100644 --- a/svx/source/inc/fmslotinvalidator.hxx +++ b/svx/source/inc/fmslotinvalidator.hxx @@ -23,15 +23,6 @@ namespace svx { typedef sal_uInt16 SfxSlotId; - - class ISlotInvalidator - { - public: - virtual void Invalidate( SfxSlotId _nSlot ) = 0; - - protected: - ~ISlotInvalidator() {} - }; } #endif // INCLUDED_SVX_SOURCE_INC_FMSLOTINVALIDATOR_HXX diff --git a/svx/source/inc/fmtextcontrolfeature.hxx b/svx/source/inc/fmtextcontrolfeature.hxx index 6c208f67e231..a0d465c4007d 100644 --- a/svx/source/inc/fmtextcontrolfeature.hxx +++ b/svx/source/inc/fmtextcontrolfeature.hxx @@ -30,6 +30,7 @@ namespace svx { + class FmTextControlShell; typedef ::cppu::WeakImplHelper < css::frame::XStatusListener > FmTextControlFeature_Base; @@ -42,7 +43,7 @@ namespace svx css::util::URL m_aFeatureURL; css::uno::Any m_aFeatureState; SfxSlotId m_nSlotId; - ISlotInvalidator* m_pInvalidator; + FmTextControlShell* m_pInvalidator; bool m_bFeatureEnabled; public: @@ -56,7 +57,7 @@ namespace svx const css::uno::Reference< css::frame::XDispatch >& _rxDispatcher, const css::util::URL& _rFeatureURL, SfxSlotId _nId, - ISlotInvalidator* _pInvalidator + FmTextControlShell* _pInvalidator ); /// determines whether the feature we're responsible for is currently enabled diff --git a/svx/source/inc/fmtextcontrolshell.hxx b/svx/source/inc/fmtextcontrolshell.hxx index 9b8801e65ab4..6a7fccbed3c8 100644 --- a/svx/source/inc/fmtextcontrolshell.hxx +++ b/svx/source/inc/fmtextcontrolshell.hxx @@ -74,7 +74,6 @@ namespace svx }; class FmTextControlShell :public IFocusObserver - ,public ISlotInvalidator ,public IContextRequestObserver { private: @@ -136,6 +135,8 @@ namespace svx */ void designModeChanged( bool _bNewDesignMode ); + void Invalidate( SfxSlotId _nSlot ); + protected: // IFocusObserver virtual void focusGained( const css::awt::FocusEvent& _rEvent ) override; @@ -144,10 +145,6 @@ namespace svx // IContextRequestObserver virtual void contextMenuRequested( const css::awt::MouseEvent& _rEvent ) override; - // ISlotInvalidator - virtual void Invalidate( SfxSlotId _nSlot ) override; - - protected: enum AttributeSet { eCharAttribs, eParaAttribs }; void executeAttributeDialog( AttributeSet _eSet, SfxRequest& _rReq ); void executeSelectAll( ); -- cgit