cui/source/options/connpooloptions.cxx | 12 ++++-------- cui/source/options/connpooloptions.hxx | 4 +++- 2 files changed, 7 insertions(+), 9 deletions(-)
New commits: commit c70a4cfac88ae28a4ae2408ad3557f7fc08dce94 Author: Noel Grandin <noelgran...@gmail.com> Date: Fri Sep 25 13:35:26 2015 +0200 convert Link<> to typed Change-Id: Ib6b97395a465299988766d6a795a03ecaef50d51 Reviewed-on: https://gerrit.libreoffice.org/18861 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 21e5b51..16a7ea5 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 124a797..624b266 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits