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 /vcl/source | |
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 'vcl/source')
-rw-r--r-- | vcl/source/control/lstbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 21 |
3 files changed, 11 insertions, 15 deletions
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<Printer>( 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 ) |