dbaccess/source/ui/app/AppDetailPageHelper.cxx | 19 - dbaccess/source/ui/app/AppDetailPageHelper.hxx | 12 dbaccess/source/ui/browser/dbtreeview.cxx | 6 dbaccess/source/ui/browser/dbtreeview.hxx | 11 dbaccess/source/ui/browser/dsbrowserDnD.cxx | 3 dbaccess/source/ui/browser/unodatbr.cxx | 12 dbaccess/source/ui/control/dbtreelistbox.cxx | 9 dbaccess/source/ui/control/sqledit.cxx | 1 dbaccess/source/ui/dlg/indexdialog.cxx | 23 - dbaccess/source/ui/inc/dbtreelistbox.hxx | 36 +- dbaccess/source/ui/inc/indexdialog.hxx | 18 - dbaccess/source/ui/inc/sqledit.hxx | 7 dbaccess/source/ui/inc/unodatbr.hxx | 6 extensions/source/plugin/inc/plugin/unx/mediator.hxx | 16 - extensions/source/plugin/inc/plugin/unx/plugcon.hxx | 2 extensions/source/plugin/unx/nppapi.cxx | 5 extensions/source/plugin/unx/npwrap.cxx | 274 ++++++++----------- extensions/source/propctrlr/browserview.cxx | 3 extensions/source/propctrlr/browserview.hxx | 10 extensions/source/propctrlr/formcomponenthandler.cxx | 4 extensions/source/propctrlr/formcomponenthandler.hxx | 2 extensions/source/propctrlr/propcontroller.cxx | 3 extensions/source/propctrlr/propcontroller.hxx | 2 extensions/source/propctrlr/propertyeditor.hxx | 4 extensions/source/propctrlr/sqlcommanddesign.cxx | 4 extensions/source/propctrlr/sqlcommanddesign.hxx | 4 extensions/source/scanner/sane.cxx | 2 extensions/source/scanner/sane.hxx | 8 extensions/source/scanner/sanedlg.cxx | 5 extensions/source/scanner/sanedlg.hxx | 8 forms/source/component/ImageControl.cxx | 3 forms/source/component/ImageControl.hxx | 2 forms/source/component/clickableimage.cxx | 3 forms/source/component/clickableimage.hxx | 2 forms/source/component/imgprod.hxx | 10 formula/source/ui/dlg/ControlHelper.hxx | 31 -- formula/source/ui/dlg/formula.cxx | 57 +-- formula/source/ui/dlg/funcpage.cxx | 4 formula/source/ui/dlg/funcpage.hxx | 17 - formula/source/ui/dlg/funcutl.cxx | 39 -- formula/source/ui/dlg/parawin.cxx | 26 - formula/source/ui/dlg/parawin.hxx | 20 - formula/source/ui/dlg/structpg.cxx | 2 formula/source/ui/dlg/structpg.hxx | 6 44 files changed, 318 insertions(+), 423 deletions(-)
New commits: commit c7fe6e7ed06c9cb2517cbc81740d97a931845adc Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:51:43 2015 +0200 convert Link<> to typed Change-Id: I70de366349801fed36fb5d62bc53236efa8b6967 diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index a435d1c..33c3d97 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -130,7 +130,7 @@ public: DECL_LINK_TYPED( BtnHdl, Button*, void ); DECL_LINK_TYPED( DblClkHdl, FuncPage&, void ); DECL_LINK_TYPED( FuncSelHdl, FuncPage&, void ); - DECL_LINK(StructSelHdl, void *); + DECL_LINK_TYPED( StructSelHdl, StructPage&, void ); public: mutable uno::Reference< sheet::XFormulaOpCodeMapper> m_xOpCodeMapper; uno::Sequence< sheet::FormulaToken > m_aTokenList; @@ -1580,13 +1580,12 @@ bool FormulaDlg_Impl::CheckMatrix(OUString& aFormula) m_pTabCtrl->SetCurPageId(TP_STRUCT); return bMatrix; } -IMPL_LINK_NOARG(FormulaDlg_Impl, StructSelHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, StructSelHdl, StructPage&, void) { bStructUpdate=false; - if(pStructPage->IsVisible()) m_pBtnForward->Enable(false); //@New - + if(pStructPage->IsVisible()) + m_pBtnForward->Enable(false); //@New bStructUpdate=true; - return 0; } IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, MatrixHdl, Button*, void) { diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index a190008..fcbf0e6 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -190,7 +190,7 @@ IMPL_LINK_TYPED( StructPage, SelectHdl, SvTreeListBox*, pTlb, void ) } } - aSelLink.Call(this); + aSelLink.Call(*this); } } diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx index ae8fac9..de84f7b 100644 --- a/formula/source/ui/dlg/structpg.hxx +++ b/formula/source/ui/dlg/structpg.hxx @@ -70,8 +70,8 @@ class StructPage : public TabPage , public IStructHelper { private: - OModuleClient m_aModuleClient; - Link<> aSelLink; + OModuleClient m_aModuleClient; + Link<StructPage&,void> aSelLink; VclPtr<StructListBox> m_pTlbStruct; Image maImgEnd; @@ -99,7 +99,7 @@ public: virtual OUString GetEntryText(SvTreeListEntry* pEntry) const SAL_OVERRIDE; - void SetSelectionHdl( const Link<>& rLink ) { aSelLink = rLink; } + void SetSelectionHdl( const Link<StructPage&,void>& rLink ) { aSelLink = rLink; } StructListBox* GetTlbStruct() const { return m_pTlbStruct; } }; commit b56850ecbc9c10c6226cdae0d42443933b24dff7 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:49:07 2015 +0200 convert Link<> to typed Change-Id: I93988860f409e13d99aaec06a0b0833b3814da24 diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index eb1b6a7..a435d1c 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -121,8 +121,8 @@ public: const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;} uno::Reference< sheet::XFormulaOpCodeMapper > GetFormulaOpCodeMapper() const; - DECL_LINK( ModifyHdl, ParaWin* ); - DECL_LINK( FxHdl, ParaWin* ); + DECL_LINK_TYPED( ModifyHdl, ParaWin&, void ); + DECL_LINK_TYPED( FxHdl, ParaWin&, void ); DECL_LINK_TYPED( MatrixHdl, Button*, void ); DECL_LINK(FormulaHdl, void *); @@ -1239,16 +1239,16 @@ void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd ) } } -IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr ) +IMPL_LINK_TYPED( FormulaDlg_Impl, FxHdl, ParaWin&, rPtr, void ) { - if(pPtr==pParaWin) + if(&rPtr==pParaWin) { m_pBtnForward->Enable(true); //@ In order to be able to input another function. m_pTabCtrl->SetCurPageId(TP_FUNCTION); OUString aUndoStr = m_pHelper->getCurrentFormula(); // it will be added before a ";" FormEditData* pData = m_pHelper->getFormEditData(); - if (!pData) return 0; + if (!pData) return; sal_uInt16 nArgNo = pParaWin->GetActiveLine(); nEdFocus=nArgNo; @@ -1271,12 +1271,11 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr ) FillDialog(false); pFuncPage->SetFocus(); //There Parawin is not visible anymore } - return 0; } -IMPL_LINK( FormulaDlg_Impl, ModifyHdl, ParaWin*, pPtr ) +IMPL_LINK_TYPED( FormulaDlg_Impl, ModifyHdl, ParaWin&, rPtr, void ) { - if(pPtr==pParaWin) + if(&rPtr==pParaWin) { SaveArg(pParaWin->GetActiveLine()); UpdateValues(); @@ -1284,7 +1283,6 @@ IMPL_LINK( FormulaDlg_Impl, ModifyHdl, ParaWin*, pPtr ) UpdateSelection(); CalcStruct(pMEdit->GetText()); } - return 0; } IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl) @@ -1508,7 +1506,7 @@ void FormulaDlg_Impl::RefInputDoneAfter( bool bForced ) sal_uInt16 nPrivActiv = pParaWin->GetActiveLine(); pParaWin->SetArgument( nPrivActiv, m_pEdRef->GetText() ); - ModifyHdl( pParaWin ); + ModifyHdl( *pParaWin ); pTheRefEdit = NULL; } m_pParent->SetText( aTitle1 ); diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index de55090..05a0b71 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -538,12 +538,12 @@ void ParaWin::SliderMoved() void ParaWin::ArgumentModified() { - aArgModifiedLink.Call(this); + aArgModifiedLink.Call(*this); } void ParaWin::FxClick() { - aFxLink.Call(this); + aFxLink.Call(*this); } diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index fc0241f..894b7de 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -45,8 +45,8 @@ class ParaWin : public TabPage { private: OModuleClient m_aModuleClient; - Link<> aFxLink; - Link<> aArgModifiedLink; + Link<ParaWin&,void> aFxLink; + Link<ParaWin&,void> aArgModifiedLink; ::std::vector<sal_uInt16> aVisibleArgMapping; const IFunctionDescription* pFuncDesc; @@ -147,9 +147,8 @@ public: sal_uInt16 GetSliderPos(); void SetSliderPos(sal_uInt16 nSliderPos); - void SetArgModifiedHdl( const Link<>& rLink ) { aArgModifiedLink = rLink; } - - void SetFxHdl( const Link<>& rLink ) { aFxLink = rLink; } + void SetArgModifiedHdl( const Link<ParaWin&,void>& rLink ) { aArgModifiedLink = rLink; } + void SetFxHdl( const Link<ParaWin&,void>& rLink ) { aFxLink = rLink; } }; commit d7c428c687f3edc0e110d07c0bb381fe30ad6db9 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:47:45 2015 +0200 remove unused Link<> field Change-Id: I6aee7b6ede35aa590a263c3851d181115233a790 diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 8e79bcb..de55090 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -534,7 +534,6 @@ void ParaWin::SliderMoved() ArgumentModified(); aArgInput[nEdFocus].UpdateAccessibleNames(); } - aScrollLink.Call(this); } void ParaWin::ArgumentModified() diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index 0eb38c2..fc0241f 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -44,10 +44,9 @@ class IControlReferenceHandler; class ParaWin : public TabPage { private: - OModuleClient m_aModuleClient; - Link<> aScrollLink; - Link<> aFxLink; - Link<> aArgModifiedLink; + OModuleClient m_aModuleClient; + Link<> aFxLink; + Link<> aArgModifiedLink; ::std::vector<sal_uInt16> aVisibleArgMapping; const IFunctionDescription* pFuncDesc; commit 74801037c1e30a7edea97a177c2caedb7fb43b12 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:44:15 2015 +0200 convert Link<> to typed Change-Id: I0521aad1bc63c75242ae07feccebe24dbc754d6b diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 15dc84f..eb1b6a7 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -124,12 +124,12 @@ public: DECL_LINK( ModifyHdl, ParaWin* ); DECL_LINK( FxHdl, ParaWin* ); - DECL_LINK_TYPED( MatrixHdl, Button*, void); + DECL_LINK_TYPED( MatrixHdl, Button*, void ); DECL_LINK(FormulaHdl, void *); - DECL_LINK_TYPED( FormulaCursorHdl, EditBox&, void); + DECL_LINK_TYPED( FormulaCursorHdl, EditBox&, void ); DECL_LINK_TYPED( BtnHdl, Button*, void ); - DECL_LINK(DblClkHdl, void *); - DECL_LINK(FuncSelHdl, void *); + DECL_LINK_TYPED( DblClkHdl, FuncPage&, void ); + DECL_LINK_TYPED( FuncSelHdl, FuncPage&, void ); DECL_LINK(StructSelHdl, void *); public: mutable uno::Reference< sheet::XFormulaOpCodeMapper> m_xOpCodeMapper; @@ -855,7 +855,7 @@ void FormulaDlg_Impl::FillListboxes() pFuncPage->SetCategory( pData->GetCatSel() ); pFuncPage->SetFunction( pData->GetFuncSel() ); } - FuncSelHdl(NULL); + FuncSelHdl(*pFuncPage); m_pHelper->setDispatcherLock( true );// Activate Modal-Mode @@ -972,7 +972,7 @@ void FormulaDlg_Impl::ClearAllParas() pParaWin->ClearAll(); m_pWndResult->SetText(OUString()); m_pFtFuncName->SetText(OUString()); - FuncSelHdl(NULL); + FuncSelHdl(*pFuncPage); if (pFuncPage->IsVisible()) { @@ -1052,7 +1052,7 @@ IMPL_LINK_TYPED( FormulaDlg_Impl, BtnHdl, Button*, pBtn, void ) EditNextFunc( true ); else { - DblClkHdl(pFuncPage); //new + DblClkHdl(*pFuncPage); //new m_pBtnForward->Enable(false); //new } } @@ -1076,7 +1076,7 @@ IMPL_LINK_TYPED( FormulaDlg_Impl, BtnHdl, Button*, pBtn, void ) // Handler for Listboxes -IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, DblClkHdl, FuncPage&, void) { sal_Int32 nFunc = pFuncPage->GetFunction(); @@ -1104,8 +1104,6 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl) pParaWin->SetEdFocus(0); m_pBtnForward->Enable(false); //@New - - return 0; } @@ -1538,7 +1536,7 @@ void FormulaDlg_Impl::Update(const OUString& _sExp) { CalcStruct(_sExp); FillDialog(); - FuncSelHdl(NULL); + FuncSelHdl(*pFuncPage); } void FormulaDlg_Impl::SetMeText(const OUString& _sText) { @@ -1597,7 +1595,7 @@ IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, MatrixHdl, Button*, void) bUserMatrixFlag=true; } -IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, FuncSelHdl, FuncPage&, void) { if ( (pFuncPage->GetFunctionEntryCount() > 0) && (pFuncPage->GetFunction() != LISTBOX_ENTRY_NOTFOUND) ) @@ -1622,7 +1620,6 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl) m_pFtFuncName->SetText( OUString() ); m_pFtFuncDesc->SetText( OUString() ); } - return 0; } void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection, const OUString& _sRefStr) diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index 045eef2..7a25404 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -170,7 +170,7 @@ IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb ) if ( !sHelpId.isEmpty() ) m_pLbFunction->SetHelpId(sHelpId); } - aSelectionLink.Call(this); + aSelectionLink.Call(*this); } else { @@ -182,7 +182,7 @@ IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb ) IMPL_LINK_NOARG_TYPED(FuncPage, DblClkHdl, ListBox&, void) { - aDoubleClickLink.Call(this); + aDoubleClickLink.Call(*this); } void FuncPage::SetCategory(sal_Int32 nCat) diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx index 98ad3d3..7ef74fa 100644 --- a/formula/source/ui/dlg/funcpage.hxx +++ b/formula/source/ui/dlg/funcpage.hxx @@ -60,13 +60,12 @@ typedef const IFunctionDescription* TFunctionDesc; class FuncPage : public TabPage { private: - OModuleClient m_aModuleClient; - Link<> aDoubleClickLink; - Link<> aSelectionLink; - VclPtr<ListBox> m_pLbCategory; - VclPtr<FormulaListBox> m_pLbFunction; - const IFunctionManager* - m_pFunctionManager; + OModuleClient m_aModuleClient; + Link<FuncPage&,void> aDoubleClickLink; + Link<FuncPage&,void> aSelectionLink; + VclPtr<ListBox> m_pLbCategory; + VclPtr<FormulaListBox> m_pLbFunction; + const IFunctionManager* m_pFunctionManager; ::std::vector< TFunctionDesc > aLRUList; OString m_aHelpId; @@ -99,9 +98,9 @@ public: const IFunctionDescription* GetFuncDesc( sal_Int32 nPos ) const; OUString GetSelFunctionName() const; - void SetDoubleClickHdl( const Link<>& rLink ) { aDoubleClickLink = rLink; } + void SetDoubleClickHdl( const Link<FuncPage&,void>& rLink ) { aDoubleClickLink = rLink; } - void SetSelectHdl( const Link<>& rLink ) { aSelectionLink = rLink; } + void SetSelectHdl( const Link<FuncPage&,void>& rLink ) { aSelectionLink = rLink; } }; commit 918db85cd3d1cf171b91dbebf68171619aad69ae Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:41:12 2015 +0200 convert Link<> to typed Change-Id: I8465811de6794345d79eb29c8efbc70f82b3168e diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index 32224f9..d9e1217 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -89,8 +89,8 @@ class ArgInput private: Link<ArgInput&,void> aFxClickLink; Link<ArgInput&,void> aFxFocusLink; - Link<> aEdFocusLink; - Link<> aEdModifyLink; + Link<ArgInput&,void> aEdFocusLink; + Link<ArgInput&,void> aEdModifyLink; VclPtr<FixedText> pFtArg; VclPtr<PushButton> pBtnFx; @@ -136,9 +136,9 @@ public: void SetFxFocusHdl( const Link<ArgInput&,void>& rLink ) { aFxFocusLink = rLink; } - void SetEdFocusHdl( const Link<>& rLink ) { aEdFocusLink = rLink; } + void SetEdFocusHdl( const Link<ArgInput&,void>& rLink ) { aEdFocusLink = rLink; } - void SetEdModifyHdl( const Link<>& rLink ) { aEdModifyLink = rLink; } + void SetEdModifyHdl( const Link<ArgInput&,void>& rLink ) { aEdModifyLink = rLink; } void Hide(); void Show(); diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 0e499c1..50d8b01 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -271,12 +271,12 @@ void ArgInput::FxFocus() void ArgInput::EdFocus() { - aEdFocusLink.Call(this); + aEdFocusLink.Call(*this); } void ArgInput::EdModify() { - aEdModifyLink.Call(this); + aEdModifyLink.Call(*this); } IMPL_LINK_TYPED( ArgInput, FxBtnClickHdl, Button*, pBtn, void ) diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index b6cb648..8e79bcb 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -592,13 +592,13 @@ IMPL_LINK_TYPED( ParaWin, GetFxFocusHdl, ArgInput&, rPtr, void ) -IMPL_LINK( ParaWin, GetEdFocusHdl, ArgInput*, pPtr ) +IMPL_LINK_TYPED( ParaWin, GetEdFocusHdl, ArgInput&, rPtr, void ) { sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; for (sal_uInt16 nPos=0; nPos < SAL_N_ELEMENTS(aArgInput); ++nPos) { - if(pPtr == &aArgInput[nPos]) + if(&rPtr == &aArgInput[nPos]) { nEdFocus=nPos; break; @@ -613,8 +613,6 @@ IMPL_LINK( ParaWin, GetEdFocusHdl, ArgInput*, pPtr ) ArgumentModified(); aArgInput[nEdFocus].UpdateAccessibleNames(); } - - return 0; } @@ -623,13 +621,13 @@ IMPL_LINK_NOARG_TYPED(ParaWin, ScrollHdl, ScrollBar*, void) SliderMoved(); } -IMPL_LINK( ParaWin, ModifyHdl, ArgInput*, pPtr ) +IMPL_LINK_TYPED( ParaWin, ModifyHdl, ArgInput&, rPtr, void ) { sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; for (sal_uInt16 nPos=0; nPos < SAL_N_ELEMENTS(aArgInput); ++nPos) { - if(pPtr == &aArgInput[nPos]) + if(&rPtr == &aArgInput[nPos]) { nEdFocus=nPos; break; @@ -643,7 +641,6 @@ IMPL_LINK( ParaWin, ModifyHdl, ArgInput*, pPtr ) } ArgumentModified(); - return 0; } diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index 61f3885..0eb38c2 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -94,8 +94,8 @@ private: aParaArray; DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void); - DECL_LINK( ModifyHdl, ArgInput* ); - DECL_LINK( GetEdFocusHdl, ArgInput* ); + DECL_LINK_TYPED( ModifyHdl, ArgInput&, void ); + DECL_LINK_TYPED( GetEdFocusHdl, ArgInput&, void ); DECL_LINK_TYPED( GetFxFocusHdl, ArgInput&, void ); DECL_LINK_TYPED( GetFxHdl, ArgInput&, void ); commit 219e031de6f807e137433be85a1cbf52b0615633 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:39:38 2015 +0200 remove unused Link<> field Change-Id: Ia2e3180b8794e0875869640ae0c45026718c1946 diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index e30fbb5..32224f9 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -89,7 +89,6 @@ class ArgInput private: Link<ArgInput&,void> aFxClickLink; Link<ArgInput&,void> aFxFocusLink; - Link<> aRefFocusLink; Link<> aEdFocusLink; Link<> aEdModifyLink; @@ -100,7 +99,6 @@ private: DECL_LINK_TYPED( FxBtnClickHdl, Button*, void ); DECL_LINK( FxBtnFocusHdl, ImageButton* ); - DECL_LINK( RefBtnFocusHdl,RefButton* ); DECL_LINK( EdFocusHdl, ArgEdit* ); DECL_LINK( EdModifyHdl,ArgEdit* ); @@ -108,7 +106,6 @@ protected: void FxClick(); void FxFocus(); - void RefFocus(); void EdFocus(); void EdModify(); diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 53ba36e..0e499c1 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -165,10 +165,6 @@ void ArgInput::InitArgInput( FixedText* pftArg, PushButton* pbtnFx, pBtnFx->SetClickHdl ( LINK( this, ArgInput, FxBtnClickHdl ) ); pBtnFx->SetGetFocusHdl( LINK( this, ArgInput, FxBtnFocusHdl ) ); } - if(pRefBtn!=nullptr) - { - pRefBtn->SetGetFocusHdl( LINK( this, ArgInput, RefBtnFocusHdl ) ); - } if(pEdArg!=nullptr) { pEdArg->SetGetFocusHdl ( LINK( this, ArgInput, EdFocusHdl ) ); @@ -273,11 +269,6 @@ void ArgInput::FxFocus() aFxFocusLink.Call(*this); } -void ArgInput::RefFocus() -{ - aRefFocusLink.Call(this); -} - void ArgInput::EdFocus() { aEdFocusLink.Call(this); @@ -302,14 +293,6 @@ IMPL_LINK( ArgInput, FxBtnFocusHdl, ImageButton*, pBtn ) return 0; } -IMPL_LINK( ArgInput, RefBtnFocusHdl,RefButton*, pBtn ) -{ - if(pRefBtn == pBtn) - RefFocus(); - - return 0; -} - IMPL_LINK( ArgInput, EdFocusHdl, ArgEdit*, pEd ) { if(pEd == pEdArg) commit c378153149d2fbdf16ed57630baca9a20c990b9a Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:38:38 2015 +0200 convert Link<> to typed Change-Id: I83a418c81a5d1267286236cfcdedc889d34fc963 diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index da790d0..e30fbb5 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -88,7 +88,7 @@ class ArgInput { private: Link<ArgInput&,void> aFxClickLink; - Link<> aFxFocusLink; + Link<ArgInput&,void> aFxFocusLink; Link<> aRefFocusLink; Link<> aEdFocusLink; Link<> aEdModifyLink; @@ -137,7 +137,7 @@ public: void SetFxClickHdl( const Link<ArgInput&,void>& rLink ) { aFxClickLink = rLink; } - void SetFxFocusHdl( const Link<>& rLink ) { aFxFocusLink = rLink; } + void SetFxFocusHdl( const Link<ArgInput&,void>& rLink ) { aFxFocusLink = rLink; } void SetEdFocusHdl( const Link<>& rLink ) { aEdFocusLink = rLink; } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index ad256b1..53ba36e 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -270,7 +270,7 @@ void ArgInput::FxClick() void ArgInput::FxFocus() { - aFxFocusLink.Call(this); + aFxFocusLink.Call(*this); } void ArgInput::RefFocus() diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index ddf4c57..b6cb648 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -569,13 +569,13 @@ IMPL_LINK_TYPED( ParaWin, GetFxHdl, ArgInput&, rPtr, void ) } } -IMPL_LINK( ParaWin, GetFxFocusHdl, ArgInput*, pPtr ) +IMPL_LINK_TYPED( ParaWin, GetFxFocusHdl, ArgInput&, rPtr, void ) { sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; for (sal_uInt16 nPos=0; nPos < SAL_N_ELEMENTS(aArgInput); ++nPos) { - if(pPtr == &aArgInput[nPos]) + if(&rPtr == &aArgInput[nPos]) { nEdFocus=nPos; break; @@ -588,7 +588,6 @@ IMPL_LINK( ParaWin, GetFxFocusHdl, ArgInput*, pPtr ) UpdateArgDesc( nEdFocus ); nActiveLine=nEdFocus+nOffset; } - return 0; } diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index 7d82663..61f3885 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -96,7 +96,7 @@ private: DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void); DECL_LINK( ModifyHdl, ArgInput* ); DECL_LINK( GetEdFocusHdl, ArgInput* ); - DECL_LINK( GetFxFocusHdl, ArgInput* ); + DECL_LINK_TYPED( GetFxFocusHdl, ArgInput&, void ); DECL_LINK_TYPED( GetFxHdl, ArgInput&, void ); protected: commit e01bfc7b591e36ea7c7eaaf27ac4d78018e045a8 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:37:25 2015 +0200 remove unused Link<> field Change-Id: I0424284b2436bbc7578a2ee9086704409ee014af diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index edfae1b..da790d0 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -88,7 +88,6 @@ class ArgInput { private: Link<ArgInput&,void> aFxClickLink; - Link<> aRefClickLink; Link<> aFxFocusLink; Link<> aRefFocusLink; Link<> aEdFocusLink; @@ -100,7 +99,6 @@ private: VclPtr<RefButton> pRefBtn; DECL_LINK_TYPED( FxBtnClickHdl, Button*, void ); - DECL_LINK_TYPED( RefBtnClickHdl,Button*, void ); DECL_LINK( FxBtnFocusHdl, ImageButton* ); DECL_LINK( RefBtnFocusHdl,RefButton* ); DECL_LINK( EdFocusHdl, ArgEdit* ); @@ -109,7 +107,6 @@ private: protected: void FxClick(); - void RefClick(); void FxFocus(); void RefFocus(); void EdFocus(); diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index ad9d553..ad256b1 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -167,7 +167,6 @@ void ArgInput::InitArgInput( FixedText* pftArg, PushButton* pbtnFx, } if(pRefBtn!=nullptr) { - pRefBtn->SetClickHdl ( LINK( this, ArgInput, RefBtnClickHdl ) ); pRefBtn->SetGetFocusHdl( LINK( this, ArgInput, RefBtnFocusHdl ) ); } if(pEdArg!=nullptr) @@ -269,11 +268,6 @@ void ArgInput::FxClick() aFxClickLink.Call(*this); } -void ArgInput::RefClick() -{ - aRefClickLink.Call(this); -} - void ArgInput::FxFocus() { aFxFocusLink.Call(this); @@ -300,12 +294,6 @@ IMPL_LINK_TYPED( ArgInput, FxBtnClickHdl, Button*, pBtn, void ) FxClick(); } -IMPL_LINK_TYPED( ArgInput, RefBtnClickHdl, Button*, pBtn, void ) -{ - if(pRefBtn == pBtn) - RefClick(); -} - IMPL_LINK( ArgInput, FxBtnFocusHdl, ImageButton*, pBtn ) { if(pBtn == pBtnFx) commit 20314a1cca6e2518bfa7ea3f2018df3703c72b92 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:36:02 2015 +0200 convert Link<> to typed Change-Id: Ic1f33a914f62a4f1a309ff4ccd877efb44b80b5b diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index 4905f7a..edfae1b 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -87,8 +87,7 @@ private: class ArgInput { private: - - Link<> aFxClickLink; + Link<ArgInput&,void> aFxClickLink; Link<> aRefClickLink; Link<> aFxFocusLink; Link<> aRefFocusLink; @@ -139,7 +138,7 @@ public: ArgEdit* GetArgEdPtr() {return pEdArg;} - void SetFxClickHdl( const Link<>& rLink ) { aFxClickLink = rLink; } + void SetFxClickHdl( const Link<ArgInput&,void>& rLink ) { aFxClickLink = rLink; } void SetFxFocusHdl( const Link<>& rLink ) { aFxFocusLink = rLink; } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index a88e369..ad9d553 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -266,7 +266,7 @@ void ArgInput::UpdateAccessibleNames() void ArgInput::FxClick() { - aFxClickLink.Call(this); + aFxClickLink.Call(*this); } void ArgInput::RefClick() diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 4cb2352..ddf4c57 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -548,13 +548,13 @@ void ParaWin::FxClick() } -IMPL_LINK( ParaWin, GetFxHdl, ArgInput*, pPtr ) +IMPL_LINK_TYPED( ParaWin, GetFxHdl, ArgInput&, rPtr, void ) { sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; for (sal_uInt16 nPos=0; nPos < SAL_N_ELEMENTS(aArgInput); ++nPos) { - if(pPtr == &aArgInput[nPos]) + if(&rPtr == &aArgInput[nPos]) { nEdFocus=nPos; break; @@ -567,7 +567,6 @@ IMPL_LINK( ParaWin, GetFxHdl, ArgInput*, pPtr ) nActiveLine=nEdFocus+nOffset; FxClick(); } - return 0; } IMPL_LINK( ParaWin, GetFxFocusHdl, ArgInput*, pPtr ) diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index 4633289..7d82663 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -97,7 +97,7 @@ private: DECL_LINK( ModifyHdl, ArgInput* ); DECL_LINK( GetEdFocusHdl, ArgInput* ); DECL_LINK( GetFxFocusHdl, ArgInput* ); - DECL_LINK( GetFxHdl, ArgInput* ); + DECL_LINK_TYPED( GetFxHdl, ArgInput&, void ); protected: commit a08471fe1d36bce2d9d09a131c1f392baf70b46a Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:34:41 2015 +0200 convert Link<> to typed Change-Id: I70fab365886ef1c6ed755ec86ebd7952ca613ea7 diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index e78a289..4905f7a 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -30,9 +30,9 @@ class EditBox : public Control private: VclPtr<MultiLineEdit> pMEdit; - Link<> aSelChangedLink; - Selection aOldSel; - bool bMouseFlag; + Link<EditBox&,void> aSelChangedLink; + Selection aOldSel; + bool bMouseFlag; DECL_LINK_TYPED(ChangedHdl, void *, void); @@ -52,7 +52,7 @@ public: MultiLineEdit* GetEdit() {return pMEdit;} - void SetSelChangedHdl( const Link<>& rLink ) { aSelChangedLink = rLink; } + void SetSelChangedHdl( const Link<EditBox&,void>& rLink ) { aSelChangedLink = rLink; } void UpdateOldSel(); }; diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index a115918..15dc84f 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -124,9 +124,9 @@ public: DECL_LINK( ModifyHdl, ParaWin* ); DECL_LINK( FxHdl, ParaWin* ); - DECL_LINK_TYPED(MatrixHdl, Button*, void); + DECL_LINK_TYPED( MatrixHdl, Button*, void); DECL_LINK(FormulaHdl, void *); - DECL_LINK(FormulaCursorHdl, void *); + DECL_LINK_TYPED( FormulaCursorHdl, EditBox&, void); DECL_LINK_TYPED( BtnHdl, Button*, void ); DECL_LINK(DblClkHdl, void *); DECL_LINK(FuncSelHdl, void *); @@ -1354,10 +1354,10 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl) return 0; } -IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, FormulaCursorHdl, EditBox&, void) { FormEditData* pData = m_pHelper->getFormEditData(); - if (!pData) return 0; + if (!pData) return; sal_Int32 nFStart = pData->GetFStart(); bEditFlag=true; @@ -1419,7 +1419,6 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl) m_pHelper->setSelection(aSel.Min(), aSel.Max()); bEditFlag=false; - return 0; } void FormulaDlg_Impl::UpdateSelection() @@ -1527,7 +1526,7 @@ void FormulaDlg_Impl::Update() const OUString sExpression = pMEdit->GetText(); aOldFormula.clear(); UpdateTokenArray(sExpression); - FormulaCursorHdl(m_pMEFormula); + FormulaCursorHdl(*m_pMEFormula); CalcStruct(sExpression); if(pData->GetMode() == FORMULA_FORMDLG_FORMULA) m_pTabCtrl->SetCurPageId(TP_FUNCTION); diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index f35b818..a88e369 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -378,7 +378,7 @@ void EditBox::dispose() // When the selection is changed this function will be called void EditBox::SelectionChanged() { - aSelChangedLink.Call(this); + aSelChangedLink.Call(*this); } // When the size is changed, MultiLineEdit must be adapted.. commit 061934621664c61dd04de2e48935a7fcfe00e552 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:25:04 2015 +0200 convert Link<> to typed Change-Id: Id600a5ee28440ee91c7089c8f7aa05f83bc0e63c diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index c5ff202..e95446a 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -281,7 +281,7 @@ void Sane::ReloadOptions() CheckConsistency( NULL, true ); - maReloadOptionsLink.Call( this ); + maReloadOptionsLink.Call( *this ); } bool Sane::Open( const char* name ) diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx index 0668702..7f204f6 100644 --- a/extensions/source/scanner/sane.hxx +++ b/extensions/source/scanner/sane.hxx @@ -96,7 +96,7 @@ private: int mnDevice; SANE_Handle maHandle; - Link<> maReloadOptionsLink; + Link<Sane&,void> maReloadOptionsLink; static inline oslGenericFunction LoadSymbol( const char* ); @@ -168,7 +168,7 @@ public: bool Start( BitmapTransporter& ); - inline Link<> SetReloadOptionsHdl( const Link<>& rLink ); + inline Link<Sane&,void> SetReloadOptionsHdl( const Link<Sane&,void>& rLink ); }; inline int Sane::GetOptionElements( int n ) @@ -181,9 +181,9 @@ inline int Sane::GetOptionElements( int n ) return 1; } -inline Link<> Sane::SetReloadOptionsHdl( const Link<>& rLink ) +inline Link<Sane&,void> Sane::SetReloadOptionsHdl( const Link<Sane&,void>& rLink ) { - Link<> aRet = maReloadOptionsLink; + Link<Sane&,void> aRet = maReloadOptionsLink; maReloadOptionsLink = rLink; return aRet; } diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 4d24594..0d32908 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -662,7 +662,7 @@ IMPL_LINK_TYPED( SaneDlg, ClickBtnHdl, Button*, pButton, void ) } else if( pButton == mpAdvancedBox ) { - ReloadSaneOptionsHdl( NULL ); + ReloadSaneOptionsHdl( mrSane ); } } if( pButton == mpOKButton || pButton == mpScanButton ) @@ -873,14 +873,13 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit ) return 0; } -IMPL_LINK( SaneDlg, ReloadSaneOptionsHdl, Sane*, /*pSane*/ ) +IMPL_LINK_NOARG_TYPED( SaneDlg, ReloadSaneOptionsHdl, Sane&, void ) { mnCurrentOption = -1; mnCurrentElement = 0; DisableOption(); InitFields(); mpPreview->Invalidate(); - return 0; } void SaneDlg::AcquirePreview() diff --git a/extensions/source/scanner/sanedlg.hxx b/extensions/source/scanner/sanedlg.hxx index 2854da5..17cae76 100644 --- a/extensions/source/scanner/sanedlg.hxx +++ b/extensions/source/scanner/sanedlg.hxx @@ -35,10 +35,10 @@ class ScanPreview; class SaneDlg : public ModalDialog { private: - Sane& mrSane; - bool mbScanEnabled; + Sane& mrSane; + bool mbScanEnabled; - Link<> maOldLink; + Link<Sane&,void> maOldLink; VclPtr<OKButton> mpOKButton; VclPtr<CancelButton> mpCancelButton; @@ -83,7 +83,7 @@ private: DECL_LINK_TYPED( ClickBtnHdl, Button*, void ); DECL_LINK( SelectHdl, ListBox* ); DECL_LINK( ModifyHdl, Edit* ); - DECL_LINK( ReloadSaneOptionsHdl, Sane* ); + DECL_LINK_TYPED( ReloadSaneOptionsHdl, Sane&, void ); DECL_LINK_TYPED( OptionsBoxSelectHdl, SvTreeListBox*, void ); void SaveState(); commit bd1da371633c8df7f31da1cdaeb6f9e61dee4429 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:22:25 2015 +0200 convert Link<> to typed Change-Id: I1ce46ea4784ecbd30a47d749d863173e0fe86fe6 diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 02696e0..6957278 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -3228,7 +3228,7 @@ namespace pcr } - IMPL_LINK_NOARG( FormComponentPropertyHandler, OnDesignerClosed ) + IMPL_LINK_NOARG_TYPED( FormComponentPropertyHandler, OnDesignerClosed, SQLCommandDesigner&, void ) { OSL_ENSURE( m_xBrowserUI.is() && m_xCommandDesigner.is(), "FormComponentPropertyHandler::OnDesignerClosed: too many NULLs!" ); if ( m_xBrowserUI.is() && m_xCommandDesigner.is() ) @@ -3251,8 +3251,6 @@ namespace pcr DBG_UNHANDLED_EXCEPTION(); } } - - return 0L; } diff --git a/extensions/source/propctrlr/formcomponenthandler.hxx b/extensions/source/propctrlr/formcomponenthandler.hxx index 1530c25..32025fc 100644 --- a/extensions/source/propctrlr/formcomponenthandler.hxx +++ b/extensions/source/propctrlr/formcomponenthandler.hxx @@ -431,7 +431,7 @@ namespace pcr OUString impl_getDocumentURL_nothrow() const; private: - DECL_LINK( OnDesignerClosed, void* ); + DECL_LINK_TYPED( OnDesignerClosed, SQLCommandDesigner&, void ); private: FormComponentPropertyHandler( const FormComponentPropertyHandler& ) SAL_DELETED_FUNCTION; diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx index 753ab0e..cb9f003 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.cxx +++ b/extensions/source/propctrlr/sqlcommanddesign.cxx @@ -100,7 +100,7 @@ namespace pcr SQLCommandDesigner::SQLCommandDesigner( const Reference< XComponentContext >& _rxContext, const ::rtl::Reference< ISQLCommandAdapter >& _rxPropertyAdapter, - const ::dbtools::SharedConnection& _rConnection, const Link<>& _rCloseLink ) + const ::dbtools::SharedConnection& _rConnection, const Link<SQLCommandDesigner&,void>& _rCloseLink ) :m_xContext( _rxContext ) ,m_xConnection( _rConnection ) ,m_xObjectAdapter( _rxPropertyAdapter ) @@ -310,7 +310,7 @@ namespace pcr void SQLCommandDesigner::impl_designerClosed_nothrow() { if ( m_aCloseLink.IsSet() ) - m_aCloseLink.Call( this ); + m_aCloseLink.Call( *this ); } diff --git a/extensions/source/propctrlr/sqlcommanddesign.hxx b/extensions/source/propctrlr/sqlcommanddesign.hxx index 1b0a656..4a619e9 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.hxx +++ b/extensions/source/propctrlr/sqlcommanddesign.hxx @@ -55,7 +55,7 @@ namespace pcr ::dbtools::SharedConnection m_xConnection; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > m_xDesigner; ::rtl::Reference< ISQLCommandAdapter > m_xObjectAdapter; - Link<> m_aCloseLink; + Link<SQLCommandDesigner&,void> m_aCloseLink; public: /** creates the instance, and immediately opens the SQL command design frame @@ -76,7 +76,7 @@ namespace pcr const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const ::rtl::Reference< ISQLCommandAdapter >& _rxPropertyAdapter, const ::dbtools::SharedConnection& _rConnection, - const Link<>& _rCloseLink + const Link<SQLCommandDesigner&,void>& _rCloseLink ); /** determines whether the SQL Command designer is currently active, i.e. commit 4662def919d6fd2f8fa5b13ca7eb0cd031cefb3d Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:17:40 2015 +0200 convert Link<> to typed Change-Id: Iad25d514be71ea4d0f8d2b773197aa30371d776b diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx index 7bfd691..33d8843 100644 --- a/extensions/source/propctrlr/browserview.cxx +++ b/extensions/source/propctrlr/browserview.cxx @@ -40,12 +40,11 @@ namespace pcr } - IMPL_LINK_NOARG(OPropertyBrowserView, OnPageActivation) + IMPL_LINK_NOARG_TYPED(OPropertyBrowserView, OnPageActivation, LinkParamNone*, void) { m_nActivePage = m_pPropBox->GetCurPage(); if (m_aPageActivationHandler.IsSet()) m_aPageActivationHandler.Call(NULL); - return 0L; } diff --git a/extensions/source/propctrlr/browserview.hxx b/extensions/source/propctrlr/browserview.hxx index 0209b32..dd3c810 100644 --- a/extensions/source/propctrlr/browserview.hxx +++ b/extensions/source/propctrlr/browserview.hxx @@ -34,9 +34,9 @@ namespace pcr class OPropertyBrowserView : public vcl::Window { - VclPtr<OPropertyEditor> m_pPropBox; - sal_uInt16 m_nActivePage; - Link<> m_aPageActivationHandler; + VclPtr<OPropertyEditor> m_pPropBox; + sal_uInt16 m_nActivePage; + Link<LinkParamNone*,void> m_aPageActivationHandler; protected: virtual void Resize() SAL_OVERRIDE; @@ -55,12 +55,12 @@ namespace pcr sal_uInt16 getActivaPage() const { return m_nActivePage; } void activatePage(sal_uInt16 _nPage); - void setPageActivationHandler(const Link<>& _rHdl) { m_aPageActivationHandler = _rHdl; } + void setPageActivationHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aPageActivationHandler = _rHdl; } ::com::sun::star::awt::Size getMinimumSize(); protected: - DECL_LINK(OnPageActivation, void*); + DECL_LINK_TYPED(OnPageActivation, LinkParamNone*, void); }; diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 7236a9b..71b5de0 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -638,10 +638,9 @@ namespace pcr } - IMPL_LINK_NOARG(OPropertyBrowserController, OnPageActivation) + IMPL_LINK_NOARG_TYPED(OPropertyBrowserController, OnPageActivation, LinkParamNone*, void) { updateViewDataFromActivePage(); - return 0L; } diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx index e4c1414..afbe6ea 100644 --- a/extensions/source/propctrlr/propcontroller.hxx +++ b/extensions/source/propctrlr/propcontroller.hxx @@ -385,7 +385,7 @@ namespace pcr void impl_startOrStopModelListening_nothrow( bool _bDoListen ) const; private: - DECL_LINK(OnPageActivation, void*); + DECL_LINK_TYPED(OnPageActivation, LinkParamNone*, void); private: // constructors diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx index 7d457ce..76e2b19 100644 --- a/extensions/source/propctrlr/propertyeditor.hxx +++ b/extensions/source/propctrlr/propertyeditor.hxx @@ -57,7 +57,7 @@ namespace pcr IPropertyLineListener* m_pListener; IPropertyControlObserver* m_pObserver; sal_uInt16 m_nNextId; - Link<> m_aPageActivationHandler; + Link<LinkParamNone*,void> m_aPageActivationHandler; bool m_bHasHelpSection; sal_Int32 m_nMinHelpLines; sal_Int32 m_nMaxHelpLines; @@ -106,7 +106,7 @@ namespace pcr void RemoveEntry( const OUString& _rName ); void ChangeEntry( const OLineDescriptor& ); - void setPageActivationHandler(const Link<>& _rHdl) { m_aPageActivationHandler = _rHdl; } + void setPageActivationHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aPageActivationHandler = _rHdl; } // #95343# ------------------------------- sal_Int32 getMinimumWidth(); commit ac0eeb43aa7cb0a8f906dd4f5871f98633563061 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:09:28 2015 +0200 convert Link<> to typed Change-Id: I2f59aec574ed2c5120c554bdff13a9efab6992df diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index cdfc471..c06e139 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -83,12 +83,12 @@ protected: MediatorListener* m_pListener; // thread to fill the queue - sal_uLong m_nCurrentID; + sal_uLong m_nCurrentID; // will be constantly increased with each message sent bool m_bValid; - Link<> m_aConnectionLostHdl; - Link<> m_aNewMessageHdl; + Link<Mediator*,void> m_aConnectionLostHdl; + Link<Mediator*,void> m_aNewMessageHdl; public: Mediator( int nSocket ); virtual ~Mediator(); @@ -117,25 +117,21 @@ public: MediatorMessage* GetNextMessage( bool bWait = false ); - Link<> SetConnectionLostHdl( const Link<>& rLink ) + void SetConnectionLostHdl( const Link<Mediator*,void>& rLink ) { - Link<> aRet = m_aConnectionLostHdl; m_aConnectionLostHdl = rLink; - return aRet; } - Link<> SetNewMessageHdl( const Link<>& rLink ) + void SetNewMessageHdl( const Link<Mediator*,void>& rLink ) { - Link<> aRet = m_aNewMessageHdl; m_aNewMessageHdl = rLink; - return aRet; } }; class MediatorListener : public osl::Thread { friend class Mediator; - private: +private: Mediator* m_pMediator; ::osl::Mutex m_aMutex; diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx index d0e3d33..92e0808 100644 --- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx +++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx @@ -132,7 +132,7 @@ protected: static std::vector<PluginConnector*> allConnectors; - DECL_LINK( NewMessageHdl, Mediator* ); + DECL_LINK_TYPED( NewMessageHdl, Mediator*, void ); DECL_LINK_TYPED( WorkOnNewMessageHdl, void*, void ); std::vector<NPStream*> m_aNPWrapStreams; diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index e89ded2a..3d16604 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -64,7 +64,7 @@ PluginConnector::~PluginConnector() } } -IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ ) +IMPL_LINK_NOARG_TYPED( PluginConnector, NewMessageHdl, Mediator*, void ) { osl::MutexGuard aGuard( m_aUserEventMutex ); bool bFound = false; @@ -75,9 +75,8 @@ IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ ) bFound = true; } if( ! bFound ) - return 0; + return; Application::PostUserEvent( LINK( this, PluginConnector, WorkOnNewMessageHdl ) ); - return 0; } IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx index c9d4296..bd079e5 100644 --- a/extensions/source/plugin/unx/npwrap.cxx +++ b/extensions/source/plugin/unx/npwrap.cxx @@ -63,13 +63,12 @@ Widget topLevel = NULL, topBox = NULL; int wakeup_fd[2] = { 0, 0 }; static bool bPluginAppQuit = false; -static long GlobalConnectionLostHdl( void* /*pInst*/, void* /*pArg*/ ) +static void GlobalConnectionLostHdl( void* /*pInst*/, Mediator* /*pArg*/ ) { SAL_WARN("extensions.plugin", "pluginapp exiting due to connection lost"); bool bSuccess = (4 == write(wakeup_fd[1], "xxxx", 4 )); SAL_WARN_IF(!bSuccess, "extensions.plugin", "short write"); - return 0; } extern "C" @@ -79,7 +78,7 @@ extern "C" return 0; } - #if ! ENABLE_GTK +#if ! ENABLE_GTK static void ThreadEventHandler( XtPointer /*client_data*/, int* /*source*/, XtInputId* id ) { char buf[256]; @@ -88,12 +87,10 @@ extern "C" while( (len = read( wakeup_fd[0], buf, sizeof( buf ) ) ) > 0 ) nLast = len-1; - if( ! bPluginAppQuit ) - { + if( ! bPluginAppQuit ) { if( ( nLast == -1 || buf[nLast] != 'x' ) && pConnector ) pConnector->CallWorkHandler(); - else - { + else { // it seems you can use XtRemoveInput only // safely from within the callback // why is that ? @@ -107,41 +104,39 @@ extern "C" } } } - #endif +#endif } -IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ ) +IMPL_LINK_NOARG_TYPED( PluginConnector, NewMessageHdl, Mediator*, void ) { (void) this; // loplugin:staticmethods SAL_INFO("extensions.plugin", "new message handler"); bool bSuccess = (4 == write(wakeup_fd[1], "cccc", 4)); SAL_WARN_IF(!bSuccess, "extensions.plugin", "short write"); - return 0; - } Widget createSubWidget( char* /*pPluginText*/, Widget shell, Window aParentWindow ) { Widget newWidget = XtVaCreateManagedWidget( #if defined USE_MOTIF - "drawingArea", - xmDrawingAreaWidgetClass, + "drawingArea", + xmDrawingAreaWidgetClass, #else - "", - compositeWidgetClass, + "", + compositeWidgetClass, #endif - shell, - XtNwidth, 200, - XtNheight, 200, - nullptr ); + shell, + XtNwidth, 200, + XtNheight, 200, + nullptr ); XtRealizeWidget( shell ); XtRealizeWidget( newWidget ); SAL_INFO( "extensions.plugin", "reparenting new widget " << XtWindow( newWidget ) << " to " - << aParentWindow); + << aParentWindow); XReparentWindow( pXtAppDisplay, XtWindow( shell ), aParentWindow, @@ -192,10 +187,9 @@ static oslModule LoadModule( const char* pPath ) static void CheckPlugin( const char* pPath ) { oslModule pLib = LoadModule( pPath ); - if (pLib != 0) - { + if (pLib != 0) { char*(*pNP_GetMIMEDescription)() = reinterpret_cast<char*(*)()>( - osl_getAsciiFunctionSymbol( pLib, "NP_GetMIMEDescription" )); + osl_getAsciiFunctionSymbol( pLib, "NP_GetMIMEDescription" )); if( pNP_GetMIMEDescription ) printf( "%s\n", pNP_GetMIMEDescription() ); else @@ -212,116 +206,112 @@ static void CheckPlugin( const char* pPath ) extern "C" { -static void signal_handler( int nSig ) -{ + static void signal_handler( int nSig ) + { #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "caught signal %d, exiting\n", nSig ); + fprintf( stderr, "caught signal %d, exiting\n", nSig ); #ifdef LINUX - void* pStack[64]; - int nStackLevels = backtrace( pStack, SAL_N_ELEMENTS(pStack) ); - backtrace_symbols_fd( pStack, nStackLevels, STDERR_FILENO ); + void* pStack[64]; + int nStackLevels = backtrace( pStack, SAL_N_ELEMENTS(pStack) ); + backtrace_symbols_fd( pStack, nStackLevels, STDERR_FILENO ); #endif #endif - if( pConnector ) - { - // ensure that a read on the other side will wakeup - delete pConnector; - pConnector = NULL; - } + if( pConnector ) { + // ensure that a read on the other side will wakeup + delete pConnector; + pConnector = NULL; + } - _exit(nSig); -} + _exit(nSig); + } #if ENABLE_GTK -static gboolean noClosure( gpointer ) -{ - return sal_True; -} + static gboolean noClosure( gpointer ) + { + return sal_True; + } // Xt events -static gboolean prepareXtEvent( GSource*, gint* ) -{ - int nMask = XtAppPending( app_context ); - return (nMask & XtIMAll) != 0; -} - -static gboolean checkXtEvent( GSource* ) -{ - int nMask = XtAppPending( app_context ); - return (nMask & XtIMAll) != 0; -} + static gboolean prepareXtEvent( GSource*, gint* ) + { + int nMask = XtAppPending( app_context ); + return (nMask & XtIMAll) != 0; + } -static gboolean dispatchXtEvent( GSource*, GSourceFunc, gpointer ) -{ - XtAppProcessEvent( app_context, XtIMAll ); - return sal_True; -} + static gboolean checkXtEvent( GSource* ) + { + int nMask = XtAppPending( app_context ); + return (nMask & XtIMAll) != 0; + } -static GSourceFuncs aXtEventFuncs = -{ - prepareXtEvent, - checkXtEvent, - dispatchXtEvent, - NULL, - noClosure, - NULL -}; - -static gboolean pollXtTimerCallback(gpointer) -{ - for(int i = 0; i < 5; i++) + static gboolean dispatchXtEvent( GSource*, GSourceFunc, gpointer ) { - if( (XtAppPending(app_context) & (XtIMAll & ~XtIMXEvent)) == 0 ) - break; - XtAppProcessEvent(app_context, XtIMAll & ~XtIMXEvent); + XtAppProcessEvent( app_context, XtIMAll ); + return sal_True; } - return sal_True; -} -static gboolean prepareWakeupEvent( GSource*, gint* ) -{ - struct pollfd aPoll = { wakeup_fd[0], POLLIN, 0 }; - (void)poll(&aPoll, 1, 0); - return (aPoll.revents & POLLIN ) != 0; -} + static GSourceFuncs aXtEventFuncs = { + prepareXtEvent, + checkXtEvent, + dispatchXtEvent, + NULL, + noClosure, + NULL + }; -static gboolean checkWakeupEvent( GSource* pSource ) -{ - gint nDum = 0; - return prepareWakeupEvent( pSource, &nDum ); -} + static gboolean pollXtTimerCallback(gpointer) + { + for(int i = 0; i < 5; i++) { + if( (XtAppPending(app_context) & (XtIMAll & ~XtIMXEvent)) == 0 ) + break; + XtAppProcessEvent(app_context, XtIMAll & ~XtIMXEvent); + } + return sal_True; + } -static gboolean dispatchWakeupEvent( GSource*, GSourceFunc, gpointer ) -{ - char buf[256]; - // clear pipe - int len, nLast = -1; - - while( (len = read( wakeup_fd[0], buf, sizeof( buf ) ) ) > 0 ) - nLast = len-1; - if( ( nLast == -1 || buf[nLast] != 'x' ) && pConnector ) - pConnector->CallWorkHandler(); - else + static gboolean prepareWakeupEvent( GSource*, gint* ) { - XtAppSetExitFlag( app_context ); - bPluginAppQuit = true; + struct pollfd aPoll = { wakeup_fd[0], POLLIN, 0 }; + (void)poll(&aPoll, 1, 0); + return (aPoll.revents & POLLIN ) != 0; + } - delete pConnector; - pConnector = NULL; + static gboolean checkWakeupEvent( GSource* pSource ) + { + gint nDum = 0; + return prepareWakeupEvent( pSource, &nDum ); } - return sal_True; -} + static gboolean dispatchWakeupEvent( GSource*, GSourceFunc, gpointer ) + { + char buf[256]; + // clear pipe + int len, nLast = -1; -static GSourceFuncs aWakeupEventFuncs = { - prepareWakeupEvent, - checkWakeupEvent, - dispatchWakeupEvent, - NULL, - noClosure, - NULL -}; + while( (len = read( wakeup_fd[0], buf, sizeof( buf ) ) ) > 0 ) + nLast = len-1; + if( ( nLast == -1 || buf[nLast] != 'x' ) && pConnector ) + pConnector->CallWorkHandler(); + else { + XtAppSetExitFlag( app_context ); + bPluginAppQuit = true; + + delete pConnector; + pConnector = NULL; + } + + return sal_True; + } + + static GSourceFuncs aWakeupEventFuncs = { + prepareWakeupEvent, + checkWakeupEvent, + dispatchWakeupEvent, + NULL, + noClosure, + NULL + }; #endif // GTK @@ -345,8 +335,7 @@ int main( int argc, char **argv) pBaseName--; LoadAdditionalLibs( pBaseName ); - if( argc == 2 ) - { + if( argc == 2 ) { CheckPlugin(argv[1]); exit(0); } @@ -355,8 +344,7 @@ int main( int argc, char **argv) XSetErrorHandler( plugin_x_error_handler ); - if( pipe( wakeup_fd ) ) - { + if( pipe( wakeup_fd ) ) { SAL_WARN("extensions.plugin", "could not pipe()"); return 1; } @@ -364,43 +352,38 @@ int main( int argc, char **argv) int flags; // set close-on-exec descriptor flag. - if ((flags = fcntl (wakeup_fd[0], F_GETFD)) != -1) - { + if ((flags = fcntl (wakeup_fd[0], F_GETFD)) != -1) { flags |= FD_CLOEXEC; (void)fcntl(wakeup_fd[0], F_SETFD, flags); } - if ((flags = fcntl (wakeup_fd[1], F_GETFD)) != -1) - { + if ((flags = fcntl (wakeup_fd[1], F_GETFD)) != -1) { flags |= FD_CLOEXEC; (void)fcntl(wakeup_fd[1], F_SETFD, flags); } // set non-blocking I/O flag. - if ((flags = fcntl (wakeup_fd[0], F_GETFL)) != -1) - { + if ((flags = fcntl (wakeup_fd[0], F_GETFL)) != -1) { flags |= O_NONBLOCK; (void)fcntl(wakeup_fd[0], F_SETFL, flags); } - if ((flags = fcntl (wakeup_fd[1], F_GETFL)) != -1) - { + if ((flags = fcntl (wakeup_fd[1], F_GETFL)) != -1) { flags |= O_NONBLOCK; (void)fcntl(wakeup_fd[1], F_SETFL, flags); } pPluginLib = LoadModule( argv[2] ); - if( ! pPluginLib ) - { + if( ! pPluginLib ) { exit(255); } int nSocket = atol( argv[1] ); - #if ENABLE_GTK +#if ENABLE_GTK g_thread_init(NULL); gtk_init(&argc, &argv); - #endif +#endif - pConnector = new PluginConnector( nSocket ); - pConnector->SetConnectionLostHdl( Link<>( NULL, GlobalConnectionLostHdl ) ); + pConnector = new PluginConnector( nSocket ); + pConnector->SetConnectionLostHdl( Link<Mediator*,void>( NULL, GlobalConnectionLostHdl ) ); XtSetLanguageProc( NULL, NULL, NULL ); @@ -409,13 +392,12 @@ int main( int argc, char **argv) pXtAppDisplay = XtOpenDisplay( app_context, NULL, "SOPlugin", "SOPlugin", NULL, 0, &argc, argv ); - #if ENABLE_GTK +#if ENABLE_GTK // integrate Xt events into GTK event loop GPollFD aXtPollDesc, aWakeupPollDesc; GSource* pXTSource = g_source_new( &aXtEventFuncs, sizeof(GSource) ); - if( !pXTSource ) - { + if( !pXTSource ) { SAL_WARN("extensions.plugin", "could not get Xt GSource"); return 1; } @@ -431,8 +413,7 @@ int main( int argc, char **argv) gint xt_polling_timer_id = g_timeout_add( 25, pollXtTimerCallback, NULL); // Initialize wakeup events listener GSource *pWakeupSource = g_source_new( &aWakeupEventFuncs, sizeof(GSource) ); - if ( pWakeupSource == NULL ) - { + if ( pWakeupSource == NULL ) { SAL_WARN("extensions.plugin", "could not get wakeup source"); return 1; } @@ -444,15 +425,15 @@ int main( int argc, char **argv) g_source_add_poll( pWakeupSource, &aWakeupPollDesc ); pAppDisplay = gdk_x11_display_get_xdisplay( gdk_display_get_default() ); - #else +#else pAppDisplay = pXtAppDisplay; XtAppAddInput( app_context, wakeup_fd[0], (XtPointer)XtInputReadMask, ThreadEventHandler, NULL ); - #endif +#endif - // send that we are ready to go + // send that we are ready to go MediatorMessage* pMessage = pConnector->Transact( "init req", 8, NULL ); @@ -461,15 +442,13 @@ int main( int argc, char **argv) #if OSL_DEBUG_LEVEL > 3 int nPID = getpid(); int nChild = fork(); - if( nChild == 0 ) - { + if( nChild == 0 ) { char pidbuf[16]; char* pArgs[] = { "xterm", "-sl", "2000", "-sb", "-e", "gdb", "pluginapp.bin", pidbuf, NULL }; sprintf( pidbuf, "%d", nPID ); execvp( pArgs[0], pArgs ); _exit(255); - } - else + } else sleep( 10 ); #endif @@ -480,20 +459,19 @@ int main( int argc, char **argv) // in ThreadEventHandler most of times; Xt will hang in select // (hat is in XtAppNextEvent). Have our own mainloop instead // of XtAppMainLoop - do - { - #if ENABLE_GTK + do { +#if ENABLE_GTK g_main_context_iteration( NULL, sal_True ); - #else +#else XtAppProcessEvent( app_context, XtIMAll ); - #endif +#endif } while( ! XtAppGetExitFlag( app_context ) && ! bPluginAppQuit ); SAL_INFO("extensions.plugin", "left plugin app main loop"); - #if ENABLE_GTK +#if ENABLE_GTK g_source_remove(xt_polling_timer_id); - #endif +#endif pNP_Shutdown(); SAL_INFO("extensions.plugin", "NP_Shutdown done"); commit 0535f42e5f09f56c9c101550f7cfedb40c761879 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:06:13 2015 +0200 convert Link<> to typed Change-Id: Ic3ce7783614d90a34f9c4414bbc7df9774091805 diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index cb24bb3..1ea2a33 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -665,7 +665,7 @@ void SAL_CALL OImageControlModel::startProduction( ) throw (RuntimeException, s } -IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic ) +IMPL_LINK_TYPED( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic, void ) { const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() : NULL ); m_bExternalGraphic = false; @@ -678,7 +678,6 @@ IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic ) DBG_UNHANDLED_EXCEPTION(); } m_bExternalGraphic = true; - return 1L; } diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx index cb0b05e..bfe2ddd 100644 --- a/forms/source/component/ImageControl.hxx +++ b/forms/source/component/ImageControl.hxx @@ -142,7 +142,7 @@ protected: */ bool impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator ); - DECL_LINK( OnImageImportDone, ::Graphic* ); + DECL_LINK_TYPED( OnImageImportDone, ::Graphic*, void ); }; typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XMouseListener diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index e0f8050..5e05c52 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -856,7 +856,7 @@ namespace frm } } - IMPL_LINK( OClickableImageBaseModel, OnImageImportDone, Graphic*, i_pGraphic ) + IMPL_LINK_TYPED( OClickableImageBaseModel, OnImageImportDone, Graphic*, i_pGraphic, void ) { const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Graphic(i_pGraphic->GetBitmapEx()).GetXGraphic() : NULL ); if ( !xGraphic.is() ) @@ -868,7 +868,6 @@ namespace frm m_xGraphicObject = css::graphic::GraphicObject::create( m_xContext ); m_xGraphicObject->setGraphic( xGraphic ); } - return 1L; } diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx index 30df1ce..4732cda 100644 --- a/forms/source/component/clickableimage.hxx +++ b/forms/source/component/clickableimage.hxx @@ -153,7 +153,7 @@ namespace frm // to be called from within the cloning-ctor of your derived class void implInitializeImageURL( ); - DECL_LINK( OnImageImportDone, ::Graphic* ); + DECL_LINK_TYPED( OnImageImportDone, ::Graphic*, void ); }; class ImageModelMethodGuard : public ::osl::MutexGuard diff --git a/forms/source/component/imgprod.hxx b/forms/source/component/imgprod.hxx index ce8ce14..5dcafed 100644 --- a/forms/source/component/imgprod.hxx +++ b/forms/source/component/imgprod.hxx @@ -52,15 +52,15 @@ private: typedef boost::ptr_vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > > ConsumerList_t; - OUString maURL; + OUString maURL; ConsumerList_t maConsList; Graphic* mpGraphic; SvStream* mpStm; sal_uInt32 mnTransIndex; - bool mbConsInit; - Link<> maDoneHdl; + bool mbConsInit; + Link<Graphic*,void> maDoneHdl; - bool ImplImportGraphic( Graphic& rGraphic ); + bool ImplImportGraphic( Graphic& rGraphic ); void ImplUpdateData( const Graphic& rGraphic ); void ImplInitConsumer( const Graphic& rGraphic ); void ImplUpdateConsumer( const Graphic& rGraphic ); @@ -75,7 +75,7 @@ public: void NewDataAvailable(); - void SetDoneHdl( const Link<>& i_rHdl ) { maDoneHdl = i_rHdl; } + void SetDoneHdl( const Link<Graphic*,void>& i_rHdl ) { maDoneHdl = i_rHdl; } // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; commit a609822d5e773fb5ba88352781295cb2ad99a585 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 09:00:08 2015 +0200 remove unused Link<> field Change-Id: I4d9f7d0fb1a2621121aa26f1ddff0a04116bc561 diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 6122557..bb6b3cd 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -192,7 +192,6 @@ IMPL_LINK_NOARG(OSqlEdit, ModifyHdl) rController.InvalidateFeature(SID_CUT); rController.InvalidateFeature(SID_COPY); - m_lnkTextModifyHdl.Call(NULL); return 0; } diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx index 3d1495f..d33b037 100644 --- a/dbaccess/source/ui/inc/sqledit.hxx +++ b/dbaccess/source/ui/inc/sqledit.hxx @@ -41,9 +41,8 @@ namespace dbaui Timer m_timerInvalidate; Timer m_timerUndoActionCreation; - Link<> m_lnkTextModifyHdl; OUString m_strOrigText; // is restored on undo - VclPtr<OQueryTextView> m_pView; + VclPtr<OQueryTextView> m_pView; bool m_bAccelAction; // is set on cut, copy, paste bool m_bStopTimer; svtools::ColorConfig m_ColorConfig; @@ -79,10 +78,6 @@ namespace dbaui // To prevent this, SlotExec in View can call this function. bool IsInAccelAct() { return m_bAccelAction; } - void SetTextModifyHdl(const Link<>& lnk) { m_lnkTextModifyHdl = lnk; } - // please don't use SetModifyHdl, I need it for myself, this here is called from the handler set with that - // the link gets a pointer-to-string, which is invalid after the link - void stopTimer(); void startTimer(); commit 56de0d310f4b31fd4501460344b7e8f4458a53ee Author: Noel Grandin <[email protected]> Date: Thu Sep 17 08:43:56 2015 +0200 convert Link<> to typed Change-Id: Iff53217807be85cbcd5f850739f8b0949521fca2 diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 8f5df59..19c4daf 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -120,7 +120,7 @@ namespace dbaui bool bValid = true; if (m_aEndEditHdl.IsSet()) - bValid = (0 != m_aEndEditHdl.Call(_pEntry)); + bValid = m_aEndEditHdl.Call(_pEntry); if (bValid) return true; @@ -154,7 +154,7 @@ namespace dbaui bool bReturn = SvTreeListBox::Select(pEntry, _bSelect); if (m_aSelectHdl.IsSet() && !m_bSuspendSelectHdl && _bSelect) - m_aSelectHdl.Call(this); + m_aSelectHdl.Call(*this); return bReturn; } @@ -304,7 +304,7 @@ namespace dbaui pNewEntry->SetUserData(reinterpret_cast< void* >(sal_Int32(aIndexLoop - m_pIndexes->begin()))); } - OnIndexSelected(m_pIndexList); + OnIndexSelected(*m_pIndexList); } DbaIndexDialog::~DbaIndexDialog( ) @@ -403,7 +403,7 @@ namespace dbaui // select the entry and start in-place editing m_pIndexList->SelectNoHandlerCall(pNewEntry); - OnIndexSelected(m_pIndexList); + OnIndexSelected(*m_pIndexList); m_pIndexList->EditEntry(pNewEntry); updateToolbox(); } @@ -477,7 +477,7 @@ namespace dbaui // the Remove automatically selected another entry (if possible), but we disabled the calling of the handler // to prevent that we missed something ... call the handler directly - OnIndexSelected(m_pIndexList); + OnIndexSelected(*m_pIndexList); } return !aExceptionInfo.isValid(); @@ -610,7 +610,7 @@ namespace dbaui m_pIndexList->EditEntry(_pEntry); } - IMPL_LINK( DbaIndexDialog, OnEntryEdited, SvTreeListEntry*, _pEntry ) + IMPL_LINK_TYPED( DbaIndexDialog, OnEntryEdited, SvTreeListEntry*, _pEntry, bool ) { Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); @@ -630,7 +630,7 @@ namespace dbaui updateToolbox(); m_bEditAgain = true; PostUserEvent(LINK(this, DbaIndexDialog, OnEditIndexAgain), _pEntry, true); - return 0L; + return false; } aPosition->sName = sNewName; @@ -640,7 +640,7 @@ namespace dbaui { updateToolbox(); // no commitment needed here .... - return 1L; + return true; } if (aPosition->sName != aPosition->getOriginalName()) @@ -649,7 +649,7 @@ namespace dbaui updateToolbox(); } - return 1L; + return true; } bool DbaIndexDialog::implSaveModified(bool _bPlausibility) @@ -775,7 +775,7 @@ namespace dbaui } } - IMPL_LINK( DbaIndexDialog, OnIndexSelected, DbaIndexList*, /*NOTINTERESTEDIN*/ ) + IMPL_LINK_NOARG_TYPED( DbaIndexDialog, OnIndexSelected, DbaIndexList&, void ) { m_pIndexList->EndSelection(); @@ -788,7 +788,7 @@ namespace dbaui if (!implCommitPreviouslySelected()) { m_pIndexList->SelectNoHandlerCall(m_pPreviousSelection); - return 1L; + return; } } @@ -809,7 +809,6 @@ namespace dbaui m_pPreviousSelection = pNewSelection; updateToolbox(); - return 0L; } void DbaIndexDialog::StateChanged( StateChangedType nType ) { diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index 3bcdc37..1519113 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -43,18 +43,18 @@ namespace dbaui { protected: css::uno::Reference< css::sdbc::XConnection > m_xConnection; - Link<> m_aSelectHdl; - Link<> m_aEndEditHdl; - bool m_bSuspendSelectHdl; + Link<DbaIndexList&,void> m_aSelectHdl; + Link<SvTreeListEntry*,bool> m_aEndEditHdl; + bool m_bSuspendSelectHdl; public: DbaIndexList(vcl::Window* _pParent, WinBits nWinBits); - void SetSelectHdl(const Link<>& _rHdl) { m_aSelectHdl = _rHdl; } - Link<> GetSelectHdl() const { return m_aSelectHdl; } + void SetSelectHdl(const Link<DbaIndexList&,void>& _rHdl) { m_aSelectHdl = _rHdl; } + Link<DbaIndexList&,void> GetSelectHdl() const { return m_aSelectHdl; } - void SetEndEditHdl(const Link<>& _rHdl) { m_aEndEditHdl = _rHdl; } - Link<> GetEndEditHdl() const { return m_aEndEditHdl; } + void SetEndEditHdl(const Link<SvTreeListEntry*,bool>& _rHdl) { m_aEndEditHdl = _rHdl; } + Link<SvTreeListEntry*,bool> GetEndEditHdl() const { return m_aEndEditHdl; } virtual bool Select(SvTreeListEntry* pEntry, bool bSelect) SAL_OVERRIDE; @@ -130,9 +130,9 @@ namespace dbaui void updateControls(const SvTreeListEntry* _pEntry); protected: - DECL_LINK( OnIndexSelected, DbaIndexList* ); + DECL_LINK_TYPED( OnIndexSelected, DbaIndexList&, void ); DECL_LINK_TYPED( OnIndexAction, ToolBox*, void ); - DECL_LINK( OnEntryEdited, SvTreeListEntry* ); + DECL_LINK_TYPED( OnEntryEdited, SvTreeListEntry*, bool ); DECL_LINK_TYPED( OnModifiedClick, Button*, void ); DECL_LINK( OnModified, void* ); DECL_LINK_TYPED( OnCloseDialog, Button*, void ); commit 02fd846d2350fd57b0270cd85e475784d9cfa8fd Author: Noel Grandin <[email protected]> Date: Thu Sep 17 08:41:29 2015 +0200 convert Link<> to typed Change-Id: I6c0898db47b39648bb143ad040864c0279269f96 diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index b45ea63..c3e6828 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -904,9 +904,9 @@ void OAppDetailPageHelper::elementRemoved( ElementType _eType,const OUString& _r } } -IMPL_LINK(OAppDetailPageHelper, OnEntryEnterKey, void*, _pTree) +IMPL_LINK_TYPED(OAppDetailPageHelper, OnEntryEnterKey, DBTreeListBox*, _pTree, void ) { - return OnEntryDoubleClick(static_cast<SvTreeListBox*>(_pTree)) ? 0 : 1; + OnEntryDoubleClick(_pTree); } IMPL_LINK_TYPED(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree, bool) { diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index ad26c24..1666f16 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -152,7 +152,7 @@ namespace dbaui DBTreeListBox* createSimpleTree( const OString& _sHelpId, const Image& _rImage); DECL_LINK_TYPED( OnEntryDoubleClick, SvTreeListBox*, bool ); - DECL_LINK( OnEntryEnterKey, void* ); + DECL_LINK_TYPED( OnEntryEnterKey, DBTreeListBox*, void ); DECL_LINK_TYPED( OnEntrySelChange, LinkParamNone*, void ); DECL_LINK_TYPED( OnCutEntry, LinkParamNone*, void ); diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index 61997c2..9e6c42b 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -66,7 +66,7 @@ namespace dbaui Link<LinkParamNone*,void> m_aCopyHandler; // called when someone press CTRL+C Link<LinkParamNone*,void> m_aPasteHandler; // called when someone press CTRL+V Link<LinkParamNone*,void> m_aDeleteHandler; // called when someone press DELETE Key - Link<> m_aEnterKeyHdl; + Link<DBTreeListBox*,void> m_aEnterKeyHdl; bool m_bHandleEnterKey; @@ -117,7 +117,7 @@ namespace dbaui virtual PopupMenu* CreateContextMenu() SAL_OVERRIDE; virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) SAL_OVERRIDE; - void SetEnterKeyHdl(const Link<>& rNewHdl) {m_aEnterKeyHdl = rNewHdl;} + void SetEnterKeyHdl(const Link<DBTreeListBox*,void>& rNewHdl) {m_aEnterKeyHdl = rNewHdl;} void clearCurrentSelection() { m_aSelectedEntries.clear(); } commit b1263112b6bda61f6571727e61cc6e660f9d2d33 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 08:38:27 2015 +0200 remove unused Link<> fields Change-Id: I25bcec20f3a981ea681e29a0a1ef0726fa5e7e1c diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 6ce7320..cd213ba 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -378,9 +378,9 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt ) SvTreeListBox::KeyInput(rKEvt); } -bool DBTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& /*_aSelection*/) +bool DBTreeListBox::EditingEntry( SvTreeListEntry* /*pEntry*/, Selection& /*_aSelection*/) { - return m_aEditingHandler.Call(pEntry) != 0; + return false; } bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) @@ -388,11 +388,6 @@ bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewTe DBTreeEditedEntry aEntry; aEntry.pEntry = pEntry; aEntry.aNewText = rNewText; - if(m_aEditedHandler.Call(&aEntry) != 0) - { - implStopSelectionTimer(); - m_aSelectedEntries.erase( pEntry ); - } SetEntryText(pEntry,aEntry.aNewText); return false; // we never want that the base change our text diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index 477276c..61997c2 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -66,8 +66,6 @@ namespace dbaui Link<LinkParamNone*,void> m_aCopyHandler; // called when someone press CTRL+C Link<LinkParamNone*,void> m_aPasteHandler; // called when someone press CTRL+V Link<LinkParamNone*,void> m_aDeleteHandler; // called when someone press DELETE Key - Link<> m_aEditingHandler; // called before someone will edit an entry - Link<> m_aEditedHandler; // called after someone edited an entry Link<> m_aEnterKeyHdl; bool m_bHandleEnterKey; commit d048ba568fd54d8f1839fddc37ed4b75f1d01064 Author: Noel Grandin <[email protected]> Date: Thu Sep 17 08:26:43 2015 +0200 convert Link<> to typed Change-Id: Ie331012fa9beed1da99d3741d816fb8ac0e94d6d diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index d2c2585..b45ea63 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -915,34 +915,29 @@ IMPL_LINK_TYPED(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree return bHandled; } -IMPL_LINK_NOARG(OAppDetailPageHelper, OnEntrySelChange) +IMPL_LINK_NOARG_TYPED(OAppDetailPageHelper, OnEntrySelChange, LinkParamNone*, void) { getBorderWin().getView()->getAppController().onSelectionChanged(); - return 1L; } -IMPL_LINK_NOARG( OAppDetailPageHelper, OnCutEntry ) +IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnCutEntry, LinkParamNone*, void ) { getBorderWin().getView()->getAppController().onCutEntry(); - return 1L; } -IMPL_LINK_NOARG( OAppDetailPageHelper, OnCopyEntry ) +IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnCopyEntry, LinkParamNone*, void ) { getBorderWin().getView()->getAppController().onCopyEntry(); - return 1L; } -IMPL_LINK_NOARG( OAppDetailPageHelper, OnPasteEntry ) +IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnPasteEntry, LinkParamNone*, void ) { getBorderWin().getView()->getAppController().onPasteEntry(); - return 1L; } -IMPL_LINK_NOARG( OAppDetailPageHelper, OnDeleteEntry ) +IMPL_LINK_NOARG_TYPED( OAppDetailPageHelper, OnDeleteEntry, LinkParamNone*, void ) { getBorderWin().getView()->getAppController().onDeleteEntry(); - return 1L; } void OAppDetailPageHelper::Resize() diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index ab23316..ad26c24 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -153,12 +153,12 @@ namespace dbaui DECL_LINK_TYPED( OnEntryDoubleClick, SvTreeListBox*, bool ); DECL_LINK( OnEntryEnterKey, void* ); - DECL_LINK( OnEntrySelChange, void* ); + DECL_LINK_TYPED( OnEntrySelChange, LinkParamNone*, void ); - DECL_LINK( OnCutEntry, void* ); - DECL_LINK( OnCopyEntry, void* ); - DECL_LINK( OnPasteEntry, void* ); - DECL_LINK( OnDeleteEntry, void* ); + DECL_LINK_TYPED( OnCutEntry, LinkParamNone*, void ); + DECL_LINK_TYPED( OnCopyEntry, LinkParamNone*, void ); + DECL_LINK_TYPED( OnPasteEntry, LinkParamNone*, void ); + DECL_LINK_TYPED( OnDeleteEntry, LinkParamNone*, void ); // click a TB slot DECL_LINK_TYPED(OnDropdownClickHdl, ToolBox*, void); diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index 6d8fedd..8f252fb 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -63,12 +63,12 @@ void DBTreeView::dispose() vcl::Window::dispose(); } -void DBTreeView::SetPreExpandHandler(const Link<>& _rHdl) +void DBTreeView::SetPreExpandHandler(const Link<SvTreeListEntry*,bool>& _rHdl) { m_pTreeListBox->SetPreExpandHandler(_rHdl); } -void DBTreeView::setCopyHandler(const Link<>& _rHdl) +void DBTreeView::setCopyHandler(const Link<LinkParamNone*,void>& _rHdl) { m_pTreeListBox->setCopyHandler(_rHdl); } @@ -86,7 +86,7 @@ void DBTreeView::setModel(SvTreeList* _pTreeModel) m_pTreeListBox->SetModel(_pTreeModel); } -void DBTreeView::setSelChangeHdl( const Link<>& _rHdl ) +void DBTreeView::setSelChangeHdl( const Link<LinkParamNone*,void>& _rHdl ) { m_pTreeListBox->SetSelChangeHdl( _rHdl ); } diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx index a3d237d..378ae86 100644 --- a/dbaccess/source/ui/browser/dbtreeview.hxx +++ b/dbaccess/source/ui/browser/dbtreeview.hxx @@ -23,6 +23,8 @@ #include <vcl/window.hxx> class SvTreeList; +class SvTreeListEntry; + namespace dbaui { class DBTreeListBox; @@ -46,17 +48,16 @@ namespace dbaui <p>When calling the link, the parameter is an SvTreeListEntry marking the entry to be expanded. </p> */ - void SetPreExpandHandler(const Link<>& _rHdl); - /// gets the currently set NodeExpansionHandler + void SetPreExpandHandler(const Link<SvTreeListEntry*,bool>& _rHdl); - void setCopyHandler(const Link<>& _rHdl); + void setCopyHandler(const Link<LinkParamNone*,void>& _rHdl); void setModel(SvTreeList* _pTreeModel); - void setSelChangeHdl(const Link<>& _rHdl); + void setSelChangeHdl(const Link<LinkParamNone*,void>& _rHdl); DBTreeListBox& getListBox() const { return *m_pTreeListBox; } - virtual void GetFocus() SAL_OVERRIDE; + virtual void GetFocus() SAL_OVERRIDE; }; } diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index 2f51473..a9e44ac 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -193,12 +193,11 @@ namespace dbaui return NULL != pTransfer; } - IMPL_LINK_NOARG(SbaTableQueryBrowser, OnCopyEntry) + IMPL_LINK_NOARG_TYPED(SbaTableQueryBrowser, OnCopyEntry, LinkParamNone*, void) { SvTreeListEntry* pSelected = m_pTreeView->getListBox().FirstSelected(); if( isEntryCopyAllowed( pSelected ) ) copyEntry( pSelected ); - return 0; } bool SbaTableQueryBrowser::isEntryCopyAllowed(SvTreeListEntry* _pEntry) const { diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 7d9b19c..ee1fdd0 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2156,11 +2156,11 @@ SvTreeListEntry* SbaTableQueryBrowser::implAppendEntry( SvTreeListEntry* _pParen return pNewEntry; } -IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) +IMPL_LINK_TYPED(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent, bool) { if (_pParent->HasChildren()) // nothing to do... - return 1L; + return true; SvTreeListEntry* pFirstParent = m_pTreeView->getListBox().GetRootLevelParent(_pParent); OSL_ENSURE(pFirstParent,"SbaTableQueryBrowser::OnExpandEntry: No rootlevelparent!"); @@ -2249,7 +2249,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) showError(aInfo); } else - return 0L; + return false; // 0 indicates that an error occurred } else @@ -2261,7 +2261,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) populateTree( xCollection, _pParent, etQuery ); } } - return 1L; + return true; } bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) @@ -2489,9 +2489,9 @@ bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OU return false; } -IMPL_LINK_NOARG(SbaTableQueryBrowser, OnSelectionChange) +IMPL_LINK_NOARG_TYPED(SbaTableQueryBrowser, OnSelectionChange, LinkParamNone*, void) { - return implSelect( m_pTreeView->getListBox().FirstSelected() ) ? 1L : 0L; + implSelect( m_pTreeView->getListBox().FirstSelected() ); } SvTreeListEntry* SbaTableQueryBrowser::implGetConnectionEntry(SvTreeListEntry* _pEntry) const diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index 9bf8d85..477276c 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -54,23 +54,23 @@ namespace dbaui OScrollHelper m_aScrollHelper; Timer m_aTimer; // is needed for table updates Point m_aMousePos; - std::set<SvTreeListEntry*> m_aSelectedEntries; - SvTreeListEntry* m_pDragedEntry; + std::set<SvTreeListEntry*> m_aSelectedEntries; + SvTreeListEntry* m_pDragedEntry; IControlActionListener* m_pActionListener; IContextMenuProvider* m_pContextMenuProvider; - Link<> m_aPreExpandHandler; // handler to be called before a node is expanded - Link<> m_aSelChangeHdl; // handlet to be called (asynchronously) when the selection changes in any way - Link<> m_aCutHandler; // called when someone press CTRL+X - Link<> m_aCopyHandler; // called when someone press CTRL+C - Link<> m_aPasteHandler; // called when someone press CTRL+V - Link<> m_aDeleteHandler; // called when someone press DELETE Key + Link<SvTreeListEntry*,bool> m_aPreExpandHandler; // handler to be called before a node is expanded + Link<LinkParamNone*,void> m_aSelChangeHdl; // handlet to be called (asynchronously) when the selection changes in any way + Link<LinkParamNone*,void> m_aCutHandler; // called when someone press CTRL+X + Link<LinkParamNone*,void> m_aCopyHandler; // called when someone press CTRL+C + Link<LinkParamNone*,void> m_aPasteHandler; // called when someone press CTRL+V + Link<LinkParamNone*,void> m_aDeleteHandler; // called when someone press DELETE Key Link<> m_aEditingHandler; // called before someone will edit an entry Link<> m_aEditedHandler; // called after someone edited an entry Link<> m_aEnterKeyHdl; - bool m_bHandleEnterKey; + bool m_bHandleEnterKey; private: void init(); @@ -89,12 +89,12 @@ namespace dbaui void setControlActionListener( IControlActionListener* _pListener ) { m_pActionListener = _pListener; } void setContextMenuProvider( IContextMenuProvider* _pContextMenuProvider ) { m_pContextMenuProvider = _pContextMenuProvider; } - void SetPreExpandHandler(const Link<>& _rHdl) { m_aPreExpandHandler = _rHdl; } - void SetSelChangeHdl( const Link<>& _rHdl ) { m_aSelChangeHdl = _rHdl; } - void setCutHandler(const Link<>& _rHdl) { m_aCutHandler = _rHdl; } - void setCopyHandler(const Link<>& _rHdl) { m_aCopyHandler = _rHdl; } - void setPasteHandler(const Link<>& _rHdl) { m_aPasteHandler = _rHdl; } - void setDeleteHandler(const Link<>& _rHdl) { m_aDeleteHandler = _rHdl; } + void SetPreExpandHandler(const Link<SvTreeListEntry*,bool>& _rHdl) { m_aPreExpandHandler = _rHdl; } + void SetSelChangeHdl( const Link<LinkParamNone*,void>& _rHdl ) { m_aSelChangeHdl = _rHdl; } + void setCutHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aCutHandler = _rHdl; } + void setCopyHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aCopyHandler = _rHdl; } + void setPasteHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aPasteHandler = _rHdl; } + void setDeleteHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aDeleteHandler = _rHdl; } // modified the given entry so that the expand handler is called whenever the entry is expanded // (normally, the expand handler is called only once) diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 86a48c0..e113fb3 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -347,10 +347,10 @@ namespace dbaui OUString GetEntryText( SvTreeListEntry* _pEntry ) const; // is called when a table or a query was selected - DECL_LINK( OnSelectionChange, void* ); - DECL_LINK( OnExpandEntry, SvTreeListEntry* ); + DECL_LINK_TYPED( OnSelectionChange, LinkParamNone*, void ); + DECL_LINK_TYPED( OnExpandEntry, SvTreeListEntry*, bool ); - DECL_LINK( OnCopyEntry, void* ); + DECL_LINK_TYPED( OnCopyEntry, LinkParamNone*, void ); DECL_LINK_TYPED( OnTreeEntryCompare, const SvSortData&, sal_Int32 ); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
