diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-09 11:41:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-10 11:38:30 +0200 |
commit | f4e951a61a20edd6efbd244966e851aa378e66ad (patch) | |
tree | f4879e437b88432069001e7e3dadd2649cd33a14 /vcl/source/window/printdlg.cxx | |
parent | 823150ff153a6e02781b1b2b09ea6eb528111d2e (diff) |
convert Link<> to typed
Change-Id: I603463d0486d4d0f21ebbdc6eca900db58bb090f
Diffstat (limited to 'vcl/source/window/printdlg.cxx')
-rw-r--r-- | vcl/source/window/printdlg.cxx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index acde652370fe..37fbfdc0c9b5 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -680,7 +680,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC maOptionsPage.mpPapersizeFromSetup->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) ); maJobPage.mpReverseOrderBox->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) ); maOptionsPage.mpCollateSingleJobsBox->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) ); - maNUpPage.mpPagesBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) ); + maNUpPage.mpPagesBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) ); // setup modify hdl mpPageEdit->SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) ); maJobPage.mpCopyCountField->SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) ); @@ -1006,7 +1006,7 @@ void PrintDialog::setupOptionalUI() pVal->Value >>= bVal; maNUpPage.mpBrochureBtn->Check( bVal ); maNUpPage.mpBrochureBtn->Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != NULL ); - maNUpPage.mpBrochureBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) ); + maNUpPage.mpBrochureBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) ); maPropertyToWindowMap[ aPropertyName ].push_back( maNUpPage.mpBrochureBtn ); maControlToPropertyMap[maNUpPage.mpBrochureBtn] = aPropertyName; @@ -1546,6 +1546,11 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox ) return 0; } +IMPL_LINK_TYPED( PrintDialog, ToggleRadioHdl, RadioButton&, rButton, void ) +{ + ClickHdl(static_cast<Button*>(&rButton)); +} + IMPL_LINK( PrintDialog, ToggleHdl, void*, pButton ) { ClickHdl(static_cast<Button*>(pButton)); @@ -1774,18 +1779,18 @@ IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox ) return 0; } -IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn ) +IMPL_LINK_TYPED( PrintDialog, UIOption_RadioHdl, RadioButton&, i_rBtn, void ) { // this handler gets called for all radiobuttons that get unchecked, too // however we only want one notificaction for the new value (that is for // the button that gets checked) - if( i_pBtn->IsChecked() ) + if( i_rBtn.IsChecked() ) { - PropertyValue* pVal = getValueForWindow( i_pBtn ); - auto it = maControlToNumValMap.find( i_pBtn ); + PropertyValue* pVal = getValueForWindow( &i_rBtn ); + auto it = maControlToNumValMap.find( &i_rBtn ); if( pVal && it != maControlToNumValMap.end() ) { - makeEnabled( i_pBtn ); + makeEnabled( &i_rBtn ); sal_Int32 nVal = it->second; pVal->Value <<= nVal; @@ -1800,7 +1805,6 @@ IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn ) preparePreview(); } } - return 0; } IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox ) |