summaryrefslogtreecommitdiff
path: root/formula/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-18 14:42:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-19 07:57:11 +0000
commit423936ffacb72f85b37961e4cd585fe2719799b7 (patch)
tree3c08c99af64762429d97bf8dcfe7cbac9c56c6ab /formula/source
parente7782a99a5b5248e3c133a7b085737ceb0ecea57 (diff)
loplugin:expandablemethodds in formula..framework
Change-Id: I6c8b1bb3b664faa92b2dc05955c30bfd35f6dfaa Reviewed-on: https://gerrit.libreoffice.org/30015 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'formula/source')
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx8
-rw-r--r--formula/source/ui/dlg/funcutl.cxx36
-rw-r--r--formula/source/ui/dlg/parawin.cxx30
-rw-r--r--formula/source/ui/dlg/parawin.hxx4
4 files changed, 10 insertions, 68 deletions
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<nArgs)
- SetArgVal(i,aParaArray[nArg]);
+ aArgInput[i].SetArgVal(aParaArray[nArg]);
}
ParaWin::~ParaWin()
@@ -398,21 +398,6 @@ void ParaWin::SetArgNameFont(sal_uInt16 no,const vcl::Font& aFont)
aArgInput[no].SetArgNameFont(aFont);
}
-void ParaWin::SetArgVal(sal_uInt16 no,const OUString& aText)
-{
- aArgInput[no].SetArgVal(aText);
-}
-
-void ParaWin::HideParaLine(sal_uInt16 no)
-{
- aArgInput[no].Hide();
-}
-
-void ParaWin::ShowParaLine(sal_uInt16 no)
-{
- aArgInput[no].Show();
-}
-
void ParaWin::SetEdFocus()
{
UpdateArgDesc(0);
@@ -492,11 +477,12 @@ void ParaWin::UpdateParas()
for ( i=0; (i<nArgs) && (i<4); i++ )
{
UpdateArgInput( nOffset, i );
- ShowParaLine(i);
+ aArgInput[i].Show();
}
}
- for ( i=nArgs; i<4; i++ ) HideParaLine(i);
+ for ( i=nArgs; i<4; i++ )
+ aArgInput[i].Hide();
}
@@ -542,12 +528,6 @@ void ParaWin::ArgumentModified()
aArgModifiedLink.Call(*this);
}
-void ParaWin::FxClick()
-{
- aFxLink.Call(*this);
-}
-
-
IMPL_LINK( ParaWin, GetFxHdl, ArgInput&, rPtr, void )
{
sal_uInt16 nOffset = GetSliderPos();
@@ -565,7 +545,7 @@ IMPL_LINK( ParaWin, GetFxHdl, ArgInput&, rPtr, void )
{
aArgInput[nEdFocus].SetArgSelection(Selection(0,SELECTION_MAX ));
nActiveLine=nEdFocus+nOffset;
- FxClick();
+ aFxLink.Call(*this);
}
}
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index 8c41581ced6a..a1c1ad6c79af 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -102,7 +102,6 @@ protected:
void SliderMoved();
void ArgumentModified();
- void FxClick();
void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, PushButton& rBtnFx,
ArgEdit& rEdArg, RefButton& rRefBtn);
@@ -114,10 +113,7 @@ protected:
void SetArgName (sal_uInt16 no,const OUString &aArg);
void SetArgNameFont (sal_uInt16 no,const vcl::Font&);
- void SetArgVal (sal_uInt16 no,const OUString &aArg);
- void HideParaLine(sal_uInt16 no);
- void ShowParaLine(sal_uInt16 no);
void UpdateArgDesc( sal_uInt16 nArg );
void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i );