diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-10-04 15:05:38 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-12 10:48:13 +0000 |
commit | 3c99f8500f657ed84b316390d5175a6f5e56bc69 (patch) | |
tree | 749f16652560a50d409b12a23bf1a5d93b3cd2d5 /starmath | |
parent | bbadb38539eb233ac45b267034066a7274181c65 (diff) |
convert Link<> to typed
Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb
Reviewed-on: https://gerrit.libreoffice.org/19305
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/ElementsDockingWindow.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/dialog.hxx | 6 | ||||
-rw-r--r-- | starmath/inc/utility.hxx | 2 | ||||
-rw-r--r-- | starmath/source/ElementsDockingWindow.cxx | 7 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 14 | ||||
-rw-r--r-- | starmath/source/utility.cxx | 4 |
6 files changed, 14 insertions, 21 deletions
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx index c8ad31788839..a06e17338cd8 100644 --- a/starmath/inc/ElementsDockingWindow.hxx +++ b/starmath/inc/ElementsDockingWindow.hxx @@ -138,7 +138,7 @@ class SmElementsDockingWindow : public SfxDockingWindow SmViewShell* GetView(); void SelectClickHandler(SmElement* pElement); - DECL_LINK(ElementSelectedHandle, ListBox*); + DECL_LINK_TYPED(ElementSelectedHandle, ListBox&, void); public: diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index d09aabe38042..08e10e32aede 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -364,7 +364,7 @@ class SmSymbolDialog : public ModalDialog VclPtr<OutputDevice> pFontListDev; - DECL_LINK(SymbolSetChangeHdl, void*); + DECL_LINK_TYPED(SymbolSetChangeHdl, ListBox&, void); DECL_LINK_TYPED(SymbolChangeHdl, SmShowSymbolSetWindow&, void); DECL_LINK_TYPED(SymbolDblClickHdl, SmShowSymbol&, void); DECL_LINK_TYPED(SymbolDblClickHdl2, SmShowSymbolSetWindow&, void); @@ -437,8 +437,8 @@ class SmSymDefineDialog : public ModalDialog DECL_LINK(OldSymbolChangeHdl, ComboBox *); DECL_LINK(OldSymbolSetChangeHdl, ComboBox *); DECL_LINK(ModifyHdl, ComboBox *); - DECL_LINK(FontChangeHdl, ListBox *); - DECL_LINK(SubsetChangeHdl, ListBox*); + DECL_LINK_TYPED(FontChangeHdl, ListBox&, void); + DECL_LINK_TYPED(SubsetChangeHdl, ListBox&, void); DECL_LINK(StyleChangeHdl, ComboBox *); DECL_LINK_TYPED(CharHighlightHdl, SvxShowCharSet*, void); DECL_LINK_TYPED(AddClickHdl, Button *, void); diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index 7ba0a1e4f402..2b6ed9512046 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -149,7 +149,7 @@ public: class SmFontPickListBox : public SmFontPickList, public ListBox { protected: - DECL_LINK(SelectHdl, ListBox *); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); public: SmFontPickListBox(vcl::Window* pParent, WinBits nBits); diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index ae493da6c0a6..17735bf9e8c6 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -725,19 +725,18 @@ void SmElementsDockingWindow::SelectClickHandler( SmElement* pElement ) } } -IMPL_LINK( SmElementsDockingWindow, ElementSelectedHandle, ListBox*, pList) +IMPL_LINK_TYPED( SmElementsDockingWindow, ElementSelectedHandle, ListBox&, rList, void) { for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(aCategories) ; i++) { sal_uInt16 aCurrentCategory = aCategories[i]; OUString aCurrentCategoryString = SM_RESSTR(aCurrentCategory); - if (aCurrentCategoryString == pList->GetSelectEntry()) + if (aCurrentCategoryString == rList.GetSelectEntry()) { mpElementsControl->setElementSetId(aCurrentCategory); - return 0; + return; } } - return 0; } SmViewShell* SmElementsDockingWindow::GetView() diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index f8cf2e04796e..9e93e1f1b73b 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1450,10 +1450,9 @@ void SmSymbolDialog::FillSymbolSets(bool bDeleteText) } -IMPL_LINK_NOARG( SmSymbolDialog, SymbolSetChangeHdl ) +IMPL_LINK_NOARG_TYPED( SmSymbolDialog, SymbolSetChangeHdl, ListBox&, void ) { SelectSymbolSet(m_pSymbolSets->GetSelectEntry()); - return 0; } @@ -1843,21 +1842,19 @@ IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox ) } -IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, pListBox ) +IMPL_LINK_TYPED( SmSymDefineDialog, FontChangeHdl, ListBox&, rListBox, void ) { - (void) pListBox; + (void) rListBox; #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE(pListBox == pFonts, "Sm : wrong argument"); + OSL_ENSURE(&rListBox == pFonts, "Sm : wrong argument"); #endif SelectFont(pFonts->GetSelectEntry()); - return 0; } -IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, pListBox ) +IMPL_LINK_NOARG_TYPED( SmSymDefineDialog, SubsetChangeHdl, ListBox&, void ) { - (void) pListBox; sal_Int32 nPos = pFontsSubsetLB->GetSelectEntryPos(); if (LISTBOX_ENTRY_NOTFOUND != nPos) { @@ -1867,7 +1864,6 @@ IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, pListBox ) pCharsetDisplay->SelectCharacter( pSubset->GetRangeMin() ); } } - return 0; } diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 5083cbbda90f..39b04440402b 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -157,7 +157,7 @@ SmFontPickListBox::SmFontPickListBox (vcl::Window* pParent, WinBits nBits) : SetSelectHdl(LINK(this, SmFontPickListBox, SelectHdl)); } -IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ ) +IMPL_LINK_NOARG_TYPED( SmFontPickListBox, SelectHdl, ListBox&, void ) { OUString aString; @@ -172,8 +172,6 @@ IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ ) } SelectEntryPos(0); - - return 0; } SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList) |