From 3c99f8500f657ed84b316390d5175a6f5e56bc69 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 4 Oct 2015 15:05:38 +0200 Subject: convert Link<> to typed Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb Reviewed-on: https://gerrit.libreoffice.org/19305 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- vcl/source/control/lstbox.cxx | 2 +- vcl/source/control/tabctrl.cxx | 3 +-- vcl/source/window/printdlg.cxx | 21 +++++++++------------ 3 files changed, 11 insertions(+), 15 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 1ad96bb86b9e..b2998cac4051 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -961,7 +961,7 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt ) void ListBox::Select() { - ImplCallEventListenersAndHandler( VCLEVENT_LISTBOX_SELECT, [this] () { maSelectHdl.Call(this); } ); + ImplCallEventListenersAndHandler( VCLEVENT_LISTBOX_SELECT, [this] () { maSelectHdl.Call(*this); } ); } void ListBox::DoubleClick() diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index fb7798aa6258..1a725a30c818 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1002,10 +1002,9 @@ bool TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) return bRet; } -IMPL_LINK_NOARG(TabControl, ImplListBoxSelectHdl) +IMPL_LINK_NOARG_TYPED(TabControl, ImplListBoxSelectHdl, ListBox&, void) { SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectEntryPos() ) ); - return 0; } IMPL_LINK_TYPED( TabControl, ImplWindowEventListener, VclWindowEvent&, rEvent, void ) diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index b2185fcf070f..2b0996af513b 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1517,11 +1517,11 @@ void PrintDialog::updateNup() preparePreview( true, true ); } -IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox ) +IMPL_LINK_TYPED( PrintDialog, SelectHdl, ListBox&, rBox, void ) { - if( pBox == maJobPage.mpPrinters ) + if( &rBox == maJobPage.mpPrinters ) { - OUString aNewPrinter( pBox->GetSelectEntry() ); + OUString aNewPrinter( rBox.GetSelectEntry() ); // set new printer maPController->setPrinter( VclPtrInstance( aNewPrinter ) ); maPController->resetPrinterOptions( maOptionsPage.mpToFileBox->IsChecked() ); @@ -1529,18 +1529,16 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox ) updatePrinterText(); preparePreview( true ); } - else if( pBox == maNUpPage.mpNupOrientationBox || pBox == maNUpPage.mpNupOrderBox ) + else if( &rBox == maNUpPage.mpNupOrientationBox || &rBox == maNUpPage.mpNupOrderBox ) { updateNup(); } - else if( pBox == maNUpPage.mpNupPagesBox ) + else if( &rBox == maNUpPage.mpNupPagesBox ) { if( !maNUpPage.mpPagesBtn->IsChecked() ) maNUpPage.mpPagesBtn->Check(); updateNupFromPages(); } - - return 0; } IMPL_LINK_TYPED( PrintDialog, ToggleRadioHdl, RadioButton&, rButton, void ) @@ -1796,14 +1794,14 @@ IMPL_LINK_TYPED( PrintDialog, UIOption_RadioHdl, RadioButton&, i_rBtn, void ) } } -IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox ) +IMPL_LINK_TYPED( PrintDialog, UIOption_SelectHdl, ListBox&, i_rBox, void ) { - PropertyValue* pVal = getValueForWindow( i_pBox ); + PropertyValue* pVal = getValueForWindow( &i_rBox ); if( pVal ) { - makeEnabled( i_pBox ); + makeEnabled( &i_rBox ); - sal_Int32 nVal( i_pBox->GetSelectEntryPos() ); + sal_Int32 nVal( i_rBox.GetSelectEntryPos() ); pVal->Value <<= nVal; //If we are in impress we start in print slides mode and get a @@ -1819,7 +1817,6 @@ IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox ) // update preview and page settings preparePreview(); } - return 0; } IMPL_LINK( PrintDialog, UIOption_ModifyHdl, Edit*, i_pBox ) -- cgit v1.2.3