diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-25 13:35:26 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-26 05:28:46 +0000 |
commit | c70a4cfac88ae28a4ae2408ad3557f7fc08dce94 (patch) | |
tree | f8b21dc9220c93fe32684673afe3ab0ac494cca3 /cui/source | |
parent | da764e8612599eaaaed068941939adb08d23b5db (diff) |
convert Link<> to typed
Change-Id: Ib6b97395a465299988766d6a795a03ecaef50d51
Reviewed-on: https://gerrit.libreoffice.org/18861
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/connpooloptions.cxx | 12 | ||||
-rw-r--r-- | cui/source/options/connpooloptions.hxx | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 21e5b51c776b..16a7ea5e4871 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -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; } diff --git a/cui/source/options/connpooloptions.hxx b/cui/source/options/connpooloptions.hxx index 124a7971c9b4..624b266e72a0 100644 --- a/cui/source/options/connpooloptions.hxx +++ b/cui/source/options/connpooloptions.hxx @@ -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); |