diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-25 11:19:01 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-25 18:23:14 +0000 |
commit | 14a5131658cd25009c625fcf2472a49d9392de6c (patch) | |
tree | 492d4b9d134ee0dc34e7e4afd690d62ac6731fb9 /svx | |
parent | e5c8436ce88c4c433b736b776bab499240ffd187 (diff) |
convert Link<> to typed
Change-Id: I7fd77490ab49a18f48e248ca277bc30b5a7d2071
Reviewed-on: https://gerrit.libreoffice.org/18858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 22 | ||||
-rw-r--r-- | svx/source/inc/fmshimp.hxx | 2 |
2 files changed, 11 insertions, 13 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index b18ca4e5bf63..c82829ae8234 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -2200,24 +2200,24 @@ void FmXFormShell::ShowSelectionProperties( bool bShow ) } -IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere) +IMPL_LINK_TYPED(FmXFormShell, OnFoundData, FmFoundRecordInformation&, rfriWhere, void) { if ( impl_checkDisposed() ) - return 0; + return; - DBG_ASSERT((pfriWhere->nContext >= 0) && (pfriWhere->nContext < (sal_Int16)m_aSearchForms.size()), + DBG_ASSERT((rfriWhere.nContext >= 0) && (rfriWhere.nContext < (sal_Int16)m_aSearchForms.size()), "FmXFormShell::OnFoundData : ungueltiger Kontext !"); - Reference< XForm> xForm( m_aSearchForms.at(pfriWhere->nContext)); + Reference< XForm> xForm( m_aSearchForms.at(rfriWhere.nContext)); DBG_ASSERT(xForm.is(), "FmXFormShell::OnFoundData : ungueltige Form !"); Reference< XRowLocate> xCursor(xForm, UNO_QUERY); if (!xCursor.is()) - return 0; // was soll ich da machen ? + return; // was soll ich da machen ? // zum Datensatz try { - xCursor->moveToBookmark(pfriWhere->aPosition); + xCursor->moveToBookmark(rfriWhere.aPosition); } catch(const SQLException&) { @@ -2227,10 +2227,10 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere) LoopGrids(LoopGridsSync::FORCE_SYNC); // und zum Feld (dazu habe ich vor dem Start des Suchens die XVclComponent-Interfaces eingesammelt) - SAL_WARN_IF(static_cast<size_t>(pfriWhere->nFieldPos) >= + SAL_WARN_IF(static_cast<size_t>(rfriWhere.nFieldPos) >= m_arrSearchedControls.size(), "svx.form", "FmXFormShell::OnFoundData : invalid index!"); - SdrObject* pObject = m_arrSearchedControls.at(pfriWhere->nFieldPos); + SdrObject* pObject = m_arrSearchedControls.at(rfriWhere.nFieldPos); m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetSdrPageView()); m_pShell->GetFormView()->MarkObj(pObject, m_pShell->GetFormView()->GetSdrPageView()); @@ -2239,7 +2239,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere) Reference< XControlModel > xControlModel( pFormObject ? pFormObject->GetUnoControlModel() : Reference< XControlModel >() ); DBG_ASSERT( xControlModel.is(), "FmXFormShell::OnFoundData: invalid control!" ); if ( !xControlModel.is() ) - return 0; + return; // disable the permanent cursor for the last grid we found a record if (m_xLastGridFound.is() && (m_xLastGridFound != xControlModel)) @@ -2254,7 +2254,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere) } // wenn das Feld sich in einem GridControl befindet, muss ich dort noch in die entsprechende Spalte gehen - sal_Int32 nGridColumn = m_arrRelativeGridColumn[pfriWhere->nFieldPos]; + sal_Int32 nGridColumn = m_arrRelativeGridColumn[rfriWhere.nFieldPos]; if (nGridColumn != -1) { // dummer weise muss ich mir das Control erst wieder besorgen Reference<XControl> xControl( pFormObject ? impl_getControl( xControlModel, *pFormObject ) : Reference< XControl>() ); @@ -2279,8 +2279,6 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere) while (DatabaseSlotMap[nPos]) m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Update(DatabaseSlotMap[nPos++]); // leider geht das Update im Gegensatz zum Invalidate nur mit einzelnen Slots) - - return 0; } diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 5c78784c1ea4..521e7fb9b02a 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -464,7 +464,7 @@ public: SAL_DLLPRIVATE bool HasControlFocus() const; private: - DECL_DLLPRIVATE_LINK(OnFoundData, FmFoundRecordInformation*); + DECL_DLLPRIVATE_LINK_TYPED(OnFoundData, FmFoundRecordInformation&, void); DECL_DLLPRIVATE_LINK(OnCanceledNotFound, FmFoundRecordInformation*); DECL_DLLPRIVATE_LINK_TYPED(OnSearchContextRequest, FmSearchContext&, sal_uInt32); DECL_DLLPRIVATE_LINK_TYPED(OnTimeOut, Timer*, void); |