From 423936ffacb72f85b37961e4cd585fe2719799b7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 18 Oct 2016 14:42:58 +0200 Subject: loplugin:expandablemethodds in formula..framework Change-Id: I6c8b1bb3b664faa92b2dc05955c30bfd35f6dfaa Reviewed-on: https://gerrit.libreoffice.org/30015 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- formula/source/ui/dlg/ControlHelper.hxx | 8 -------- formula/source/ui/dlg/funcutl.cxx | 36 +++++---------------------------- formula/source/ui/dlg/parawin.cxx | 30 +++++---------------------- formula/source/ui/dlg/parawin.hxx | 4 ---- 4 files changed, 10 insertions(+), 68 deletions(-) (limited to 'formula/source') diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index 4fc48cc69f8d..00da7a77c8f1 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -39,7 +39,6 @@ private: protected: virtual bool PreNotify( NotifyEvent& rNEvt ) override; - void SelectionChanged(); virtual void Resize() override; virtual void GetFocus() override; @@ -101,13 +100,6 @@ private: DECL_LINK( EdFocusHdl, Control&, void ); DECL_LINK( EdModifyHdl, Edit&, void ); -protected: - - void FxClick(); - void FxFocus(); - void EdFocus(); - void EdModify(); - public: ArgInput(); diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index f1f014cebb0c..9e9777a7d6e7 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -260,48 +260,28 @@ void ArgInput::UpdateAccessibleNames() pRefBtn->SetAccessibleName(aName); } -void ArgInput::FxClick() -{ - aFxClickLink.Call(*this); -} - -void ArgInput::FxFocus() -{ - aFxFocusLink.Call(*this); -} - -void ArgInput::EdFocus() -{ - aEdFocusLink.Call(*this); -} - -void ArgInput::EdModify() -{ - aEdModifyLink.Call(*this); -} - IMPL_LINK( ArgInput, FxBtnClickHdl, Button*, pBtn, void ) { if(pBtn == pBtnFx) - FxClick(); + aFxClickLink.Call(*this); } IMPL_LINK( ArgInput, FxBtnFocusHdl, Control&, rControl, void ) { if(&rControl == pBtnFx) - FxFocus(); + aFxFocusLink.Call(*this); } IMPL_LINK( ArgInput, EdFocusHdl, Control&, rControl, void ) { if(&rControl == pEdArg) - EdFocus(); + aEdFocusLink.Call(*this); } IMPL_LINK( ArgInput, EdModifyHdl, Edit&, rEdit, void ) { if(&rEdit == pEdArg) - EdModify(); + aEdModifyLink.Call(*this); } // class EditBox @@ -341,12 +321,6 @@ void EditBox::dispose() Control::dispose(); } -// When the selection is changed this function will be called -void EditBox::SelectionChanged() -{ - aSelChangedLink.Call(*this); -} - // When the size is changed, MultiLineEdit must be adapted.. void EditBox::Resize() { @@ -411,7 +385,7 @@ IMPL_LINK_NOARG(EditBox, ChangedHdl, void*, void) if(aNewSel.Min()!=aOldSel.Min() || aNewSel.Max()!=aOldSel.Max()) { - SelectionChanged(); + aSelChangedLink.Call(*this); aOldSel=aNewSel; } } diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 51a87c187985..a6d5f413677b 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -223,7 +223,7 @@ void ParaWin::UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ) SetArgName( i, pFuncDesc->getParameterName(nRealArg) ); } if (nArg