summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-09-25 11:19:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-09-25 18:23:14 +0000
commit14a5131658cd25009c625fcf2472a49d9392de6c (patch)
tree492d4b9d134ee0dc34e7e4afd690d62ac6731fb9
parentconvert Link<> to typed (diff)
downloadcore-14a5131658cd25009c625fcf2472a49d9392de6c.tar.gz
core-14a5131658cd25009c625fcf2472a49d9392de6c.zip
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>
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx2
-rw-r--r--cui/source/factory/dlgfact.cxx2
-rw-r--r--cui/source/factory/dlgfact.hxx3
-rw-r--r--cui/source/inc/cuifmsearch.hxx4
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx10
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx2
-rw-r--r--include/svx/svxdlg.hxx3
-rw-r--r--svx/source/form/fmshimp.cxx22
-rw-r--r--svx/source/inc/fmshimp.hxx2
9 files changed, 24 insertions, 26 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index b0d80cf2ba40..bb410ac5b460 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -696,7 +696,7 @@ void FmSearchDialog::OnFound(const css::uno::Any& aCursorPos, sal_Int16 nFieldPo
// this of course implies that I have really searched in the field that is selected in the listbox,
// which is made sure in RebuildUsedFields
- m_lnkFoundHandler.Call(&friInfo);
+ m_lnkFoundHandler.Call(friInfo);
m_pcmbSearchText->GrabFocus();
}
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 426fe2868abf..5b00fd1e0864 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -694,7 +694,7 @@ bool AbstractSvxHpLinkDlg_Impl::QueryClose()
}
-void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link<>& lnk)
+void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk)
{
pDlg->SetFoundHandler(lnk);
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index f7d9e6bd7bfb..2fd4ebf42954 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -389,10 +389,11 @@ class AbstractSvxHpLinkDlg_Impl :public AbstractSvxHpLinkDlg
};
class FmSearchDialog;
+struct FmFoundRecordInformation;
class AbstractFmSearchDialog_Impl :public AbstractFmSearchDialog
{
DECL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl,FmSearchDialog)
- virtual void SetFoundHandler(const Link<>& lnk) SAL_OVERRIDE ;
+ virtual void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) SAL_OVERRIDE ;
virtual void SetCanceledNotFoundHdl(const Link<>& lnk) SAL_OVERRIDE;
virtual void SetActiveField(const OUString& strField) SAL_OVERRIDE;
};
diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx
index c41ea5c886e3..c52fd387cdf9 100644
--- a/cui/source/inc/cuifmsearch.hxx
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -78,7 +78,7 @@ class FmSearchDialog : public ModalDialog
VclPtr<vcl::Window> m_pPreSearchFocus;
- Link<> m_lnkFoundHandler; ///< Handler for "found"
+ Link<FmFoundRecordInformation&,void> m_lnkFoundHandler; ///< Handler for "found"
Link<> m_lnkCanceledNotFoundHdl; ///< Handler for Positioning the Cursors
Link<FmSearchContext&,sal_uInt32> m_lnkContextSupplier; ///< for search in contexts
@@ -119,7 +119,7 @@ public:
This handler MUST be set.
Furthermore, it should be considered, that during the handler the search-dialog is still modal.
*/
- void SetFoundHandler(const Link<>& lnk) { m_lnkFoundHandler = lnk; }
+ void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) { m_lnkFoundHandler = lnk; }
/**
If the search has been cancelled or has been finished without success, the current data set is always displayed in the
search dialog. This handler exists to make this synchronous with the possible display of the caller (it does not
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 8783d3114b32..10fbab45ed52 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2369,13 +2369,13 @@ IMPL_LINK_TYPED(SbaXDataBrowserController, OnSearchContextRequest, FmSearchConte
return rContext.arrFields.size();
}
-IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pInfo)
+IMPL_LINK_TYPED(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation&, rInfo, void)
{
Reference< css::sdbcx::XRowLocate > xCursor(getRowSet(), UNO_QUERY);
OSL_ENSURE(xCursor.is(), "SbaXDataBrowserController::OnFoundData : xCursor is empty");
// move the cursor
- xCursor->moveToBookmark(pInfo->aPosition);
+ xCursor->moveToBookmark(rInfo.aPosition);
// let the grid snyc it's display with the cursor
Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY);
@@ -2393,8 +2393,8 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn
Reference< XInterface > xCurrent(aColumnControls->getByIndex(nViewPos),UNO_QUERY);
if (IsSearchableControl(xCurrent))
{
- if (pInfo->nFieldPos)
- --pInfo->nFieldPos;
+ if (rInfo.nFieldPos)
+ --rInfo.nFieldPos;
else
break;
}
@@ -2402,8 +2402,6 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn
Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
xGrid->setCurrentColumnPosition(nViewPos);
-
- return 0;
}
IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformation*, pInfo)
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 8bcab45a054a..e340c0426891 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -332,7 +332,7 @@ namespace dbaui
// search callbacks
DECL_LINK_TYPED(OnSearchContextRequest, FmSearchContext&, sal_uInt32);
- DECL_LINK(OnFoundData, FmFoundRecordInformation*);
+ DECL_LINK_TYPED(OnFoundData, FmFoundRecordInformation&, void);
DECL_LINK(OnCanceledNotFound, FmFoundRecordInformation*);
DECL_LINK_TYPED( OnAsyncGetCellFocus, void*, void );
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 0fb8845a39d3..30f0dacfa18b 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -198,10 +198,11 @@ public:
virtual bool QueryClose() = 0;
};
+struct FmFoundRecordInformation;
class AbstractFmSearchDialog :public VclAbstractDialog
{
public:
- virtual void SetFoundHandler(const Link<>& lnk) = 0;
+ virtual void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) = 0;
virtual void SetCanceledNotFoundHdl(const Link<>& lnk)=0;
virtual void SetActiveField(const OUString& strField)=0;
};
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);