diff options
Diffstat (limited to 'sc/source/ui/dbgui/filtdlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/filtdlg.cxx | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 15cf1d13dc42..94b1148af7b7 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -764,14 +764,14 @@ IMPL_LINK_TYPED( ScFilterDlg, TimeOutHdl, Timer*, _pTimer, void ) pTimer->Start(); } -IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScFilterDlg, LbSelectHdl, ListBox&, rLb, void ) { /* * Handle enable/disable logic depending on which ListBox was selected */ sal_uInt16 nOffset = GetSliderPos(); - if ( pLb == pLbConnect1 ) + if ( &rLb == pLbConnect1 ) { pLbField1->Enable(); pLbCond1->Enable(); @@ -785,7 +785,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery[nQE] = true; } - else if ( pLb == pLbConnect2 ) + else if ( &rLb == pLbConnect2 ) { pLbField2->Enable(); pLbCond2->Enable(); @@ -798,7 +798,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery.resize(nQE + 1, false); maRefreshExceptQuery[nQE]=true; } - else if ( pLb == pLbConnect3 ) + else if ( &rLb == pLbConnect3 ) { pLbField3->Enable(); pLbCond3->Enable(); @@ -812,7 +812,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery[nQE] = true; } - else if ( pLb == pLbConnect4 ) + else if ( &rLb == pLbConnect4 ) { pLbField4->Enable(); pLbCond4->Enable(); @@ -825,7 +825,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery.resize(nQE + 1, false); maRefreshExceptQuery[nQE] = true; } - else if ( pLb == pLbField1 ) + else if ( &rLb == pLbField1 ) { if ( pLbField1->GetSelectEntryPos() == 0 ) { @@ -874,11 +874,11 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) pLbConnect2->Enable(); } theQueryData.GetEntry(nOffset).bDoQuery = true; - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); theQueryData.GetEntry(nOffset).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } } - else if ( pLb == pLbField2 ) + else if ( &rLb == pLbField2 ) { if ( pLbField2->GetSelectEntryPos() == 0 ) { @@ -920,13 +920,13 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) { pLbConnect3->Enable(); } - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); sal_uInt16 nQ=1+nOffset; theQueryData.GetEntry(nQ).bDoQuery = true; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } } - else if ( pLb == pLbField3 ) + else if ( &rLb == pLbField3 ) { if ( pLbField3->GetSelectEntryPos() == 0 ) { @@ -961,14 +961,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) pLbConnect4->Enable(); } - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); sal_uInt16 nQ=2+nOffset; theQueryData.GetEntry(nQ).bDoQuery = true; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } } - else if ( pLb == pLbField4 ) + else if ( &rLb == pLbField4 ) { if ( pLbField4->GetSelectEntryPos() == 0 ) { @@ -988,34 +988,32 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) else { UpdateValueList( 4 ); - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); sal_uInt16 nQ=3+nOffset; theQueryData.GetEntry(nQ).bDoQuery = true; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ; } } - else if ( pLb == pLbCond1) + else if ( &rLb == pLbCond1) { - theQueryData.GetEntry(nOffset).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nOffset).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } - else if ( pLb == pLbCond2) + else if ( &rLb == pLbCond2) { sal_uInt16 nQ=1+nOffset; - theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nQ).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } - else if ( pLb == pLbCond3) + else if ( &rLb == pLbCond3) { sal_uInt16 nQ=2+nOffset; - theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nQ).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } else { sal_uInt16 nQ=3+nOffset; - theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nQ).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } - - return 0; } IMPL_LINK_TYPED( ScFilterDlg, CheckBoxHdl, Button*, pBox, void ) |