Kaydet (Commit) c70a4cfa authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: Ib6b97395a465299988766d6a795a03ecaef50d51
Reviewed-on: https://gerrit.libreoffice.org/18861Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst da764e86
......@@ -43,7 +43,7 @@ namespace offapp
OUString m_sYes;
OUString m_sNo;
Link<> m_aRowChangeHandler;
Link<const DriverPooling*,void> m_aRowChangeHandler;
public:
explicit DriverListControl(vcl::Window* _pParent);
......@@ -54,7 +54,7 @@ namespace offapp
// the handler will be called with a DriverPoolingSettings::const_iterator as parameter,
// or NULL if no valid current row exists
void SetRowChangeHandler(const Link<>& _rHdl) { m_aRowChangeHandler = _rHdl; }
void SetRowChangeHandler(const Link<const DriverPooling*,void>& _rHdl) { m_aRowChangeHandler = _rHdl; }
DriverPooling* getCurrentRow();
void updateCurrentRow();
......@@ -413,9 +413,9 @@ namespace offapp
}
IMPL_LINK( ConnectionPoolOptionsPage, OnDriverRowChanged, const void*, _pRowIterator )
IMPL_LINK_TYPED( ConnectionPoolOptionsPage, OnDriverRowChanged, const DriverPooling*, pDriverPos, void )
{
bool bValidRow = (NULL != _pRowIterator);
bool bValidRow = (NULL != pDriverPos);
m_pDriverPoolingEnabled->Enable(bValidRow && m_pEnablePooling->IsChecked());
m_pTimeoutLabel->Enable(bValidRow);
m_pTimeout->Enable(bValidRow);
......@@ -426,16 +426,12 @@ namespace offapp
}
else
{
const DriverPooling *pDriverPos = static_cast<const DriverPooling*>(_pRowIterator);
m_pDriver->SetText(pDriverPos->sName);
m_pDriverPoolingEnabled->Check(pDriverPos->bEnabled);
m_pTimeout->SetText(OUString::number(pDriverPos->nTimeoutSeconds));
OnEnabledDisabled(m_pDriverPoolingEnabled);
}
return 0L;
}
......
......@@ -27,9 +27,11 @@
#include <vcl/field.hxx>
#include <svx/databaseregistrationui.hxx>
namespace offapp
{
struct DriverPooling;
class DriverListControl;
class ConnectionPoolOptionsPage : public SfxTabPage
{
......@@ -60,7 +62,7 @@ namespace offapp
protected:
DECL_LINK_TYPED( OnEnabledDisabled, Button*, void );
DECL_LINK( OnDriverRowChanged, const void* );
DECL_LINK_TYPED( OnDriverRowChanged, const DriverPooling*, void );
void implInitControls(const SfxItemSet& _rSet, bool _bFromReset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment