summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-17 08:43:56 +0200
committerNoel Grandin <noel@peralex.com>2015-09-17 12:22:46 +0200
commit56de0d310f4b31fd4501460344b7e8f4458a53ee (patch)
tree7c5c5d4d5f31b547bedac4ed15ec4fc0bc4b55a3 /dbaccess
parent02fd846d2350fd57b0270cd85e475784d9cfa8fd (diff)
convert Link<> to typed
Change-Id: Iff53217807be85cbcd5f850739f8b0949521fca2
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx23
-rw-r--r--dbaccess/source/ui/inc/indexdialog.hxx18
2 files changed, 20 insertions, 21 deletions
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 8f5df59ef519..19c4dafab378 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -120,7 +120,7 @@ namespace dbaui
bool bValid = true;
if (m_aEndEditHdl.IsSet())
- bValid = (0 != m_aEndEditHdl.Call(_pEntry));
+ bValid = m_aEndEditHdl.Call(_pEntry);
if (bValid)
return true;
@@ -154,7 +154,7 @@ namespace dbaui
bool bReturn = SvTreeListBox::Select(pEntry, _bSelect);
if (m_aSelectHdl.IsSet() && !m_bSuspendSelectHdl && _bSelect)
- m_aSelectHdl.Call(this);
+ m_aSelectHdl.Call(*this);
return bReturn;
}
@@ -304,7 +304,7 @@ namespace dbaui
pNewEntry->SetUserData(reinterpret_cast< void* >(sal_Int32(aIndexLoop - m_pIndexes->begin())));
}
- OnIndexSelected(m_pIndexList);
+ OnIndexSelected(*m_pIndexList);
}
DbaIndexDialog::~DbaIndexDialog( )
@@ -403,7 +403,7 @@ namespace dbaui
// select the entry and start in-place editing
m_pIndexList->SelectNoHandlerCall(pNewEntry);
- OnIndexSelected(m_pIndexList);
+ OnIndexSelected(*m_pIndexList);
m_pIndexList->EditEntry(pNewEntry);
updateToolbox();
}
@@ -477,7 +477,7 @@ namespace dbaui
// the Remove automatically selected another entry (if possible), but we disabled the calling of the handler
// to prevent that we missed something ... call the handler directly
- OnIndexSelected(m_pIndexList);
+ OnIndexSelected(*m_pIndexList);
}
return !aExceptionInfo.isValid();
@@ -610,7 +610,7 @@ namespace dbaui
m_pIndexList->EditEntry(_pEntry);
}
- IMPL_LINK( DbaIndexDialog, OnEntryEdited, SvTreeListEntry*, _pEntry )
+ IMPL_LINK_TYPED( DbaIndexDialog, OnEntryEdited, SvTreeListEntry*, _pEntry, bool )
{
Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData());
@@ -630,7 +630,7 @@ namespace dbaui
updateToolbox();
m_bEditAgain = true;
PostUserEvent(LINK(this, DbaIndexDialog, OnEditIndexAgain), _pEntry, true);
- return 0L;
+ return false;
}
aPosition->sName = sNewName;
@@ -640,7 +640,7 @@ namespace dbaui
{
updateToolbox();
// no commitment needed here ....
- return 1L;
+ return true;
}
if (aPosition->sName != aPosition->getOriginalName())
@@ -649,7 +649,7 @@ namespace dbaui
updateToolbox();
}
- return 1L;
+ return true;
}
bool DbaIndexDialog::implSaveModified(bool _bPlausibility)
@@ -775,7 +775,7 @@ namespace dbaui
}
}
- IMPL_LINK( DbaIndexDialog, OnIndexSelected, DbaIndexList*, /*NOTINTERESTEDIN*/ )
+ IMPL_LINK_NOARG_TYPED( DbaIndexDialog, OnIndexSelected, DbaIndexList&, void )
{
m_pIndexList->EndSelection();
@@ -788,7 +788,7 @@ namespace dbaui
if (!implCommitPreviouslySelected())
{
m_pIndexList->SelectNoHandlerCall(m_pPreviousSelection);
- return 1L;
+ return;
}
}
@@ -809,7 +809,6 @@ namespace dbaui
m_pPreviousSelection = pNewSelection;
updateToolbox();
- return 0L;
}
void DbaIndexDialog::StateChanged( StateChangedType nType )
{
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
index 3bcdc37a6465..1519113fc344 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -43,18 +43,18 @@ namespace dbaui
{
protected:
css::uno::Reference< css::sdbc::XConnection > m_xConnection;
- Link<> m_aSelectHdl;
- Link<> m_aEndEditHdl;
- bool m_bSuspendSelectHdl;
+ Link<DbaIndexList&,void> m_aSelectHdl;
+ Link<SvTreeListEntry*,bool> m_aEndEditHdl;
+ bool m_bSuspendSelectHdl;
public:
DbaIndexList(vcl::Window* _pParent, WinBits nWinBits);
- void SetSelectHdl(const Link<>& _rHdl) { m_aSelectHdl = _rHdl; }
- Link<> GetSelectHdl() const { return m_aSelectHdl; }
+ void SetSelectHdl(const Link<DbaIndexList&,void>& _rHdl) { m_aSelectHdl = _rHdl; }
+ Link<DbaIndexList&,void> GetSelectHdl() const { return m_aSelectHdl; }
- void SetEndEditHdl(const Link<>& _rHdl) { m_aEndEditHdl = _rHdl; }
- Link<> GetEndEditHdl() const { return m_aEndEditHdl; }
+ void SetEndEditHdl(const Link<SvTreeListEntry*,bool>& _rHdl) { m_aEndEditHdl = _rHdl; }
+ Link<SvTreeListEntry*,bool> GetEndEditHdl() const { return m_aEndEditHdl; }
virtual bool Select(SvTreeListEntry* pEntry, bool bSelect) SAL_OVERRIDE;
@@ -130,9 +130,9 @@ namespace dbaui
void updateControls(const SvTreeListEntry* _pEntry);
protected:
- DECL_LINK( OnIndexSelected, DbaIndexList* );
+ DECL_LINK_TYPED( OnIndexSelected, DbaIndexList&, void );
DECL_LINK_TYPED( OnIndexAction, ToolBox*, void );
- DECL_LINK( OnEntryEdited, SvTreeListEntry* );
+ DECL_LINK_TYPED( OnEntryEdited, SvTreeListEntry*, bool );
DECL_LINK_TYPED( OnModifiedClick, Button*, void );
DECL_LINK( OnModified, void* );
DECL_LINK_TYPED( OnCloseDialog, Button*, void );