summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-15 08:13:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-16 09:11:29 +0000
commit6f1313b3d44ea54e9a331e0fc00871081fa662fe (patch)
treefa6d9b6da04daedcb63ea2a0bc8c414288ed8bc6 /sfx2
parent14bf708ef586b15dffed66ffaf524baf4d8fcbfa (diff)
convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6 Reviewed-on: https://gerrit.libreoffice.org/19405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/impldde.cxx5
-rw-r--r--sfx2/source/appl/newhelp.cxx5
-rw-r--r--sfx2/source/appl/newhelp.hxx2
-rw-r--r--sfx2/source/dialog/newstyle.cxx5
-rw-r--r--sfx2/source/dialog/passwd.cxx12
-rw-r--r--sfx2/source/doc/templatedlg.cxx8
6 files changed, 18 insertions, 19 deletions
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 044682214de4..494b730855c7 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -62,7 +62,7 @@ class SvDDELinkEditDialog : public ModalDialog
VclPtr<Edit> m_pEdDdeItem;
VclPtr<OKButton> m_pOKButton;
- DECL_LINK( EditHdl_Impl, Edit* );
+ DECL_LINK_TYPED( EditHdl_Impl, Edit&, void );
public:
SvDDELinkEditDialog( vcl::Window* pParent, SvBaseLink* );
virtual ~SvDDELinkEditDialog();
@@ -113,12 +113,11 @@ OUString SvDDELinkEditDialog::GetCmd() const
return sRet;
}
-IMPL_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit *, )
+IMPL_LINK_NOARG_TYPED( SvDDELinkEditDialog, EditHdl_Impl, Edit&, void)
{
m_pOKButton->Enable( !m_pEdDdeApp->GetText().isEmpty() &&
!m_pEdDdeTopic->GetText().isEmpty() &&
!m_pEdDdeItem->GetText().isEmpty() );
- return 0;
}
SvDDEObject::SvDDEObject()
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index f7aedbbe8511..aac1f46724fc 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -970,7 +970,7 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_
}
}
- ModifyHdl(m_pSearchED);
+ ModifyHdl(*m_pSearchED);
}
SearchTabPage_Impl::~SearchTabPage_Impl()
@@ -1088,11 +1088,10 @@ IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, OpenHdl, Button*, void)
m_pResultsLB->GetDoubleClickHdl().Call(*m_pResultsLB);
}
-IMPL_LINK_NOARG(SearchTabPage_Impl, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, ModifyHdl, Edit&, void)
{
OUString aSearchText = comphelper::string::strip(m_pSearchED->GetText(), ' ');
m_pSearchBtn->Enable(!aSearchText.isEmpty());
- return 0;
}
void SearchTabPage_Impl::ActivatePage()
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 5540ebc5a25b..660470631c04 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -217,7 +217,7 @@ private:
DECL_LINK_TYPED(SearchHdl, LinkParamNone*, void);
DECL_LINK_TYPED(ClickHdl, Button*, void);
DECL_LINK_TYPED(OpenHdl, Button*, void);
- DECL_LINK(ModifyHdl, void *);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
public:
SearchTabPage_Impl( vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index f39034f93728..29eae5c9070c 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -51,10 +51,9 @@ IMPL_LINK_NOARG_TYPED( SfxNewStyleDlg, OKHdl, ComboBox&, void )
EndDialog( RET_OK );
}
-IMPL_LINK( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
+IMPL_LINK_TYPED( SfxNewStyleDlg, ModifyHdl, Edit&, rBox, void )
{
- m_pOKBtn->Enable( !comphelper::string::remove(pBox->GetText(), ' ').isEmpty() );
- return 0;
+ m_pOKBtn->Enable( !comphelper::string::remove(rBox.GetText(), ' ').isEmpty() );
}
SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rInPool )
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 96f7c42a6dea..c5397355aebd 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -29,7 +29,12 @@
-IMPL_LINK( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit )
+IMPL_LINK_TYPED( SfxPasswordDialog, EditModifyHdl, Edit&, rEdit, void )
+{
+ ModifyHdl(&rEdit);
+}
+
+void SfxPasswordDialog::ModifyHdl(Edit* pEdit)
{
if (mbAsciiOnly && (pEdit == mpPassword1ED || pEdit == mpPassword2ED))
{
@@ -57,7 +62,6 @@ IMPL_LINK( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit )
if( mpPassword2ED->IsVisible() )
bEnable = (bEnable && (mpPassword2ED->GetText().getLength() >= mnMinLen));
mpOKBtn->Enable( bEnable );
- return 0;
}
IMPL_LINK_NOARG_TYPED(SfxPasswordDialog, OKHdl, Button*, void)
@@ -108,7 +112,7 @@ SfxPasswordDialog::SfxPasswordDialog(vcl::Window* pParent, const OUString* pGrou
mpPassword1ED->SetAccessibleName(SFX2_RESSTR(STR_PASSWD));
- Link<> aLink = LINK( this, SfxPasswordDialog, EditModifyHdl );
+ Link<Edit&,void> aLink = LINK( this, SfxPasswordDialog, EditModifyHdl );
mpPassword1ED->SetModifyHdl( aLink );
mpPassword2ED->SetModifyHdl( aLink );
mpOKBtn->SetClickHdl( LINK( this, SfxPasswordDialog, OKHdl ) );
@@ -168,7 +172,7 @@ void SfxPasswordDialog::SetMinLen( sal_uInt16 nLen )
{
mnMinLen = nLen;
SetPasswdText();
- EditModifyHdl( NULL );
+ ModifyHdl( NULL );
}
void SfxPasswordDialog::ShowMinLengthText(bool bShow)
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index c37554d5b9a3..dd6c04590bab 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -389,7 +389,7 @@ IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, ActivatePageHdl, TabControl*, void)
mpCurView->showRootRegion(); // fdo#60586 show the root region of the applied filter
if (mpSearchView->IsVisible())
- SearchUpdateHdl(NULL);
+ SearchUpdateHdl(*mpSearchEdit);
}
void SfxTemplateManagerDlg::readSettings ()
@@ -708,7 +708,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pIte
}
}
-IMPL_LINK_NOARG(SfxTemplateManagerDlg, SearchUpdateHdl)
+IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, SearchUpdateHdl, Edit&, void)
{
OUString aKeyword = mpSearchEdit->GetText();
@@ -754,8 +754,6 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, SearchUpdateHdl)
mpSearchView->Hide();
mpCurView->Show();
}
-
- return 0;
}
void SfxTemplateManagerDlg::OnRegionState (const ThumbnailViewItem *pItem)
@@ -1589,7 +1587,7 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nMenuId)
// Deselect all items and update search results
mpSearchView->deselectItems();
- SearchUpdateHdl(mpSearchEdit);
+ SearchUpdateHdl(*mpSearchEdit);
}
void SfxTemplateManagerDlg::loadRepositories()