diff options
Diffstat (limited to 'sw/source')
82 files changed, 372 insertions, 385 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index df536dbefd2d..1342a77e5909 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -64,10 +64,9 @@ IMPL_LINK_NOARG_TYPED(SwBreakDlg, ClickHdl, Button*, void) CheckEnable(); } -IMPL_LINK_NOARG(SwBreakDlg, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwBreakDlg, SelectHdl, ListBox&, void) { CheckEnable(); - return 0; } // Handler for Change Page Number diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index b4f0596c8417..5fdcc7913349 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -768,11 +768,10 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) return 0; } -IMPL_LINK_NOARG(SwDropCapsPage, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwDropCapsPage, SelectHdl, ListBox&, void) { m_pPict->UpdatePaintSettings(); bModified = true; - return 0; } void SwDropCapsPage::FillSet( SfxItemSet &rSet ) diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 70d7ae6416c0..7427ce3e16c5 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -269,7 +269,7 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet) NewStartHdl_Impl(m_pNewStartCB); m_pNewStartNF->SaveValue(); m_pNewStartNumberCB->SaveValue(); - StyleHdl_Impl(m_pNumberStyleLB); + StyleHdl_Impl(*m_pNumberStyleLB.get()); if( SfxItemState::DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) { const SwFormatLineNumber& rNum = static_cast<const SwFormatLineNumber&>(rSet->Get(RES_LINENUMBER)); @@ -327,15 +327,13 @@ IMPL_LINK_NOARG_TYPED(SwParagraphNumTabPage, LineCountHdl_Impl, Button*, void) m_pRestartBX->Enable(bEnableRestartValue); } -IMPL_LINK_NOARG( SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl ) +IMPL_LINK_NOARG_TYPED( SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl, ListBox&, void ) { sal_Int32 numSelectPos = m_pNumberStyleLB->GetSelectEntryPos(); if ( numSelectPos == 0 ) m_pEditNumStyleBtn->Disable(); else m_pEditNumStyleBtn->Enable(); - - return 0; } IMPL_LINK_NOARG_TYPED(SwParagraphNumTabPage, EditNumStyleHdl_Impl, Button*, void) @@ -380,13 +378,11 @@ bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl( } -IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox ) +IMPL_LINK_TYPED( SwParagraphNumTabPage, StyleHdl_Impl, ListBox&, rBox, void ) { - bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0; + bool bEnable = bCurNumrule || rBox.GetSelectEntryPos() > 0; m_pNewStartCB->Enable(bEnable); NewStartHdl_Impl(m_pNewStartCB); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index c6296b218f71..9d8447bda9bf 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -87,8 +87,8 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pRemovePB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveClickHdl )); m_pAssignPB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveClickHdl )); m_pTbLinks->SetSelectHdl( LINK(this, SwCondCollPage, SelectTreeListBoxHdl)); - m_pStyleLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); - m_pFilterLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); + m_pStyleLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectListBoxHdl)); + m_pFilterLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectListBoxHdl)); m_pTbLinks->SetStyle(m_pTbLinks->GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN); m_pTbLinks->SetSelectionMode( SINGLE_SELECTION ); @@ -272,7 +272,11 @@ IMPL_LINK_TYPED( SwCondCollPage, SelectTreeListBoxHdl, SvTreeListBox*, pBox, voi { SelectHdl(pBox); } -IMPL_LINK( SwCondCollPage, SelectHdl, void*, pBox) +IMPL_LINK_TYPED( SwCondCollPage, SelectListBoxHdl, ListBox&, rBox, void) +{ + SelectHdl(&rBox); +} +void SwCondCollPage::SelectHdl(void* pBox) { if (pBox == m_pFilterLB) { @@ -306,7 +310,6 @@ IMPL_LINK( SwCondCollPage, SelectHdl, void*, pBox) if(pBox != m_pStyleLB) m_pRemovePB->Enable( m_pConditionCB->IsChecked() && !sTbEntry.isEmpty() ); } - return 0; } void SwCondCollPage::SetCollection(SwFormat* pFormat, bool bNew) diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index cc674d8f57ed..4cf969f803f3 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -308,13 +308,11 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) m_pFormattingLB->SetDropDownLineCount( m_pFormattingLB->GetEntryCount() ); } -IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwCompatibilityOptPage, SelectHdl, ListBox&, void) { const sal_Int32 nPos = m_pFormattingLB->GetSelectEntryPos(); sal_uLong nOptions = reinterpret_cast<sal_uLong>(m_pFormattingLB->GetEntryData( nPos )); SetCurrentOptions( nOptions ); - - return 0; } IMPL_LINK_NOARG_TYPED(SwCompatibilityOptPage, UseAsDefaultHdl, Button*, void) diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 7b101cecc533..f9ee4c19c368 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -352,7 +352,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pStandardizedPageSizeNF->Enable(m_pShowStandardizedPageCount->IsChecked()); } -IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl) +IMPL_LINK_NOARG_TYPED(SwLoadOptPage, MetricHdl, ListBox&, void) { const sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos(); if(nMPos != LISTBOX_ENTRY_NOTFOUND) @@ -368,8 +368,6 @@ IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl) if(!bModified) m_pTabMF->ClearModifyFlag(); } - - return 0; } SwCaptionOptDlg::SwCaptionOptDlg(vcl::Window* pParent, const SfxItemSet& rSet) @@ -533,9 +531,8 @@ SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pNumberingSeparatorED->SetModifyHdl( aLk ); m_pTextEdit->SetModifyHdl( aLk ); - aLk = LINK(this, SwCaptionOptPage, SelectHdl); - m_pCategoryBox->SetSelectHdl( aLk ); - m_pFormatBox->SetSelectHdl( aLk ); + m_pCategoryBox->SetSelectHdl( LINK(this, SwCaptionOptPage, SelectHdl) ); + m_pFormatBox->SetSelectHdl( LINK(this, SwCaptionOptPage, SelectListBoxHdl) ); m_pLbCaptionOrder->SetSelectHdl( LINK(this, SwCaptionOptPage, OrderHdl)); @@ -850,7 +847,12 @@ IMPL_LINK_NOARG(SwCaptionOptPage, SelectHdl) return 0; } -IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox ) +IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, SelectListBoxHdl, ListBox&, void) +{ + InvalidatePreview(); +} + +IMPL_LINK_TYPED( SwCaptionOptPage, OrderHdl, ListBox&, rBox, void ) { InvalidatePreview(); @@ -861,10 +863,9 @@ IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox ) bChecked = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pSelEntry)); } - sal_Int32 nPos = pBox->GetSelectEntryPos(); + sal_Int32 nPos = rBox.GetSelectEntryPos(); m_pNumberingSeparatorFT->Enable( bChecked && nPos == 1 ); m_pNumberingSeparatorED->Enable( bChecked && nPos == 1 ); - return 0; } void SwCaptionOptPage::InvalidatePreview() diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index c4ec368b83d2..54575fc5e718 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -508,10 +508,9 @@ void SwAddPrinterTabPage::SetFax( const std::vector<OUString>& rFaxLst ) m_pFaxLB->SelectEntryPos(0); } -IMPL_LINK_NOARG(SwAddPrinterTabPage, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwAddPrinterTabPage, SelectHdl, ListBox&, void) { bAttrModified=true; - return 0; } void SwAddPrinterTabPage::PageCreated( const SfxAllItemSet& aSet) @@ -1785,7 +1784,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( vcl::Window* pParent, pDeletedLB->RemoveEntry(4); pDeletedLB->RemoveEntry(3); - Link<> aLk = LINK(this, SwRedlineOptionsTabPage, AttribHdl); + Link<ListBox&,void> aLk = LINK(this, SwRedlineOptionsTabPage, AttribHdl); pInsertLB->SetSelectHdl( aLk ); pDeletedLB->SetSelectHdl( aLk ); pChangedLB->SetSelectHdl( aLk ); @@ -2066,27 +2065,27 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet* ) pMarkPosLB->SelectEntryPos(nPos); // show settings in preview - AttribHdl(pInsertLB); - ColorHdl(pInsertColorLB); - AttribHdl(pDeletedLB); - ColorHdl(pInsertColorLB); - AttribHdl(pChangedLB); - ColorHdl(pChangedColorLB); + AttribHdl(*pInsertLB); + ColorHdl(*pInsertColorLB); + AttribHdl(*pDeletedLB); + ColorHdl(*pInsertColorLB); + AttribHdl(*pChangedLB); + ColorHdl(*pChangedColorLB); - ChangedMaskPrevHdl(); + ChangedMaskPrevHdl(*pMarkPosLB); } -IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB ) +IMPL_LINK_TYPED( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void ) { SvxFontPrevWindow *pPrev = 0; ColorListBox *pColorLB; - if (pLB == pInsertLB) + if (&rLB == pInsertLB) { pColorLB = pInsertColorLB; pPrev = pInsertedPreviewWN; } - else if (pLB == pDeletedLB) + else if (&rLB == pDeletedLB) { pColorLB = pDeletedColorLB; pPrev = pDeletedPreviewWN; @@ -2130,11 +2129,11 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB ) break; } - nPos = pLB->GetSelectEntryPos(); + nPos = rLB.GetSelectEntryPos(); if( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos = 0; - CharAttr* pAttr = static_cast<CharAttr*>(pLB->GetEntryData( nPos )); + CharAttr* pAttr = static_cast<CharAttr*>(rLB.GetEntryData( nPos )); //switch off preview background color pPrev->ResetColor(); switch (pAttr->nItemId) @@ -2179,12 +2178,11 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB ) } pPrev->Invalidate(); - - return 0; } -IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB ) +IMPL_LINK_TYPED( SwRedlineOptionsTabPage, ColorHdl, ListBox&, rListBox, void ) { + ColorListBox* pColorLB = static_cast<ColorListBox*>(&rListBox); SvxFontPrevWindow *pPrev = 0; ListBox* pLB; @@ -2245,18 +2243,14 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB ) } pPrev->Invalidate(); - - return 0; } -IMPL_LINK_NOARG(SwRedlineOptionsTabPage, ChangedMaskPrevHdl) +IMPL_LINK_NOARG_TYPED(SwRedlineOptionsTabPage, ChangedMaskPrevHdl, ListBox&, void) { pMarkPreviewWN->SetMarkPos(pMarkPosLB->GetSelectEntryPos()); pMarkPreviewWN->SetColor(pMarkColorLB->GetSelectEntryColor().GetColor()); pMarkPreviewWN->Invalidate(); - - return 0; } void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin) diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx index 0516b8e6404e..b935b6394374 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx @@ -75,10 +75,9 @@ void SwCustomizeAddressListDialog::dispose() } -IMPL_LINK_NOARG(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl, ListBox&, void) { UpdateButtons(); - return 0; } IMPL_LINK_TYPED(SwCustomizeAddressListDialog, AddRenameHdl_Impl, Button*, pButton, void) diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx index 5466f1f997dd..1fae616ee4f1 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx @@ -43,7 +43,7 @@ class SwCustomizeAddressListDialog : public SfxModalDialog DECL_LINK_TYPED(AddRenameHdl_Impl, Button*, void); DECL_LINK_TYPED(DeleteHdl_Impl, Button*, void); DECL_LINK_TYPED(UpDownHdl_Impl, Button*, void); - DECL_LINK(ListBoxSelectHdl_Impl, void *); + DECL_LINK_TYPED(ListBoxSelectHdl_Impl, ListBox&, void); void UpdateButtons(); public: diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 5777bfc1569c..0a48c570f1da 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -480,7 +480,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, PageHdl, Button*, pButton, void ) if( bShowTable ) m_pPbTableFormat->Enable( 0 != m_pLbTableCol->GetEntryCount() ); - SelectHdl( bShowTable ? m_pLbTableDbColumn : m_pLbTextDbColumn ); + SelectHdl( bShowTable ? *m_pLbTableDbColumn : *m_pLbTextDbColumn ); } IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton, void ) @@ -784,24 +784,24 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, AutoFormatHdl, Button*, pButton, void ) pDlg->FillAutoFormatOfIndex( pTAutoFormat ); } -IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, SelectHdl, ListBox&, rBox, void ) { - ListBox* pGetBox = pBox == m_pLbDbFormatFromUsr + ListBox* pGetBox = &rBox == m_pLbDbFormatFromUsr ? ( m_pRbAsTable->IsChecked() ? ( 0 == m_pLbTableCol->GetEntryData( 0 ) ? m_pLbTableDbColumn.get() : m_pLbTableCol.get() ) : m_pLbTextDbColumn.get() ) - : pBox; + : &rBox; SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 ); SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch ); - if( pBox == m_pLbDbFormatFromUsr ) + if( &rBox == m_pLbDbFormatFromUsr ) { if( !aSrch.sColumn.isEmpty() ) { - aOldNumFormatLnk.Call( pBox ); + aOldNumFormatLnk.Call( rBox ); (*it)->nUsrNumFormat = m_pLbDbFormatFromUsr->GetFormat(); } } @@ -839,10 +839,9 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) // to know later on, what ListBox was the "active", a Flag // is remembered in the 1st entry - void* pPtr = pBox == m_pLbTableCol ? m_pLbTableCol.get() : 0; + void* pPtr = &rBox == m_pLbTableCol ? m_pLbTableCol.get() : 0; m_pLbTableCol->SetEntryData( 0, pPtr ); } - return 0; } IMPL_LINK_TYPED( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton, void ) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 67daed33acfa..6cc682b2d393 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -810,7 +810,7 @@ class SwAssignFieldsControl : public Control long m_nFirstYPos; DECL_LINK_TYPED(ScrollHdl_Impl, ScrollBar*, void); - DECL_LINK(MatchHdl_Impl, ListBox*); + DECL_LINK_TYPED(MatchHdl_Impl, ListBox&, void); DECL_LINK_TYPED(GotFocusHdl_Impl, Control&, void); virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; @@ -881,7 +881,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem) //each position in this sequence matches the position in the header array rHeaders //if no assignment is available an empty sequence will be returned uno::Sequence< OUString> aAssignments = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); - Link<> aMatchHdl = LINK(this, SwAssignFieldsControl, MatchHdl_Impl); + Link<ListBox&,void> aMatchHdl = LINK(this, SwAssignFieldsControl, MatchHdl_Impl); Link<Control&,void> aFocusHdl = LINK(this, SwAssignFieldsControl, GotFocusHdl_Impl); //fill the controls @@ -1098,9 +1098,9 @@ IMPL_LINK_TYPED(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll, void SetUpdateMode(true); } -IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox) +IMPL_LINK_TYPED(SwAssignFieldsControl, MatchHdl_Impl, ListBox&, rBox, void) { - const OUString sColumn = pBox->GetSelectEntry(); + const OUString sColumn = rBox.GetSelectEntry(); uno::Reference< XColumnsSupplier > xColsSupp( m_rConfigItem->GetResultSet(), uno::UNO_QUERY); uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0; OUString sPreview; @@ -1123,14 +1123,13 @@ IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox) sal_Int32 nIndex = 0; for(auto aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter, ++nIndex) { - if(*aLBIter == pBox) + if(*aLBIter == &rBox) { m_aPreviews[nIndex]->SetText(sPreview); break; } } m_aModifyHdl.Call(0); - return 0; } IMPL_LINK_TYPED(SwAssignFieldsControl, GotFocusHdl_Impl, Control&, rControl, void) diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 0295fd7bb6b4..5192a7399b9d 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -145,6 +145,11 @@ IMPL_LINK_NOARG(SwMailMergeGreetingsPage, GreetingSelectHdl_Impl) return 0; } +IMPL_LINK_NOARG_TYPED(SwMailMergeGreetingsPage, GreetingSelectListBoxHdl_Impl, ListBox&, void) +{ + UpdatePreview(); +} + void SwMailMergeGreetingsPage::UpdatePreview() { //find out which type of greeting should be selected: @@ -260,9 +265,10 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent) m_pMalePB->SetClickHdl(aGreetingLink); m_pAssignPB->SetClickHdl(LINK(this, SwMailMergeGreetingsPage, AssignHdl_Impl)); Link<> aLBoxLink = LINK(this, SwMailMergeGreetingsPage, GreetingSelectHdl_Impl); - m_pFemaleLB->SetSelectHdl(aLBoxLink); - m_pMaleLB->SetSelectHdl(aLBoxLink); - m_pFemaleColumnLB->SetSelectHdl(aLBoxLink); + Link<ListBox&,void> aLBoxLink2 = LINK(this, SwMailMergeGreetingsPage, GreetingSelectListBoxHdl_Impl); + m_pFemaleLB->SetSelectHdl(aLBoxLink2); + m_pMaleLB->SetSelectHdl(aLBoxLink2); + m_pFemaleColumnLB->SetSelectHdl(aLBoxLink2); m_pFemaleFieldCB->SetSelectHdl(aLBoxLink); m_pFemaleFieldCB->SetModifyHdl(aLBoxLink); m_pNeutralCB->SetSelectHdl(aLBoxLink); diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index 91c6332fe1f0..c54091c6730f 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -82,6 +82,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage, DECL_LINK_TYPED(ContainsHdl_Impl, Button*, void); DECL_LINK_TYPED(InsertDataHdl_Impl, Button*, void); DECL_LINK(GreetingSelectHdl_Impl, void *); + DECL_LINK_TYPED(GreetingSelectListBoxHdl_Impl, ListBox&, void); DECL_LINK_TYPED(AssignHdl_Impl, Button*, void); virtual void UpdatePreview() SAL_OVERRIDE; diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 719cc59bdd14..78c6bd70912b 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -660,13 +660,13 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, SwOneExample m_pTopMF->SetMax(rPageSize.GetHeight() - DEFAULT_TOP_DISTANCE); } -IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox) +IMPL_LINK_TYPED(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox&, rBox, void) { if(m_pExampleWrtShell) { sal_Int16 eType = DocumentZoomType::BY_VALUE; short nZoom = 50; - switch(pBox->GetSelectEntryPos()) + switch(rBox.GetSelectEntryPos()) { case 0 : eType = DocumentZoomType::ENTIRE_PAGE; break; case 1 : nZoom = 50; break; @@ -680,7 +680,6 @@ IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox) m_xViewProperties->setPropertyValue(UNO_NAME_ZOOM_VALUE, aZoom); } - return 0; } IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, ChangeAddressLoseFocusHdl_Impl, Control&, void) diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index 7d18971aae26..3becaf6d1b73 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -66,7 +66,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xViewProperties; DECL_LINK_TYPED(PreviewLoadedHdl_Impl, SwOneExampleFrame&, void); - DECL_LINK(ZoomHdl_Impl, ListBox*); + DECL_LINK_TYPED(ZoomHdl_Impl, ListBox&, void); DECL_LINK(ChangeAddressHdl_Impl, void *); DECL_LINK_TYPED(ChangeAddressLoseFocusHdl_Impl, Control&, void); DECL_LINK_TYPED(GreetingsHdl_Impl, Button*, void); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 8068ea7d47d1..66de1ff635b6 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -519,7 +519,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi m_pMailToLB->SelectEntry(sEMailColumn); // HTML format pre-selected m_pSendAsLB->SelectEntryPos(3); - SendTypeHdl_Impl(m_pSendAsLB); + SendTypeHdl_Impl(*m_pSendAsLB); } } m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : 0); @@ -815,14 +815,14 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, voi m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); } -IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox) +IMPL_LINK_TYPED(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox&, rBox, void) { SwView *const pTargetView = m_pWizard->GetConfigItem().GetTargetView(); SfxPrinter *const pDocumentPrinter = pTargetView->GetWrtShell() .getIDocumentDeviceAccess().getPrinter(true); - if (pDocumentPrinter && pBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) + if (pDocumentPrinter && rBox.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { - const QueueInfo* pInfo = Printer::GetQueueInfo( pBox->GetSelectEntry(), false ); + const QueueInfo* pInfo = Printer::GetQueueInfo( rBox.GetSelectEntry(), false ); if( pInfo ) { @@ -853,9 +853,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox) } else m_pPrinterSettingsPB->Disable(); - m_pWizard->GetConfigItem().SetSelectedPrinter( pBox->GetSelectEntry() ); - - return 0; + m_pWizard->GetConfigItem().SetSelectedPrinter( rBox.GetSelectEntry() ); } IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void) @@ -918,14 +916,14 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void) IMPL_LINK_TYPED(SwMailMergeOutputPage, PrinterSetupHdl_Impl, Button*, pButton, void) { if( !m_pTempPrinter ) - PrinterChangeHdl_Impl(m_pPrinterLB); + PrinterChangeHdl_Impl(*m_pPrinterLB); if(m_pTempPrinter) m_pTempPrinter->Setup(pButton); } -IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) +IMPL_LINK_TYPED(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox&, rBox, void) { - sal_uLong nDocType = reinterpret_cast<sal_uLong>(pBox->GetSelectEntryData()); + sal_uLong nDocType = reinterpret_cast<sal_uLong>(rBox.GetSelectEntryData()); bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType; m_pSendAsPB->Enable( bEnable ); m_pAttachmentGroup->Enable( bEnable ); @@ -946,7 +944,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) m_pAttachmentED->SetText(sAttach); } } - return 0; } IMPL_LINK_TYPED(SwMailMergeOutputPage, SendAsHdl_Impl, Button*, pButton, void) diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx index 6f264cb0db42..8f4901b596a8 100644 --- a/sw/source/ui/dbui/mmoutputpage.hxx +++ b/sw/source/ui/dbui/mmoutputpage.hxx @@ -108,10 +108,10 @@ class SwMailMergeOutputPage : public svt::OWizardPage DECL_LINK_TYPED(CopyToHdl_Impl, Button*, void); DECL_LINK_TYPED(SaveStartHdl_Impl, Button*, void ); DECL_LINK_TYPED(SaveOutputHdl_Impl, Button* , void); - DECL_LINK(PrinterChangeHdl_Impl, ListBox* ); + DECL_LINK_TYPED(PrinterChangeHdl_Impl, ListBox&,void ); DECL_LINK_TYPED(PrintHdl_Impl, Button*, void); DECL_LINK_TYPED(PrinterSetupHdl_Impl, Button*, void ); - DECL_LINK(SendTypeHdl_Impl, ListBox*); + DECL_LINK_TYPED(SendTypeHdl_Impl, ListBox&, void); DECL_LINK_TYPED(SendAsHdl_Impl, Button*, void); DECL_LINK_TYPED(SendDocumentsHdl_Impl, Button*, void); DECL_LINK_TYPED(DocumentSelectionHdl_Impl, Button*, void); diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index c9f5f314f11e..e88370572485 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -318,8 +318,9 @@ LineEnd SwAsciiFilterDlg::GetCRLF() const return eEnd; } -IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox ) +IMPL_LINK_TYPED( SwAsciiFilterDlg, CharSetSelHdl, ListBox&, rListBox, void ) { + SvxTextEncodingBox* pBox = static_cast<SvxTextEncodingBox*>(&rListBox); LineEnd eOldEnd = GetCRLF(), eEnd = (LineEnd)-1; LanguageType nLng = m_pFontLB->IsVisible() ? m_pLanguageLB->GetSelectLanguage() @@ -390,8 +391,6 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox ) if( nOldLng != nLng && m_pFontLB->IsVisible() ) m_pLanguageLB->SelectLanguage( nLng ); - - return 0; } IMPL_LINK_TYPED( SwAsciiFilterDlg, LineEndHdl, RadioButton&, rBtn, void ) diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 495af4caf296..7c06b38580b8 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -247,7 +247,7 @@ IMPL_LINK( SwEnvFormatPage, ModifyHdl, Edit *, pEdit ) lUserH = lHeight; } - m_pSizeFormatBox->GetSelectHdl().Call(m_pSizeFormatBox); + m_pSizeFormatBox->GetSelectHdl().Call(*m_pSizeFormatBox); } else { @@ -384,7 +384,7 @@ SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl* pColl, bool bSende return pAddrSet; } -IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl) +IMPL_LINK_NOARG_TYPED(SwEnvFormatPage, FormatHdl, ListBox&, void) { long lWidth; long lHeight; @@ -423,7 +423,6 @@ IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl) FillItem(GetParentSwEnvDlg()->aEnvItem); m_pPreview->Invalidate(); - return 0; } void SwEnvFormatPage::SetMinMax() diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index d3a81afdaf86..6d47bc314af1 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -46,7 +46,7 @@ class SwEnvFormatPage : public SfxTabPage DECL_LINK( ModifyHdl, Edit * ); DECL_LINK_TYPED( LoseFocusHdl, Control&, void ); DECL_LINK_TYPED( EditHdl, MenuButton *, void ); - DECL_LINK(FormatHdl, void *); + DECL_LINK_TYPED(FormatHdl, ListBox&, void); void SetMinMax(); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index e24dbd09f427..89d7f9d749da 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -247,13 +247,13 @@ void SwEnvPage::dispose() SfxTabPage::dispose(); } -IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox ) +IMPL_LINK_TYPED( SwEnvPage, DatabaseHdl, ListBox&, rListBox, void ) { SwWait aWait( *pSh->GetView().GetDocShell(), true ); - if (pListBox == m_pDatabaseLB) + if (&rListBox == m_pDatabaseLB) { - sActDBName = pListBox->GetSelectEntry(); + sActDBName = rListBox.GetSelectEntry(); pSh->GetDBManager()->GetTableNames(m_pTableLB, sActDBName); sActDBName += OUString(DB_DELIM); } @@ -263,7 +263,6 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox ) } pSh->GetDBManager()->GetColumnNames(m_pDBFieldLB, m_pDatabaseLB->GetSelectEntry(), m_pTableLB->GetSelectEntry()); - return 0; } IMPL_LINK_NOARG_TYPED(SwEnvPage, FieldHdl, Button*, void) diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 90f6497e7f0e..c346b7eba36c 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -288,7 +288,7 @@ SwLabPage::SwLabPage(vcl::Window* pParent, const SfxItemSet& rSet) } m_pMakeBox->SelectEntryPos( nLstGroup ); - m_pMakeBox->GetSelectHdl().Call(m_pMakeBox); + m_pMakeBox->GetSelectHdl().Call(*m_pMakeBox); } SwLabPage::~SwLabPage() @@ -336,17 +336,16 @@ IMPL_LINK_NOARG_TYPED(SwLabPage, AddrHdl, Button*, void) m_pWritingEdit->GrabFocus(); } -IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox ) +IMPL_LINK_TYPED( SwLabPage, DatabaseHdl, ListBox&, rListBox, void ) { sActDBName = m_pDatabaseLB->GetSelectEntry(); WaitObject aObj( GetParentSwLabDlg() ); - if (pListBox == m_pDatabaseLB) + if (&rListBox == m_pDatabaseLB) GetDBManager()->GetTableNames(m_pTableLB, sActDBName); GetDBManager()->GetColumnNames(m_pDBFieldLB, sActDBName, m_pTableLB->GetSelectEntry()); - return 0; } IMPL_LINK_NOARG_TYPED(SwLabPage, FieldHdl, Button*, void) @@ -363,10 +362,10 @@ IMPL_LINK_NOARG_TYPED(SwLabPage, FieldHdl, Button*, void) IMPL_LINK_NOARG_TYPED(SwLabPage, PageHdl, Button*, void) { - m_pMakeBox->GetSelectHdl().Call(m_pMakeBox); + m_pMakeBox->GetSelectHdl().Call(*m_pMakeBox); } -IMPL_LINK_NOARG(SwLabPage, MakeHdl) +IMPL_LINK_NOARG_TYPED(SwLabPage, MakeHdl, ListBox&, void) { WaitObject aWait( GetParentSwLabDlg() ); @@ -416,15 +415,13 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl) m_pTypeBox->SelectEntry(aItem.aLstType); else m_pTypeBox->SelectEntryPos(0); - m_pTypeBox->GetSelectHdl().Call(m_pTypeBox); - return 0; + m_pTypeBox->GetSelectHdl().Call(*m_pTypeBox); } -IMPL_LINK_NOARG(SwLabPage, TypeHdl) +IMPL_LINK_NOARG_TYPED(SwLabPage, TypeHdl, ListBox&, void) { DisplayFormat(); aItem.aType = m_pTypeBox->GetSelectEntry(); - return 0; } void SwLabPage::DisplayFormat() @@ -542,7 +539,7 @@ void SwLabPage::Reset(const SfxItemSet* rSet) m_pMakeBox->SelectEntry( aItem.aMake ); //save the current type OUString sType(aItem.aType); - m_pMakeBox->GetSelectHdl().Call(m_pMakeBox); + m_pMakeBox->GetSelectHdl().Call(*m_pMakeBox); aItem.aType = sType; //#102806# a newly added make may not be in the type ListBox already if (m_pTypeBox->GetEntryPos(aItem.aType) == LISTBOX_ENTRY_NOTFOUND && !aItem.aMake.isEmpty()) @@ -550,12 +547,12 @@ void SwLabPage::Reset(const SfxItemSet* rSet) if (m_pTypeBox->GetEntryPos(aItem.aType) != LISTBOX_ENTRY_NOTFOUND) { m_pTypeBox->SelectEntry(aItem.aType); - m_pTypeBox->GetSelectHdl().Call(m_pTypeBox); + m_pTypeBox->GetSelectHdl().Call(*m_pTypeBox); } if (m_pDatabaseLB->GetEntryPos(sDBName) != LISTBOX_ENTRY_NOTFOUND) { m_pDatabaseLB->SelectEntry(sDBName); - m_pDatabaseLB->GetSelectHdl().Call(m_pDatabaseLB); + m_pDatabaseLB->GetSelectHdl().Call(*m_pDatabaseLB); } if (aItem.bCont) @@ -718,7 +715,7 @@ void SwVisitingCardPage::Reset(const SfxItemSet* rSet) if(m_pAutoTextGroupLB->GetSelectEntryPos() != i) { m_pAutoTextGroupLB->SelectEntryPos(i); - AutoTextSelectHdl(m_pAutoTextGroupLB); + AutoTextSelectHdl(*m_pAutoTextGroupLB); } if(lcl_FindBlock(*m_pAutoTextLB, aLabItem.sGlossaryBlockName)) { @@ -727,7 +724,8 @@ void SwVisitingCardPage::Reset(const SfxItemSet* rSet) *static_cast<OUString*>(pSelEntry->GetUserData()) != aLabItem.sGlossaryBlockName) { lcl_SelectBlock(*m_pAutoTextLB, aLabItem.sGlossaryBlockName); - AutoTextSelectHdl(m_pAutoTextLB); + if(m_xAutoText.is() && pExampleFrame->IsInitialized()) + pExampleFrame->ClearDocument( true ); } } } diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index 206d9353d892..9bdc69ee9b00 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -132,15 +132,16 @@ IMPL_LINK_NOARG_TYPED(SwVisitingCardPage, FrameControlInitializedHdl, SwOneExamp } } -IMPL_LINK_TYPED( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, pBox, void ) +IMPL_LINK_NOARG_TYPED( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void ) { - AutoTextSelectHdl(pBox); + if(m_xAutoText.is() && pExampleFrame->IsInitialized()) + pExampleFrame->ClearDocument( true ); } -IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox ) +IMPL_LINK_TYPED( SwVisitingCardPage, AutoTextSelectHdl, ListBox&, rBox, void ) { if(m_xAutoText.is()) { - if (m_pAutoTextGroupLB == pBox) + if (m_pAutoTextGroupLB == &rBox) { const OUString *pGroup( static_cast<const OUString*>(m_pAutoTextGroupLB->GetSelectEntryData())); uno::Any aGroup = m_xAutoText->getByName(*pGroup); @@ -158,7 +159,6 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox ) if(pExampleFrame->IsInitialized()) pExampleFrame->ClearDocument( true ); } - return 0; } void SwVisitingCardPage::UpdateFields() diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 6dacd6bc6b60..7634d68ceea6 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -48,11 +48,11 @@ class SwLabPage : public SfxTabPage bool m_bLabel; DECL_LINK_TYPED(AddrHdl, Button*, void); - DECL_LINK(DatabaseHdl, ListBox * ); + DECL_LINK_TYPED(DatabaseHdl, ListBox&, void ); DECL_LINK_TYPED(FieldHdl, Button *, void); DECL_LINK_TYPED(PageHdl, Button *, void); - DECL_LINK(MakeHdl, void *); - DECL_LINK(TypeHdl, void *); + DECL_LINK_TYPED(MakeHdl, ListBox&, void); + DECL_LINK_TYPED(TypeHdl, ListBox&, void); void DisplayFormat (); SwLabRec* GetSelectedEntryPos(); @@ -98,7 +98,7 @@ class SwVisitingCardPage : public SfxTabPage ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextContainer2 > m_xAutoText; DECL_LINK_TYPED( AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void ); - DECL_LINK( AutoTextSelectHdl, void* ); + DECL_LINK_TYPED( AutoTextSelectHdl, ListBox&, void ); DECL_LINK_TYPED( FrameControlInitializedHdl, SwOneExampleFrame&, void ); void InitFrameControl(); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 8da28091d685..34db853ebcae 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -183,7 +183,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*) TypeHdl(0); m_pTypeLB->SetUpdateMode(true); - m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDBPage, TypeHdl)); + m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDBPage, TypeListBoxHdl)); m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, ListBoxInsertHdl)); if (IsFieldEdit()) @@ -275,7 +275,12 @@ sal_uInt16 SwFieldDBPage::GetGroup() return GRP_DB; } -IMPL_LINK( SwFieldDBPage, TypeHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SwFieldDBPage, TypeListBoxHdl, ListBox&, rBox, void ) +{ + TypeHdl(&rBox); +} + +void SwFieldDBPage::TypeHdl( ListBox* pBox ) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -393,16 +398,12 @@ IMPL_LINK( SwFieldDBPage, TypeHdl, ListBox *, pBox ) CheckInsert(); } - - return 0; } -IMPL_LINK( SwFieldDBPage, NumSelectHdl, NumFormatListBox *, pLB ) +IMPL_LINK_TYPED( SwFieldDBPage, NumSelectHdl, ListBox&, rLB, void ) { m_pNewFormatRB->Check(); - m_aOldNumSelectHdl.Call(pLB); - - return 0; + m_aOldNumSelectHdl.Call(rLB); } void SwFieldDBPage::CheckInsert() @@ -502,7 +503,7 @@ void SwFieldDBPage::ActivateMailMergeAddress() { sal_uLong nData = TYP_DBFLD; m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos( reinterpret_cast<const void*>( nData ) )); - m_pTypeLB->GetSelectHdl().Call(m_pTypeLB); + m_pTypeLB->GetSelectHdl().Call(*m_pTypeLB); const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource(); m_pDatabaseTLB->Select(rData.sDataSource, rData.sCommand, aEmptyOUStr); } diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index cc118696dc17..d6813766a735 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -52,13 +52,14 @@ class SwFieldDBPage : public SwFieldPage OUString m_sOldColumnName; sal_uLong m_nOldFormat; sal_uInt16 m_nOldSubType; - Link<> m_aOldNumSelectHdl; + Link<ListBox&,void> m_aOldNumSelectHdl; - DECL_LINK( TypeHdl, ListBox* ); - DECL_LINK( NumSelectHdl, NumFormatListBox* ); + DECL_LINK_TYPED( TypeListBoxHdl, ListBox&, void ); + DECL_LINK_TYPED( NumSelectHdl, ListBox&, void ); DECL_LINK_TYPED( TreeSelectHdl, SvTreeListBox*, void ); DECL_LINK(ModifyHdl, void *); DECL_LINK_TYPED(AddDBHdl, Button*, void); + void TypeHdl(ListBox*); void CheckInsert(); diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index a71fcb71964e..9b107f8137cf 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -235,10 +235,10 @@ IMPL_LINK_NOARG_TYPED(SwFieldDokInfPage, TypeHdl, SvTreeListBox*, void) else if (pOldEntry != pSelEntry) FillSelectionLB((sal_uInt16)reinterpret_cast<sal_uLong>(pSelEntry->GetUserData())); - SubTypeHdl(); + SubTypeHdl(*m_pSelectionLB); } -IMPL_LINK_NOARG(SwFieldDokInfPage, SubTypeHdl) +IMPL_LINK_NOARG_TYPED(SwFieldDokInfPage, SubTypeHdl, ListBox&, void) { sal_uInt16 nSubType = (sal_uInt16)reinterpret_cast<sal_uLong>(pSelEntry->GetUserData()); sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos(); @@ -279,7 +279,7 @@ IMPL_LINK_NOARG(SwFieldDokInfPage, SubTypeHdl) } } else - return 0; + return; } nPos = 0; } @@ -367,8 +367,6 @@ IMPL_LINK_NOARG(SwFieldDokInfPage, SubTypeHdl) { m_pFormatLB->SelectEntryPos(0); } - - return 0; } sal_Int32 SwFieldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx index e4ebe9278d9b..dd89d2d6eaf7 100644 --- a/sw/source/ui/fldui/flddinf.hxx +++ b/sw/source/ui/fldui/flddinf.hxx @@ -51,7 +51,7 @@ class SwFieldDokInfPage : public SwFieldPage OUString m_sOldCustomFieldName; DECL_LINK_TYPED(TypeHdl, SvTreeListBox*, void); - DECL_LINK(SubTypeHdl, void * = 0); + DECL_LINK_TYPED(SubTypeHdl, ListBox&, void); sal_Int32 FillSelectionLB(sal_uInt16 nSubTypeId); diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 424152214e11..00d91dc60038 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -192,7 +192,7 @@ void SwFieldDokPage::Reset(const SfxItemSet* ) } } } - TypeHdl(0); + TypeHdl(*m_pTypeLB); if (IsFieldEdit()) { @@ -205,7 +205,7 @@ void SwFieldDokPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl) +IMPL_LINK_NOARG_TYPED(SwFieldDokPage, TypeHdl, ListBox&, void) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -300,7 +300,7 @@ IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl) } } } - m_pSelectionLB->SetSelectHdl(Link<>()); + m_pSelectionLB->SetSelectHdl(Link<ListBox&,void>()); } else { @@ -450,8 +450,6 @@ IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl) m_pValueFT->Enable(bValue || bLevel || bOffset); m_pValueED->Enable(bValue); } - - return 0; } void SwFieldDokPage::AddSubType(sal_uInt16 nTypeId) @@ -460,7 +458,7 @@ void SwFieldDokPage::AddSubType(sal_uInt16 nTypeId) m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } -IMPL_LINK_NOARG(SwFieldDokPage, SubTypeHdl) +IMPL_LINK_NOARG_TYPED(SwFieldDokPage, SubTypeHdl, ListBox&, void) { sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos(); if(nPos == LISTBOX_ENTRY_NOTFOUND) @@ -490,8 +488,6 @@ IMPL_LINK_NOARG(SwFieldDokPage, SubTypeHdl) if( nTextRes ) m_pValueFT->SetText( SW_RESSTR( nTextRes )); - - return 0; } sal_Int32 SwFieldDokPage::FillFormatLB(sal_uInt16 nTypeId) @@ -524,12 +520,12 @@ sal_Int32 SwFieldDokPage::FillFormatLB(sal_uInt16 nTypeId) } } - FormatHdl(); + FormatHdl(*m_pFormatLB); return nSize; } -IMPL_LINK_NOARG(SwFieldDokPage, FormatHdl) +IMPL_LINK_NOARG_TYPED(SwFieldDokPage, FormatHdl, ListBox&, void) { sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -557,8 +553,6 @@ IMPL_LINK_NOARG(SwFieldDokPage, FormatHdl) if (sOldText != m_pValueFT->GetText()) m_pValueED->SetText( aEmptyOUStr ); } - - return 0; } bool SwFieldDokPage::FillItemSet(SfxItemSet* ) diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx index d3035ea5e969..bef27f832d80 100644 --- a/sw/source/ui/fldui/flddok.hxx +++ b/sw/source/ui/fldui/flddok.hxx @@ -50,9 +50,9 @@ class SwFieldDokPage : public SwFieldPage sal_Int32 nOldSel; sal_uLong nOldFormat; - DECL_LINK(TypeHdl, void *); - DECL_LINK(FormatHdl, void * = 0); - DECL_LINK(SubTypeHdl, void *); + DECL_LINK_TYPED(TypeHdl, ListBox&, void); + DECL_LINK_TYPED(FormatHdl, ListBox&, void); + DECL_LINK_TYPED(SubTypeHdl, ListBox&, void); void AddSubType(sal_uInt16 nTypeId); sal_Int32 FillFormatLB(sal_uInt16 nTypeId); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 8836017ad010..31aae8eb3b05 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -176,7 +176,7 @@ void SwFieldFuncPage::Reset(const SfxItemSet* ) m_pListItemED->SetReturnActionLink(LINK(this, SwFieldFuncPage, ListModifyReturnActionHdl)); Link<> aListEnableLk = LINK(this, SwFieldFuncPage, ListEnableHdl); m_pListItemED->SetModifyHdl(aListEnableLk); - m_pListItemsLB->SetSelectHdl(aListEnableLk); + m_pListItemsLB->SetSelectHdl(LINK(this, SwFieldFuncPage, ListEnableListBoxHdl)); if( !IsRefresh() ) { @@ -196,7 +196,7 @@ void SwFieldFuncPage::Reset(const SfxItemSet* ) } } } - TypeHdl(0); + TypeHdl(*m_pTypeLB); m_pTypeLB->SetUpdateMode(true); @@ -210,7 +210,7 @@ void SwFieldFuncPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl) +IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, TypeHdl, ListBox&, void) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -401,23 +401,19 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl) EnableInsert( bInsert ); } - - return 0; } -IMPL_LINK_NOARG(SwFieldFuncPage, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, SelectHdl, ListBox&, void) { const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); if( TYP_MACROFLD == nTypeId ) m_pNameED->SetText( m_pSelectionLB->GetSelectEntry() ); - - return 0; } IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, InsertMacroHdl, ListBox&, void) { - SelectHdl(NULL); + SelectHdl(*m_pSelectionLB); InsertHdl(nullptr); } @@ -475,6 +471,10 @@ void SwFieldFuncPage::ListModifyHdl(Control* pControl) ListEnableHdl(0); } +IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, ListEnableListBoxHdl, ListBox&, void) +{ + ListEnableHdl(0); +} IMPL_LINK_NOARG(SwFieldFuncPage, ListEnableHdl) { //enable "Add" button when text is in the Edit that's not already member of the box diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index 238bf9b659e1..bd5abd35e63a 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -66,13 +66,14 @@ class SwFieldFuncPage : public SwFieldPage sal_uLong nOldFormat; bool bDropDownLBChanged; - DECL_LINK(TypeHdl, void *); - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(TypeHdl, ListBox&, void); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); DECL_LINK_TYPED(InsertMacroHdl, ListBox&, void); DECL_LINK(ModifyHdl, void *); DECL_LINK_TYPED(ListModifyReturnActionHdl, ReturnActionEdit&, void); DECL_LINK_TYPED(ListModifyButtonHdl, Button*, void); DECL_LINK( ListEnableHdl, void*); + DECL_LINK_TYPED( ListEnableListBoxHdl, ListBox&, void); void ListModifyHdl(Control*); // select Macro diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 252cf9ba58cb..1c0bd9f74222 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -93,7 +93,7 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, ListBoxInsertHdl)); m_pTypeLB->SetSelectHdl (LINK(this, SwFieldRefPage, TypeHdl)); - m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldRefPage, SubTypeHdl)); + m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldRefPage, SubTypeListBoxHdl)); m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, ListBoxInsertHdl)); m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, ListBoxInsertHdl)); @@ -264,7 +264,7 @@ void SwFieldRefPage::Reset(const SfxItemSet* ) } } } - TypeHdl(0); + TypeHdl(*m_pTypeLB); if (IsFieldEdit()) { @@ -276,7 +276,7 @@ void SwFieldRefPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFieldRefPage, TypeHdl) +IMPL_LINK_NOARG_TYPED(SwFieldRefPage, TypeHdl, ListBox&, void) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -407,18 +407,20 @@ IMPL_LINK_NOARG(SwFieldRefPage, TypeHdl) bool bFormat = nSize != 0; m_pFormat->Enable(bFormat); - SubTypeHdl(NULL); + SubTypeHdl(); ModifyHdl(NULL); } - - return 0; } IMPL_LINK_NOARG_TYPED(SwFieldRefPage, SubTypeTreeListBoxHdl, SvTreeListBox*, void) { - SubTypeHdl(NULL); + SubTypeHdl(); +} +IMPL_LINK_NOARG_TYPED(SwFieldRefPage, SubTypeListBoxHdl, ListBox&, void) +{ + SubTypeHdl(); } -IMPL_LINK_NOARG(SwFieldRefPage, SubTypeHdl) +void SwFieldRefPage::SubTypeHdl() { sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -461,8 +463,6 @@ IMPL_LINK_NOARG(SwFieldRefPage, SubTypeHdl) m_pNameED->SetText(m_pSelectionLB->GetSelectEntry()); break; } - - return 0; } // renew types in SelectionLB diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx index 24e5944d6b1b..3e63c48b8f25 100644 --- a/sw/source/ui/fldui/fldref.hxx +++ b/sw/source/ui/fldui/fldref.hxx @@ -60,10 +60,11 @@ class SwFieldRefPage : public SwFieldPage // fallback, if previously selected text node doesn't exist anymore size_t mnSavedSelectedPos; - DECL_LINK(TypeHdl, void *); - DECL_LINK(SubTypeHdl, void * = 0); + DECL_LINK_TYPED(TypeHdl, ListBox&, void); + DECL_LINK_TYPED(SubTypeListBoxHdl, ListBox&, void); DECL_LINK_TYPED(SubTypeTreeListBoxHdl, SvTreeListBox*, void); DECL_LINK(ModifyHdl, void * = 0); + void SubTypeHdl(); void UpdateSubType(); sal_Int32 FillFormatLB(sal_uInt16 nTypeId); diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 5b65c8cb9cc1..b1366fbbefdb 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -162,7 +162,7 @@ void SwFieldVarPage::Reset(const SfxItemSet* ) m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl)); m_pTypeLB->SetSelectHdl (LINK(this, SwFieldVarPage, TypeHdl)); - m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldVarPage, SubTypeHdl)); + m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldVarPage, SubTypeListBoxHdl)); m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl)); m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl)); m_pNumFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl)); @@ -190,7 +190,7 @@ void SwFieldVarPage::Reset(const SfxItemSet* ) } } } - TypeHdl(0); + TypeHdl(*m_pTypeLB); m_pTypeLB->SetUpdateMode(true); @@ -207,7 +207,7 @@ void SwFieldVarPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFieldVarPage, TypeHdl) +IMPL_LINK_NOARG_TYPED(SwFieldVarPage, TypeHdl, ListBox&, void) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -235,11 +235,14 @@ IMPL_LINK_NOARG(SwFieldVarPage, TypeHdl) } bInit = false; +} - return 0; +IMPL_LINK_TYPED( SwFieldVarPage, SubTypeListBoxHdl, ListBox&, rBox, void ) +{ + SubTypeHdl(&rBox); } -IMPL_LINK( SwFieldVarPage, SubTypeHdl, ListBox *, pBox ) +void SwFieldVarPage::SubTypeHdl(ListBox* pBox) { sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); sal_Int32 nSelPos = m_pSelectionLB->GetSelectEntryPos(); @@ -514,7 +517,7 @@ IMPL_LINK( SwFieldVarPage, SubTypeHdl, ListBox *, pBox ) m_pChapterLevelLB->SelectEntryPos( nLevel + 1 ); OUString sDelim = static_cast<SwSetExpFieldType*>(pFieldTyp)->GetDelimiter(); m_pSeparatorED->SetText( sDelim ); - ChapterHdl(); + ChapterHdl(*m_pChapterLevelLB); } } break; @@ -587,7 +590,6 @@ IMPL_LINK( SwFieldVarPage, SubTypeHdl, ListBox *, pBox ) } m_pSelectionLB->ResetCallAddSelection(); } - return 0; } // renew types in SelectionBox @@ -1098,15 +1100,13 @@ IMPL_LINK_TYPED( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, void ) } } -IMPL_LINK_NOARG(SwFieldVarPage, ChapterHdl) +IMPL_LINK_NOARG_TYPED(SwFieldVarPage, ChapterHdl, ListBox&, void) { bool bEnable = m_pChapterLevelLB->GetSelectEntryPos() != 0; m_pSeparatorED->Enable(bEnable); m_pSeparatorFT->Enable(bEnable); SeparatorHdl(); - - return 0; } IMPL_LINK_NOARG(SwFieldVarPage, SeparatorHdl) diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index 6292a5d6210d..d4b9ea176a84 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -76,12 +76,13 @@ class SwFieldVarPage : public SwFieldPage sal_uLong nOldFormat; bool bInit; - DECL_LINK(TypeHdl, void *); - DECL_LINK( SubTypeHdl, ListBox* ); + DECL_LINK_TYPED(TypeHdl, ListBox&, void); + DECL_LINK_TYPED( SubTypeListBoxHdl, ListBox&, void ); DECL_LINK(ModifyHdl, void * = 0); DECL_LINK_TYPED( TBClickHdl, ToolBox *, void ); - DECL_LINK(ChapterHdl, void * = 0); + DECL_LINK_TYPED(ChapterHdl, ListBox&, void); DECL_LINK(SeparatorHdl, void * = 0); + void SubTypeHdl(ListBox*); void UpdateSubType(); sal_Int32 FillFormatLB(sal_uInt16 nTypeId); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 8a62944e9592..2595b91ef741 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -204,7 +204,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) m_pApplyToLB->SelectEntryPos(0); ObjectHdl(0); - m_pApplyToLB->SetSelectHdl(LINK(this, SwColumnDlg, ObjectHdl)); + m_pApplyToLB->SetSelectHdl(LINK(this, SwColumnDlg, ObjectListBoxHdl)); OKButton *pOK = get<OKButton>("ok"); pOK->SetClickHdl(LINK(this, SwColumnDlg, OkHdl)); //#i80458# if no columns can be set then disable OK @@ -230,7 +230,11 @@ void SwColumnDlg::dispose() SfxModalDialog::dispose(); } -IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwColumnDlg, ObjectListBoxHdl, ListBox&, rBox, void) +{ + ObjectHdl(&rBox); +} +void SwColumnDlg::ObjectHdl(ListBox* pBox) { SfxItemSet* pSet = 0; switch(nOldSelection) @@ -290,7 +294,6 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) pTabPage->SetPageWidth(nWidth); if( pSet ) pTabPage->Reset(pSet); - return 0; } IMPL_LINK_NOARG_TYPED(SwColumnDlg, OkHdl, Button*, void) @@ -497,11 +500,12 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pAutoWidthBox->SetClickHdl(LINK(this, SwColumnPage, AutoWidthHdl)); aLk = LINK( this, SwColumnPage, UpdateColMgr ); - m_pLineTypeDLB->SetSelectHdl( aLk ); + Link<ListBox&,void> aLk2 = LINK( this, SwColumnPage, UpdateColMgrListBox ); + m_pLineTypeDLB->SetSelectHdl( aLk2 ); m_pLineWidthEdit->SetModifyHdl( aLk ); - m_pLineColorDLB->SetSelectHdl( aLk ); + m_pLineColorDLB->SetSelectHdl( aLk2 ); m_pLineHeightEdit->SetModifyHdl( aLk ); - m_pLinePosDLB->SetSelectHdl( aLk ); + m_pLinePosDLB->SetSelectHdl( aLk2 ); // Separator line m_pLineTypeDLB->SetUnit( FUNIT_POINT ); @@ -695,6 +699,10 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet) } // update ColumnManager +IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgrListBox, ListBox&, void ) +{ + UpdateColMgr(0); +} IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr ) { long nGutterWidth = pColMgr->GetGutterWidth(); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index db588e66959e..9e3fee8cf273 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -138,7 +138,7 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : aLk = LINK(this, SwCaptionDialog, SelectHdl); m_pCategoryBox->SetSelectHdl( aLk ); - m_pFormatBox->SetSelectHdl( aLk ); + m_pFormatBox->SetSelectHdl( LINK(this, SwCaptionDialog, SelectListBoxHdl) ); m_pOptionButton->SetClickHdl( LINK( this, SwCaptionDialog, OptionHdl ) ); m_pAutoCaptionButton->SetClickHdl(LINK(this, SwCaptionDialog, CaptionHdl)); @@ -302,6 +302,10 @@ IMPL_LINK_TYPED( SwCaptionDialog, OptionHdl, Button*, pButton, void ) DrawSample(); } +IMPL_LINK_NOARG_TYPED(SwCaptionDialog, SelectListBoxHdl, ListBox&, void) +{ + DrawSample(); +} IMPL_LINK_NOARG(SwCaptionDialog, SelectHdl) { DrawSample(); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 9e3097c17db1..a2318f5ff99b 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1441,7 +1441,7 @@ sal_Int32 SwFrmPage::FillPosLB(const FrmMap* _pMap, if (!_rLB.GetSelectEntryCount()) _rLB.SelectEntryPos(0); - PosHdl(&_rLB); + PosHdl(_rLB); return GetMapPos(_pMap, _rLB); } @@ -1621,7 +1621,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap, _rLB.Enable( bEnable ); _rFT.Enable( bEnable ); - RelHdl(&_rLB); + RelHdl(_rLB); return nLBRelations; } @@ -1940,23 +1940,23 @@ IMPL_LINK_NOARG_TYPED(SwFrmPage, AnchorTypeHdl, Button*, void) if(bHtmlMode) { - PosHdl(m_pHorizontalDLB); - PosHdl(m_pVerticalDLB); + PosHdl(*m_pHorizontalDLB); + PosHdl(*m_pVerticalDLB); } EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment && FLY_AS_CHAR == eId) ); } -IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) +IMPL_LINK_TYPED( SwFrmPage, PosHdl, ListBox&, rLB, void ) { - bool bHori = pLB == m_pHorizontalDLB; + bool bHori = &rLB == m_pHorizontalDLB; ListBox *pRelLB = bHori ? m_pHoriRelationLB : m_pVertRelationLB; FixedText *pRelFT = bHori ? m_pHoriRelationFT : m_pVertRelationFT; FrmMap *pMap = bHori ? pHMap : pVMap; - const sal_Int32 nMapPos = GetMapPos(pMap, *pLB); - const sal_Int16 nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); + const sal_Int32 nMapPos = GetMapPos(pMap, rLB); + const sal_Int16 nAlign = GetAlignment(pMap, nMapPos, rLB, *pRelLB); if (bHori) { @@ -1974,7 +1974,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) RangeModifyHdl(); sal_Int16 nRel = 0; - if (pLB->GetSelectEntryCount()) + if (rLB.GetSelectEntryCount()) { if (pRelLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) @@ -2020,7 +2020,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) bSet = true; } if(bSet) - PosHdl(m_pVerticalDLB); + PosHdl(*m_pVerticalDLB); } else { @@ -2043,17 +2043,16 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) m_pHoriRelationLB->SelectEntryPos(0) ; } if(bSet) - PosHdl(m_pHorizontalDLB); + PosHdl(*m_pHorizontalDLB); } } - return 0; } // horizontal Pos -IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB ) +IMPL_LINK_TYPED( SwFrmPage, RelHdl, ListBox&, rLB, void ) { - bool bHori = pLB == m_pHoriRelationLB; + bool bHori = &rLB == m_pHoriRelationLB; UpdateExample(); @@ -2077,10 +2076,7 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB ) } } } - if (pLB) // Only when Handler was called by changing of the controller - RangeModifyHdl(); - - return 0; + RangeModifyHdl(); } IMPL_LINK_NOARG_TYPED(SwFrmPage, RealSizeHdl, Button*, void) @@ -3056,7 +3052,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) } else pNextLB->SelectEntryPos(0); - Link<> aLink(LINK(this, SwFrmAddPage, ChainModifyHdl)); + Link<ListBox&,void> aLink(LINK(this, SwFrmAddPage, ChainModifyHdl)); pPrevLB->SetSelectHdl(aLink); pNextLB->SetSelectHdl(aLink); } @@ -3214,7 +3210,7 @@ void SwFrmAddPage::SetFormatUsed(bool bFormatUsed) } } -IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwFrmAddPage, ChainModifyHdl, ListBox&, rBox, void) { OUString sCurrentPrevChain, sCurrentNextChain; if(pPrevLB->GetSelectEntryPos()) @@ -3224,7 +3220,7 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) SwFrameFormat* pFormat = pWrtSh->GetFlyFrameFormat(); if (pFormat) { - bool bNextBox = pNextLB == pBox; + bool bNextBox = pNextLB == &rBox; ListBox& rChangeLB = bNextBox ? *pPrevLB : *pNextLB; for(sal_Int32 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--) rChangeLB.RemoveEntry(nEntry - 1); @@ -3244,7 +3240,6 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) rChangeLB.SelectEntryPos(0); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 695387b30e69..0416f1e8e49c 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -887,14 +887,14 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r Link<> aModifyLk = LINK(this, SwTOXSelectTabPage, ModifyHdl); m_pTitleED->SetModifyHdl(aModifyLk); m_pLevelNF->SetModifyHdl(aModifyLk); - m_pSortAlgorithmLB->SetSelectHdl(aModifyLk); + m_pSortAlgorithmLB->SetSelectHdl(LINK(this, SwTOXSelectTabPage, ModifyListBoxHdl)); aLk = LINK(this, SwTOXSelectTabPage, RadioButtonHdl); m_pFromCaptionsRB->SetClickHdl(aLk); m_pFromObjectNamesRB->SetClickHdl(aLk); RadioButtonHdl(m_pFromCaptionsRB); - m_pLanguageLB->SetSelectHdl(LINK(this, SwTOXSelectTabPage, LanguageHdl)); + m_pLanguageLB->SetSelectHdl(LINK(this, SwTOXSelectTabPage, LanguageListBoxHdl)); m_pTypeLB->SelectEntryPos(0); m_pTitleED->SaveValue(); } @@ -1005,7 +1005,7 @@ void SwTOXSelectTabPage::SelectType(TOXTypes eSet) m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos(reinterpret_cast<void*>(nData))); m_pTypeFT->Enable(false); m_pTypeLB->Enable(false); - TOXTypeHdl(m_pTypeLB); + TOXTypeHdl(*m_pTypeLB); } static CurTOXType lcl_UserData2TOXTypes(sal_uInt16 nData) @@ -1293,7 +1293,7 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet* ) } m_bWaitingInitialSettings = false; - TOXTypeHdl(m_pTypeLB); + TOXTypeHdl(*m_pTypeLB); CheckBoxHdl(m_pAddStylesCB); } @@ -1316,11 +1316,11 @@ VclPtr<SfxTabPage> SwTOXSelectTabPage::Create( vcl::Window* pParent, const SfxIt return VclPtr<SwTOXSelectTabPage>::Create(pParent, *rAttrSet); } -IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwTOXSelectTabPage, TOXTypeHdl, ListBox&, rBox, void) { SwMultiTOXTabDialog* pTOXDlg = static_cast<SwMultiTOXTabDialog*>(GetTabDialog()); const sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >( - pBox->GetSelectEntryData())); + rBox.GetSelectEntryData())); CurTOXType eCurType = lcl_UserData2TOXTypes(nType); pTOXDlg->SetCurrentTOXType(eCurType); @@ -1380,9 +1380,12 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) ApplyTOXDescription(); } ModifyHdl(0); - return 0; } +IMPL_LINK_NOARG_TYPED(SwTOXSelectTabPage, ModifyListBoxHdl, ListBox&, void) +{ + ModifyHdl(0); +} IMPL_LINK_NOARG(SwTOXSelectTabPage, ModifyHdl) { if(!m_bWaitingInitialSettings) @@ -1433,7 +1436,11 @@ IMPL_LINK_NOARG_TYPED(SwTOXSelectTabPage, RadioButtonHdl, Button*, void) ModifyHdl(0); } -IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwTOXSelectTabPage, LanguageListBoxHdl, ListBox&, rBox, void) +{ + LanguageHdl(&rBox); +} +void SwTOXSelectTabPage::LanguageHdl( ListBox* pBox ) { lang::Locale aLcl( LanguageTag( m_pLanguageLB->GetSelectLanguage() ).getLocale() ); Sequence< OUString > aSeq = pIndexEntryWrapper->GetAlgorithmList( aLcl ); @@ -1470,7 +1477,6 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) if(pBox) ModifyHdl(0); - return 0; }; IMPL_LINK_TYPED(SwTOXSelectTabPage, AddStylesHdl, Button*, pButton, void) @@ -2534,10 +2540,10 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken&, rToken, void) } } -IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwTOXEntryTabPage, StyleSelectHdl, ListBox&, rBox, void) { - OUString sEntry = pBox->GetSelectEntry(); - const sal_uInt16 nId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(pBox->GetSelectEntryData()); + OUString sEntry = rBox.GetSelectEntry(); + const sal_uInt16 nId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(rBox.GetSelectEntryData()); const bool bEqualsNoCharStyle = sEntry == sNoCharStyle; m_pEditStylePB->Enable(!bEqualsNoCharStyle); if (bEqualsNoCharStyle) @@ -2553,12 +2559,11 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox) } ModifyHdl(0); - return 0; } -IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoHdl, ListBox&, rBox, void) { - sal_Int32 nPos = pBox->GetSelectEntryPos(); + sal_Int32 nPos = rBox.GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { Control* pCtrl = m_pTokenWIN->GetActiveControl(); @@ -2568,7 +2573,6 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox) ModifyHdl(0); } - return 0; } IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField) @@ -2584,9 +2588,9 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField) return 0; } -IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void) { - const sal_Int32 nPos = pBox->GetSelectEntryPos(); + const sal_Int32 nPos = rBox.GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { @@ -2598,7 +2602,6 @@ IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox) } ModifyHdl(0); } - return 0; } IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, MetricField*, pField) @@ -3721,7 +3724,7 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) m_pParaLayLB->InsertEntry( aStr ); } - EnableSelectHdl(m_pParaLayLB); + EnableSelectHdl(*m_pParaLayLB); } SfxTabPage::sfxpg SwTOXStylesTabPage::DeactivatePage( SfxItemSet* /*pSet*/ ) @@ -3799,7 +3802,7 @@ IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, DoubleClickHdl, ListBox&, void) } // enable only when selected -IMPL_LINK_NOARG(SwTOXStylesTabPage, EnableSelectHdl) +IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, EnableSelectHdl, ListBox&, void) { m_pStdBT->Enable(m_pLevelLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND); @@ -3809,7 +3812,6 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, EnableSelectHdl) LISTBOX_ENTRY_NOTFOUND != m_pLevelLB->GetSelectEntryPos() && (m_pLevelLB->GetSelectEntryPos() == 0 || SwMultiTOXTabDialog::IsNoNum(rSh, aTmpName))); m_pEditStyleBT->Enable(m_pParaLayLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ); - return 0; } void SwTOXStylesTabPage::Modify() diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx index 17a7983f2480..8925b60e0eac 100644 --- a/sw/source/ui/index/multmrk.cxx +++ b/sw/source/ui/index/multmrk.cxx @@ -45,14 +45,13 @@ SwMultiTOXMarkDlg::SwMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr& rTOXMgr) m_pTextFT->SetText(rMgr.GetTOXMark(0)->GetTOXType()->GetTypeName()); } -IMPL_LINK( SwMultiTOXMarkDlg, SelectHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SwMultiTOXMarkDlg, SelectHdl, ListBox&, rBox, void ) { - if(pBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) - { SwTOXMark* pMark = rMgr.GetTOXMark(pBox->GetSelectEntryPos()); + if(rBox.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) + { SwTOXMark* pMark = rMgr.GetTOXMark(rBox.GetSelectEntryPos()); m_pTextFT->SetText(pMark->GetTOXType()->GetTypeName()); - nPos = pBox->GetSelectEntryPos(); + nPos = rBox.GetSelectEntryPos(); } - return 0; } void SwMultiTOXMarkDlg::Apply() diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 879b27b470b6..af83e4a621ab 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -141,7 +141,7 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, bool bNewDlg, m_pPrevSameBT->SetClickHdl(LINK(this,SwIndexMarkPane, PrevSameHdl)); m_pNextBT->SetClickHdl(LINK(this,SwIndexMarkPane, NextHdl)); m_pNextSameBT->SetClickHdl(LINK(this,SwIndexMarkPane, NextSameHdl)); - m_pTypeDCB->SetSelectHdl(LINK(this,SwIndexMarkPane, ModifyHdl)); + m_pTypeDCB->SetSelectHdl(LINK(this,SwIndexMarkPane, ModifyListBoxHdl)); m_pKey1DCB->SetModifyHdl(LINK(this,SwIndexMarkPane, KeyDCBModifyHdl)); m_pKey2DCB->SetModifyHdl(LINK(this,SwIndexMarkPane, KeyDCBModifyHdl)); m_pCloseBT->SetClickHdl(LINK(this,SwIndexMarkPane, CloseHdl)); @@ -623,7 +623,11 @@ IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, CloseHdl, Button*, void) } // select index type only when inserting -IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SwIndexMarkPane, ModifyListBoxHdl, ListBox&, rBox, void ) +{ + ModifyHdl(&rBox); +} +IMPL_LINK( SwIndexMarkPane, ModifyHdl, void*, pBox ) { if (m_pTypeDCB == pBox) { @@ -990,7 +994,7 @@ class SwCreateAuthEntryDlg_Impl : public ModalDialog DECL_LINK(IdentifierHdl, ComboBox*); DECL_LINK(ShortNameHdl, Edit*); - DECL_LINK(EnableHdl, ListBox*); + DECL_LINK_TYPED(EnableHdl, ListBox&, void); public: SwCreateAuthEntryDlg_Impl(vcl::Window* pParent, @@ -1127,9 +1131,9 @@ static OUString lcl_FindColumnEntry(const beans::PropertyValue* pFields, sal_Int return OUString(); } -IMPL_LINK( SwAuthorMarkPane, CompEntryHdl, ListBox*, pBox) +IMPL_LINK_TYPED( SwAuthorMarkPane, CompEntryHdl, ListBox&, rBox, void) { - const OUString sEntry(pBox->GetSelectEntry()); + const OUString sEntry(rBox.GetSelectEntry()); if(bIsFromComponent) { if(xBibAccess.is() && !sEntry.isEmpty()) @@ -1162,14 +1166,13 @@ IMPL_LINK( SwAuthorMarkPane, CompEntryHdl, ListBox*, pBox) pEntry->GetAuthorField((ToxAuthorityField)i) : OUString(); } } - if (pBox->GetSelectEntry().isEmpty()) + if (rBox.GetSelectEntry().isEmpty()) { for(int i = 0; i < AUTH_FIELD_END; i++) m_sFields[i].clear(); } m_pAuthorFI->SetText(m_sFields[AUTH_FIELD_AUTHOR]); m_pTitleFI->SetText(m_sFields[AUTH_FIELD_TITLE]); - return 0; } IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, InsertHdl, Button*, void) @@ -1327,7 +1330,7 @@ IMPL_LINK_TYPED(SwAuthorMarkPane, ChangeSourceHdl, Button*, pButton, void) m_pEntryLB->InsertEntry(m_sCreatedEntry[AUTH_FIELD_IDENTIFIER]); } m_pEntryLB->SelectEntryPos(0); - CompEntryHdl(m_pEntryLB); + CompEntryHdl(*m_pEntryLB); } IMPL_LINK(SwAuthorMarkPane, EditModifyHdl, Edit*, pEdit) @@ -1503,7 +1506,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent, ++nRightRow; bLeft = !bLeft; } - EnableHdl(pTypeListBox); + EnableHdl(*pTypeListBox); } SwCreateAuthEntryDlg_Impl::~SwCreateAuthEntryDlg_Impl() @@ -1588,10 +1591,9 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit*, pEdit) return 0; } -IMPL_LINK(SwCreateAuthEntryDlg_Impl, EnableHdl, ListBox*, pBox) +IMPL_LINK_TYPED(SwCreateAuthEntryDlg_Impl, EnableHdl, ListBox&, rBox, void) { - m_pOKBT->Enable(m_bNameAllowed && pBox->GetSelectEntryCount()); - return 0; + m_pOKBT->Enable(m_bNameAllowed && rBox.GetSelectEntryCount()); }; SwAuthMarkFloatDlg::SwAuthMarkFloatDlg(SfxBindings* _pBindings, diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 589c55fa0ac3..86fde7dbe628 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -272,7 +272,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum) #endif } m_pNumCountBox->SelectEntry(sSelect); - NumCountHdl(m_pNumCountBox); + NumCountHdl(*m_pNumCountBox); } int SwEndNoteOptionPage::GetNumbering() const @@ -310,7 +310,7 @@ IMPL_LINK_NOARG_TYPED(SwEndNoteOptionPage, PosPageHdl, Button*, void) m_pPageTemplBox->Enable(false); } -IMPL_LINK_NOARG(SwEndNoteOptionPage, NumCountHdl) +IMPL_LINK_NOARG_TYPED(SwEndNoteOptionPage, NumCountHdl, ListBox&, void) { bool bEnable = true; if( m_pNumCountBox->GetEntryCount() - 1 != m_pNumCountBox->GetSelectEntryPos() ) @@ -320,7 +320,6 @@ IMPL_LINK_NOARG(SwEndNoteOptionPage, NumCountHdl) } m_pOffsetLbl->Enable(bEnable); m_pOffsetField->Enable(bEnable); - return 0; } // Handler behind the button to collect the footnote at the chapter or end of diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index e7a5ab463dfd..f14a6b17930d 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -73,7 +73,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent, m_pNewPB->SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); m_pDelPB->SetClickHdl(LINK(this, SwGlossaryGroupDlg, DeleteHdl)); m_pNameED->SetModifyHdl(LINK(this, SwGlossaryGroupDlg, ModifyHdl)); - m_pPathLB->SetSelectHdl(LINK(this, SwGlossaryGroupDlg, ModifyHdl)); + m_pPathLB->SetSelectHdl(LINK(this, SwGlossaryGroupDlg, ModifyListBoxHdl)); m_pRenamePB->SetClickHdl(LINK(this, SwGlossaryGroupDlg, RenameHdl)); for (size_t i = 0; i < rPathArr.size(); ++i) @@ -320,6 +320,10 @@ IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, RenameHdl, Button*, void) m_pGroupTLB->GetModel()->Resort(); } +IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, ModifyListBoxHdl, ListBox&, void) +{ + ModifyHdl(0); +} IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) { OUString sEntry(m_pNameED->GetText()); diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index 53dd61b593cb..272b6b9861aa 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -64,7 +64,7 @@ class SwEndNoteOptionPage : public SfxTabPage DECL_LINK_TYPED(PosPageHdl, Button*, void); DECL_LINK_TYPED(PosChapterHdl, Button*, void); - DECL_LINK(NumCountHdl, void *); + DECL_LINK_TYPED(NumCountHdl, ListBox&, void); public: SwEndNoteOptionPage( vcl::Window *pParent, bool bEndNote, diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 6d7a370dd269..46708058d1e2 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -588,7 +588,7 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh) m_pIndentAtMF->SetUnit( eMetric ); } -IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl) +IMPL_LINK_NOARG_TYPED(SwNumPositionTabPage, EditModifyHdl, ListBox&, void) { sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) @@ -611,32 +611,31 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl) nMask <<= 1; } SetModified(); - return 0; } -IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SwNumPositionTabPage, LevelHdl, ListBox&, rBox, void ) { sal_uInt16 nSaveNumLvl = nActNumLvl; nActNumLvl = 0; - if(pBox->IsEntryPosSelected( MAXLEVEL ) && - (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) + if(rBox.IsEntryPosSelected( MAXLEVEL ) && + (rBox.GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(false); + rBox.SetUpdateMode(false); for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) - pBox->SelectEntryPos( i, false ); - pBox->SetUpdateMode(true); + rBox.SelectEntryPos( i, false ); + rBox.SetUpdateMode(true); } - else if(pBox->GetSelectEntryCount()) + else if(rBox.GetSelectEntryCount()) { sal_uInt16 nMask = 1; for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { - if(pBox->IsEntryPosSelected( i )) + if(rBox.IsEntryPosSelected( i )) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( MAXLEVEL, false ); + rBox.SelectEntryPos( MAXLEVEL, false ); } else { @@ -646,7 +645,7 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) { if(nActNumLvl & nMask) { - pBox->SelectEntryPos(i); + rBox.SelectEntryPos(i); break; } nMask <<=1; @@ -657,7 +656,6 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); InitControls(); - return 0; } IMPL_LINK_TYPED( SwNumPositionTabPage, DistanceLoseFocusHdl, Control&, rControl, void ) @@ -762,7 +760,7 @@ IMPL_LINK_TYPED( SwNumPositionTabPage, RelativeHdl, Button *, pBox, void ) bLastRelative = bOn; } -IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox&, void) { // determine value to be set at the chosen list levels SvxNumberFormat::LabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB; @@ -819,8 +817,6 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl) } SetModified(); - - return 0; } IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pField ) diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 66eaeda96a46..3b2c69655067 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -64,7 +64,7 @@ class SwNumNamesDlg : public ModalDialog VclPtr<OKButton> m_pOKBtn; DECL_LINK( ModifyHdl, Edit * ); - DECL_LINK( SelectHdl, ListBox * ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); DECL_LINK_TYPED( DoubleClickHdl, ListBox&, void ); public: @@ -91,11 +91,10 @@ void SwNumNamesDlg::dispose() // remember selected entry -IMPL_LINK( SwNumNamesDlg, SelectHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SwNumNamesDlg, SelectHdl, ListBox&, rBox, void ) { - m_pFormEdit->SetText(pBox->GetSelectEntry()); + m_pFormEdit->SetText(rBox.GetSelectEntry()); m_pFormEdit->SetSelection(Selection(0, SELECTION_MAX)); - return 0; } /** set user defined names @@ -116,7 +115,7 @@ void SwNumNamesDlg::SetUserNames(const OUString *pList[]) } } m_pFormBox->SelectEntryPos(nSelect); - SelectHdl(m_pFormBox); + SelectHdl(*m_pFormBox); } // unlock OK-Button when text is in Edit @@ -143,7 +142,7 @@ SwNumNamesDlg::SwNumNamesDlg(vcl::Window *pParent) m_pFormEdit->SetModifyHdl(LINK(this, SwNumNamesDlg, ModifyHdl)); m_pFormBox->SetSelectHdl(LINK(this, SwNumNamesDlg, SelectHdl)); m_pFormBox->SetDoubleClickHdl(LINK(this, SwNumNamesDlg, DoubleClickHdl)); - SelectHdl(m_pFormBox); + SelectHdl(*m_pFormBox); } static sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel) @@ -564,10 +563,10 @@ void SwOutlineSettingsTabPage::Update() SetModified(); } -IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SwOutlineSettingsTabPage, LevelHdl, ListBox&, rBox, void ) { nActLevel = 0; - if(pBox->IsEntryPosSelected( MAXLEVEL )) + if(rBox.IsEntryPosSelected( MAXLEVEL )) { nActLevel = 0xFFFF; } @@ -576,13 +575,12 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox ) sal_uInt16 nMask = 1; for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { - if(pBox->IsEntryPosSelected( i )) + if(rBox.IsEntryPosSelected( i )) nActLevel |= nMask; nMask <<= 1; } } Update(); - return 0; } IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pField ) @@ -603,11 +601,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pField ) return 0; } -IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) +IMPL_LINK_TYPED( SwOutlineSettingsTabPage, CollSelect, ListBox&, rBox, void ) { sal_uInt8 i; - const OUString aCollName(pBox->GetSelectEntry()); + const OUString aCollName(rBox.GetSelectEntry()); //0xFFFF not allowed here (disable) sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); OUString sOldName( pCollNames[nTmpLevel] ); @@ -643,7 +641,6 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) } SetModified(); - return 0; } IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CollSelectGetFocus, Control&, void) @@ -652,10 +649,10 @@ IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CollSelectGetFocus, Control&, vo aSaveCollNames[i] = pCollNames[i]; } -IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBox ) +IMPL_LINK_TYPED( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void ) { sal_uInt16 nMask = 1; - sal_Int16 nNumberType = pBox->GetSelectedNumberingType(); + sal_Int16 nNumberType = static_cast<SwNumberingTypeListBox&>(rBox).GetSelectedNumberingType(); for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) @@ -668,7 +665,6 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo nMask <<= 1; } SetModified(); - return 0; } IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify) @@ -706,7 +702,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pField ) return 0; } -IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl) +IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void) { OUString sEntry = m_pCharFormatLB->GetSelectEntry(); sal_uInt16 nMask = 1; @@ -749,7 +745,6 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl) } nMask <<= 1; } - return RET_OK; } SwOutlineSettingsTabPage::~SwOutlineSettingsTabPage() @@ -838,7 +833,7 @@ void SwOutlineSettingsTabPage::ActivatePage(const SfxItemSet& ) m_pLevelLB->SelectEntryPos(lcl_BitToLevel(nActLevel)); else m_pLevelLB->SelectEntryPos(MAXLEVEL); - LevelHdl(m_pLevelLB); + LevelHdl(*m_pLevelLB); } SfxTabPage::sfxpg SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*) diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index fd4e4ba3c20b..07a77808b10e 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -95,10 +95,9 @@ IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl) return 0; } -IMPL_LINK_NOARG(SwFootNotePage, LineColorSelected_Impl) +IMPL_LINK_NOARG_TYPED(SwFootNotePage, LineColorSelected_Impl, ListBox&, void) { m_pLineTypeBox->SetColor( m_pLineColorBox->GetSelectEntryColor() ); - return 0; } SwFootNotePage::SwFootNotePage(vcl::Window *pParent, const SfxItemSet &rSet) diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 1ac0fb2be6fd..b607f3567d7f 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -434,7 +434,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField) SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() ); } } - GridModifyHdl(0); + GridModifyHdl(*m_pColorLB); return 0; } @@ -490,7 +490,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField) } //rubySize is disabled } - GridModifyHdl(0); + GridModifyHdl(*m_pColorLB); return 0; } @@ -517,7 +517,7 @@ IMPL_LINK_TYPED(SwTextGridPage, GridTypeHdl, Button*, pButton, void) m_pCharWidthMF->Enable(false); } - GridModifyHdl(0); + GridModifyHdl(*m_pColorLB); } IMPL_LINK_NOARG_TYPED(SwTextGridPage, DisplayGridHdl, Button*, void) @@ -529,9 +529,9 @@ IMPL_LINK_NOARG_TYPED(SwTextGridPage, DisplayGridHdl, Button*, void) IMPL_LINK_NOARG_TYPED(SwTextGridPage, GridModifyClickHdl, Button*, void) { - GridModifyHdl(0); + GridModifyHdl(*m_pColorLB); } -IMPL_LINK_NOARG(SwTextGridPage, GridModifyHdl) +IMPL_LINK_NOARG_TYPED(SwTextGridPage, GridModifyHdl, ListBox&, void) { const SfxItemSet& rOldSet = GetItemSet(); SfxItemSet aSet(rOldSet); @@ -540,7 +540,6 @@ IMPL_LINK_NOARG(SwTextGridPage, GridModifyHdl) aSet.Put(*pExSet); PutGridItem(aSet); m_pExampleWN->UpdateExample(aSet); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 49e6978e81d9..b314dfc10f6f 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -209,7 +209,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell) m_pLangLB->SelectLanguage( nLang ); LanguageHdl( 0 ); - m_pLangLB->SetSelectHdl( LINK( this, SwSortDlg, LanguageHdl )); + m_pLangLB->SetSelectHdl( LINK( this, SwSortDlg, LanguageListBoxHdl )); m_pSortUp1RB->Check(bAsc1); m_pSortDn1RB->Check(!bAsc1); @@ -440,7 +440,12 @@ IMPL_LINK_TYPED( SwSortDlg, CheckHdl, Button*, pControl, void ) static_cast<CheckBox *>(pControl)->Check(); } -IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) +IMPL_LINK_TYPED( SwSortDlg, LanguageListBoxHdl, ListBox&, rLBox, void ) +{ + LanguageHdl(&rLBox); +} + +void SwSortDlg::LanguageHdl(ListBox* pLBox) { Sequence < OUString > aSeq( GetAppCollator().listCollatorAlgorithms( LanguageTag( m_pLangLB->GetSelectLanguage()).getLocale() )); @@ -489,7 +494,6 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) else if( LISTBOX_ENTRY_NOTFOUND == pL->GetSelectEntryPos() ) pL->SelectEntryPos( 0 ); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 6c127eb1366f..b01135358ccd 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -240,7 +240,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFormat* pSelFormat ) } m_pLbFormat->SelectEntryPos( 255 != nIndex ? (nDfltStylePos + nIndex) : 0 ); - SelFormatHdl( 0 ); + SelFormatHdl( *m_pLbFormat ); } void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFormat& rFormat, bool bEnable ) @@ -347,7 +347,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, AddHdl, Button*, void) bCoreDataChanged = true; } - SelFormatHdl( 0 ); + SelFormatHdl( *m_pLbFormat ); bOk = true; } } @@ -395,7 +395,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RemoveHdl, Button*, void) } pBox.reset(); - SelFormatHdl( 0 ); + SelFormatHdl( *m_pLbFormat ); } IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) @@ -444,7 +444,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) bCoreDataChanged = true; } - SelFormatHdl( 0 ); + SelFormatHdl( *m_pLbFormat ); bOk = true; bFormatRenamed = true; } @@ -461,7 +461,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) } } -IMPL_LINK_NOARG(SwAutoFormatDlg, SelFormatHdl) +IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, SelFormatHdl, ListBox&, void) { bool bBtnEnable = false; sal_uInt8 nSelPos = (sal_uInt8) m_pLbFormat->GetSelectEntryPos(), nOldIdx = nIndex; @@ -491,8 +491,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, SelFormatHdl) m_pBtnRemove->Enable( bBtnEnable ); m_pBtnRename->Enable( bBtnEnable ); - - return 0; } IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, OkHdl, Button*, void) diff --git a/sw/source/uibase/inc/ascfldlg.hxx b/sw/source/uibase/inc/ascfldlg.hxx index bd2b822b59c7..115e2eaf8ae5 100644 --- a/sw/source/uibase/inc/ascfldlg.hxx +++ b/sw/source/uibase/inc/ascfldlg.hxx @@ -42,7 +42,7 @@ class SwAsciiFilterDlg : public SfxModalDialog VclPtr<RadioButton> m_pLF_RB; bool m_bSaveLineStatus; - DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* ); + DECL_LINK_TYPED( CharSetSelHdl, ListBox&, void ); DECL_LINK_TYPED( LineEndHdl, RadioButton&, void ); void SetCRLF( LineEnd eEnd ); LineEnd GetCRLF() const; diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx index 49664253dc9c..c37612cdb62d 100644 --- a/sw/source/uibase/inc/break.hxx +++ b/sw/source/uibase/inc/break.hxx @@ -52,7 +52,7 @@ class SwBreakDlg: public SvxStandardDialog bool bHtmlMode; DECL_LINK_TYPED( ClickHdl, Button*, void ); - DECL_LINK( SelectHdl, void * ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); DECL_LINK_TYPED( PageNumHdl, Button*, void ); DECL_LINK(PageNumModifyHdl, void *); DECL_LINK_TYPED(OkHdl, Button*, void); diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index 0d043bf574a1..ce9c606dce1a 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -60,8 +60,9 @@ class SwColumnDlg : public SfxModalDialog bool bSelSectionChanged : 1; bool bFrameChanged : 1; - DECL_LINK(ObjectHdl, ListBox*); + DECL_LINK_TYPED(ObjectListBoxHdl, ListBox&, void); DECL_LINK_TYPED(OkHdl, Button*, void); + void ObjectHdl(ListBox*); public: SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh); @@ -147,6 +148,7 @@ class SwColumnPage : public SfxTabPage DECL_LINK_TYPED(Up, Button *, void); DECL_LINK_TYPED(Down, Button *, void); DECL_LINK( UpdateColMgr, void* ); + DECL_LINK_TYPED( UpdateColMgrListBox, ListBox&, void ); void Timeout(); void Update(MetricField *pInteractiveField); diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index 77927246d5ac..b4a5a9b28380 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -95,6 +95,7 @@ class SwCaptionDialog : public SvxStandardDialog ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > xNamed; DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectListBoxHdl, ListBox&, void); DECL_LINK(ModifyHdl, void *); DECL_LINK_TYPED(OptionHdl, Button *, void); DECL_LINK_TYPED(CaptionHdl, Button *, void); diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index 55d5105f33c4..833d8670e983 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -126,7 +126,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem SwInsDBColumns aDBColumns; const SwDBData aDBData; - Link<> aOldNumFormatLnk; + Link<ListBox&,void> aOldNumFormatLnk; OUString sNoTmpl; SwView* pView; @@ -141,7 +141,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem DECL_LINK_TYPED( TableFormatHdl, Button*, void ); DECL_LINK_TYPED( DBFormatHdl, Button*, void ); DECL_LINK_TYPED( TableToFromHdl, Button*, void ); - DECL_LINK( SelectHdl, ListBox* ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); DECL_LINK_TYPED( DblClickHdl, ListBox&, void ); DECL_LINK_TYPED( HeaderHdl, Button*, void ); diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx index 511ecc76b359..c251c7ba0c51 100644 --- a/sw/source/uibase/inc/drpcps.hxx +++ b/sw/source/uibase/inc/drpcps.hxx @@ -71,7 +71,7 @@ friend class SwDropCapsPict; DECL_LINK_TYPED(ClickHdl, Button*, void); DECL_LINK( ModifyHdl, Edit * ); - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); DECL_LINK_TYPED(WholeWordHdl, Button*, void); using SfxTabPage::ActivatePage; diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx index 853ffc8e6196..cce27158fc39 100644 --- a/sw/source/uibase/inc/envlop.hxx +++ b/sw/source/uibase/inc/envlop.hxx @@ -90,7 +90,7 @@ class SwEnvPage : public SfxTabPage SwWrtShell* pSh; OUString sActDBName; - DECL_LINK( DatabaseHdl, ListBox * ); + DECL_LINK_TYPED( DatabaseHdl, ListBox&, void ); DECL_LINK_TYPED(FieldHdl, Button*, void ); DECL_LINK_TYPED(SenderHdl, Button*, void ); diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 97d2a28c70ab..d83af39b4bae 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -134,8 +134,8 @@ class SwFrmPage: public SfxTabPage DECL_LINK_TYPED(RangeModifyClickHdl, Button*, void); void RangeModifyHdl(); DECL_LINK_TYPED(AnchorTypeHdl, Button*, void); - DECL_LINK( PosHdl, ListBox * ); - DECL_LINK( RelHdl, ListBox * ); + DECL_LINK_TYPED( PosHdl, ListBox&, void ); + DECL_LINK_TYPED( RelHdl, ListBox&, void ); void InitPos(RndStdIds eId, sal_Int16 nH, sal_Int16 nHRel, sal_Int16 nV, sal_Int16 nVRel, long nX, long nY); @@ -305,7 +305,7 @@ class SwFrmAddPage : public SfxTabPage bool bNew; DECL_LINK(EditModifyHdl, void *); - DECL_LINK(ChainModifyHdl, ListBox*); + DECL_LINK_TYPED(ChainModifyHdl, ListBox&, void); static const sal_uInt16 aAddPgRg[]; diff --git a/sw/source/uibase/inc/glosbib.hxx b/sw/source/uibase/inc/glosbib.hxx index 0ca522822340..78e80933de90 100644 --- a/sw/source/uibase/inc/glosbib.hxx +++ b/sw/source/uibase/inc/glosbib.hxx @@ -95,6 +95,7 @@ protected: DECL_LINK_TYPED(NewHdl, Button *, void); DECL_LINK_TYPED( DeleteHdl, Button*, void ); DECL_LINK(ModifyHdl, void *); + DECL_LINK_TYPED(ModifyListBoxHdl, ListBox&, void); DECL_LINK_TYPED(RenameHdl, Button *, void); public: diff --git a/sw/source/uibase/inc/multmrk.hxx b/sw/source/uibase/inc/multmrk.hxx index 2e9c26abaf82..41ccbb425dc1 100644 --- a/sw/source/uibase/inc/multmrk.hxx +++ b/sw/source/uibase/inc/multmrk.hxx @@ -31,7 +31,7 @@ class SwTOXMgr; // insert mark for index entry class SwMultiTOXMarkDlg : public SvxStandardDialog { - DECL_LINK( SelectHdl, ListBox * ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); VclPtr<FixedText> m_pTextFT; VclPtr<ListBox> m_pTOXLB; diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 4e855ed1df3c..7f4ba5922ae5 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -101,7 +101,7 @@ class SwNavigationPI : public vcl::Window, void FillBox(); void MakeMark(); - DECL_LINK( DocListBoxSelectHdl, ListBox * ); + DECL_LINK_TYPED( DocListBoxSelectHdl, ListBox&, void ); DECL_LINK_TYPED( ToolBoxSelectHdl, ToolBox *, void ); DECL_LINK_TYPED( ToolBoxClickHdl, ToolBox *, void ); DECL_LINK_TYPED( ToolBoxDropdownClickHdl, ToolBox*, void ); diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx index 355eefb0d297..348242561141 100644 --- a/sw/source/uibase/inc/num.hxx +++ b/sw/source/uibase/inc/num.hxx @@ -91,8 +91,8 @@ class SwNumPositionTabPage : public SfxTabPage void InitControls(); - DECL_LINK( LevelHdl, ListBox * ); - DECL_LINK(EditModifyHdl, void *); + DECL_LINK_TYPED( LevelHdl, ListBox&, void ); + DECL_LINK_TYPED(EditModifyHdl, ListBox&, void); DECL_LINK( DistanceHdl, MetricField * ); DECL_LINK_TYPED( DistanceLoseFocusHdl, Control&, void ); DECL_LINK_TYPED( RelativeHdl, Button*, void ); @@ -101,7 +101,7 @@ class SwNumPositionTabPage : public SfxTabPage void InitPosAndSpaceMode(); void ShowControlsDependingOnPosAndSpaceMode(); - DECL_LINK(LabelFollowedByHdl_Impl, void *); + DECL_LINK_TYPED(LabelFollowedByHdl_Impl, ListBox&, void); DECL_LINK( ListtabPosHdl_Impl, MetricField* ); DECL_LINK( AlignAtHdl_Impl, MetricField* ); DECL_LINK( IndentAtHdl_Impl, MetricField* ); diff --git a/sw/source/uibase/inc/numfmtlb.hxx b/sw/source/uibase/inc/numfmtlb.hxx index 6a59a57cfefc..634c07be327c 100644 --- a/sw/source/uibase/inc/numfmtlb.hxx +++ b/sw/source/uibase/inc/numfmtlb.hxx @@ -38,7 +38,7 @@ class SW_DLLPUBLIC NumFormatListBox : public ListBox //to be shown in the number format dialog bool bUseAutomaticLanguage;//determine whether language is automatically assigned - DECL_DLLPRIVATE_LINK( SelectHdl, ListBox * ); + DECL_DLLPRIVATE_LINK_TYPED( SelectHdl, ListBox&, void ); SAL_DLLPRIVATE double GetDefValue(const short nFormatType) const; SAL_DLLPRIVATE void Init(short nFormatType, bool bUsrFormats); diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx index c80a3b46d6ad..5825f9845b67 100644 --- a/sw/source/uibase/inc/numpara.hxx +++ b/sw/source/uibase/inc/numpara.hxx @@ -54,10 +54,10 @@ class SwParagraphNumTabPage : public SfxTabPage bool bCurNumrule : 1; DECL_LINK_TYPED(NewStartHdl_Impl, Button*, void); - DECL_LINK( StyleHdl_Impl, ListBox* ); + DECL_LINK_TYPED( StyleHdl_Impl, ListBox&,void ); DECL_LINK_TYPED(LineCountHdl_Impl, Button*, void); DECL_LINK_TYPED(EditNumStyleHdl_Impl, Button*, void); - DECL_LINK(EditNumStyleSelectHdl_Impl, void *); + DECL_LINK_TYPED(EditNumStyleSelectHdl_Impl, ListBox&, void); static const sal_uInt16 aPageRg[]; diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx index f247d6c76af1..75db09d9166a 100644 --- a/sw/source/uibase/inc/optcomp.hxx +++ b/sw/source/uibase/inc/optcomp.hxx @@ -50,7 +50,7 @@ private: sal_uLong m_nSavedOptions; // handler - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); DECL_LINK_TYPED(UseAsDefaultHdl, Button*, void); // private methods diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index e7eb2b39d22f..9f6483273da1 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -59,7 +59,7 @@ private: sal_uInt16 m_nLastTab; sal_Int32 m_nOldLinkMode; - DECL_LINK(MetricHdl, void *); + DECL_LINK_TYPED(MetricHdl, ListBox&, void); DECL_LINK_TYPED(StandardizedPageCountCheckHdl, Button*, void); public: @@ -154,8 +154,9 @@ private: bool bHTMLMode; DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectListBoxHdl, ListBox&, void); DECL_LINK(ModifyHdl, void * = 0); - DECL_LINK( OrderHdl, ListBox* ); + DECL_LINK_TYPED( OrderHdl, ListBox&, void ); DECL_LINK_TYPED(ShowEntryHdl, SvTreeListBox*, void); DECL_LINK_TYPED(SaveEntryHdl, SvTreeListBox*, void); diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 8a7a1280705c..33641c98fdc3 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -106,7 +106,7 @@ class SwAddPrinterTabPage : public SfxTabPage bool bPreview; DECL_LINK_TYPED(AutoClickHdl, Button*, void); - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); public: SwAddPrinterTabPage(vcl::Window* pParent, const SfxItemSet& rSet); @@ -340,9 +340,9 @@ class SwRedlineOptionsTabPage : public SfxTabPage OUString sAuthor; OUString sNone; - DECL_LINK(AttribHdl, ListBox*); - DECL_LINK(ChangedMaskPrevHdl, void* = 0); - DECL_LINK(ColorHdl, ColorListBox*); + DECL_LINK_TYPED(AttribHdl, ListBox&, void); + DECL_LINK_TYPED(ChangedMaskPrevHdl, ListBox&, void); + DECL_LINK_TYPED(ColorHdl, ListBox&, void); static void InitFontStyle(SvxFontPrevWindow& rExampleWin); diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index aed1139d5ebb..9eb16b76bb29 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -102,14 +102,14 @@ class SwOutlineSettingsTabPage : public SfxTabPage OUString* pCollNames; sal_uInt16 nActLevel; - DECL_LINK( LevelHdl, ListBox * ); + DECL_LINK_TYPED( LevelHdl, ListBox&, void ); DECL_LINK( ToggleComplete, NumericField * ); - DECL_LINK( CollSelect, ListBox * ); + DECL_LINK_TYPED( CollSelect, ListBox&, void ); DECL_LINK_TYPED(CollSelectGetFocus, Control&, void); - DECL_LINK( NumberSelect, SwNumberingTypeListBox * ); + DECL_LINK_TYPED( NumberSelect, ListBox&, void ); DECL_LINK(DelimModify, void *); DECL_LINK( StartModified, NumericField * ); - DECL_LINK(CharFormatHdl, void *); + DECL_LINK_TYPED(CharFormatHdl, ListBox&, void); void Update(); diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx index ca1ff21b3f8f..a72d20e92d72 100644 --- a/sw/source/uibase/inc/pgfnote.hxx +++ b/sw/source/uibase/inc/pgfnote.hxx @@ -61,7 +61,7 @@ private: DECL_LINK_TYPED(HeightMetric, Button*, void); DECL_LINK_TYPED(HeightModify, Control&, void); DECL_LINK( LineWidthChanged_Impl, void * ); - DECL_LINK( LineColorSelected_Impl, void * ); + DECL_LINK_TYPED( LineColorSelected_Impl, ListBox&, void); long lMaxHeight; diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx index e6548e01f1d2..95a084e47bc5 100644 --- a/sw/source/uibase/inc/pggrid.hxx +++ b/sw/source/uibase/inc/pggrid.hxx @@ -76,7 +76,7 @@ class SwTextGridPage: public SfxTabPage DECL_LINK_TYPED(CharorLineLoseFocusdHdl, Control&, void); DECL_LINK(TextSizeChangedHdl, SpinField*); DECL_LINK_TYPED(TextSizeLoseFocusHdl, Control&, void); - DECL_LINK(GridModifyHdl, void*); + DECL_LINK_TYPED(GridModifyHdl, ListBox&, void); DECL_LINK_TYPED(GridModifyClickHdl, Button*, void); DECL_LINK_TYPED(DisplayGridHdl, Button*, void); diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx index 69de0e969bed..e67b47a7e7bb 100644 --- a/sw/source/uibase/inc/srtdlg.hxx +++ b/sw/source/uibase/inc/srtdlg.hxx @@ -79,7 +79,8 @@ class SwSortDlg : public SvxStandardDialog DECL_LINK_TYPED( CheckHdl, Button*, void ); DECL_LINK_TYPED( DelimHdl, Button*, void ); - DECL_LINK( LanguageHdl, ListBox* ); + DECL_LINK_TYPED( LanguageListBoxHdl, ListBox&, void ); + void LanguageHdl(ListBox*); DECL_LINK_TYPED(DelimCharHdl, Button*,void); public: diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx index ef5a227b35a5..684023fb526c 100644 --- a/sw/source/uibase/inc/swuiccoll.hxx +++ b/sw/source/uibase/inc/swuiccoll.hxx @@ -57,8 +57,9 @@ class SwCondCollPage : public SfxTabPage DECL_LINK_TYPED( AssignRemoveTreeListBoxHdl, SvTreeListBox*, bool); DECL_LINK_TYPED( AssignRemoveClickHdl, Button*, void); DECL_LINK_TYPED( SelectTreeListBoxHdl, SvTreeListBox*, void ); - DECL_LINK( SelectHdl, void* ); + DECL_LINK_TYPED( SelectListBoxHdl, ListBox&, void ); void AssignRemove(void*); + void SelectHdl(void*); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 009c7a1a7ae0..d27e74404d9d 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -202,17 +202,18 @@ class SwTOXSelectTabPage : public SfxTabPage bool m_bWaitingInitialSettings; - DECL_LINK(TOXTypeHdl, ListBox* ); + DECL_LINK_TYPED(TOXTypeHdl, ListBox&, void ); DECL_LINK_TYPED(AddStylesHdl, Button*, void ); DECL_LINK_TYPED(MenuEnableHdl, Menu*, bool); DECL_LINK_TYPED(MenuExecuteHdl, Menu*, bool); - DECL_LINK(LanguageHdl, ListBox*); - + DECL_LINK_TYPED(LanguageListBoxHdl, ListBox&, void); + void LanguageHdl(ListBox*); DECL_LINK_TYPED(CheckBoxHdl, Button*, void ); DECL_LINK_TYPED(RadioButtonHdl, Button*, void); DECL_LINK(ModifyHdl, void*); + DECL_LINK_TYPED(ModifyListBoxHdl, ListBox&, void); - void ApplyTOXDescription(); + void ApplyTOXDescription(); void FillTOXDescription(); using SfxTabPage::ActivatePage; @@ -410,7 +411,7 @@ class SwTOXEntryTabPage : public SfxTabPage CurTOXType aLastTOXType; bool bInLevelHdl; - DECL_LINK(StyleSelectHdl, ListBox*); + DECL_LINK_TYPED(StyleSelectHdl, ListBox&, void); DECL_LINK_TYPED(EditStyleHdl, Button*, void); DECL_LINK_TYPED(InsertTokenHdl, Button*, void); DECL_LINK_TYPED(LevelHdl, SvTreeListBox*, void); @@ -420,9 +421,9 @@ class SwTOXEntryTabPage : public SfxTabPage DECL_LINK(FillCharHdl, ComboBox*); DECL_LINK_TYPED(RemoveInsertAuthHdl, Button*, void); DECL_LINK_TYPED(SortKeyHdl, Button*, void); - DECL_LINK(ChapterInfoHdl, ListBox*); + DECL_LINK_TYPED(ChapterInfoHdl, ListBox&, void); DECL_LINK(ChapterInfoOutlineHdl, NumericField*); - DECL_LINK(NumberFormatHdl, ListBox*); + DECL_LINK_TYPED(NumberFormatHdl, ListBox&, void); DECL_LINK_TYPED(AllLevelsHdl, Button*, void); @@ -467,7 +468,7 @@ class SwTOXStylesTabPage : public SfxTabPage DECL_LINK_TYPED( EditStyleHdl, Button *, void ); DECL_LINK_TYPED( StdHdl, Button*, void ); - DECL_LINK(EnableSelectHdl, void *); + DECL_LINK_TYPED(EnableSelectHdl, ListBox&, void); DECL_LINK_TYPED( DoubleClickHdl, ListBox&, void ); DECL_LINK_TYPED( AssignHdl, Button*, void ); void Modify(); diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx index 1e394b4e1ad3..4fe7e7959722 100644 --- a/sw/source/uibase/inc/swuiidxmrk.hxx +++ b/sw/source/uibase/inc/swuiidxmrk.hxx @@ -114,7 +114,8 @@ class SwIndexMarkPane DECL_LINK_TYPED(NextSameHdl, Button*, void); DECL_LINK_TYPED(PrevHdl, Button*, void); DECL_LINK_TYPED(PrevSameHdl, Button*, void); - DECL_LINK( ModifyHdl, ListBox* pBox ); + DECL_LINK_TYPED( ModifyListBoxHdl, ListBox&, void ); + DECL_LINK( ModifyHdl, void* ); DECL_LINK( KeyDCBModifyHdl, ComboBox * ); DECL_LINK_TYPED(NewUserIdxHdl, Button*, void); DECL_LINK_TYPED( SearchTypeHdl, Button*, void); @@ -208,7 +209,7 @@ class SwAuthorMarkPane DECL_LINK_TYPED(InsertHdl, Button*, void); DECL_LINK_TYPED(CloseHdl, Button*, void); DECL_LINK_TYPED(CreateEntryHdl, Button*, void); - DECL_LINK(CompEntryHdl, ListBox*); + DECL_LINK_TYPED(CompEntryHdl, ListBox&, void); DECL_LINK_TYPED(ChangeSourceHdl, Button*, void); DECL_LINK_TYPED(IsEntryAllowedHdl, Edit*, bool); DECL_LINK(EditModifyHdl, Edit*); diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx index 4c619b112027..2c6b868c81b4 100644 --- a/sw/source/uibase/inc/tautofmt.hxx +++ b/sw/source/uibase/inc/tautofmt.hxx @@ -75,7 +75,7 @@ class SwAutoFormatDlg : public SfxModalDialog DECL_LINK_TYPED( AddHdl, Button*, void ); DECL_LINK_TYPED( RemoveHdl, Button*, void ); DECL_LINK_TYPED( RenameHdl, Button*, void ); - DECL_LINK( SelFormatHdl, void * ); + DECL_LINK_TYPED( SelFormatHdl, ListBox&, void ); public: SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell, diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 1da44b0b0143..d341db8649b9 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -231,9 +231,9 @@ IMPL_LINK_NOARG_TYPED(WrapPropertyPanel, EnableContourHdl, Button*, void) mpBindings->GetDispatcher()->Execute(FN_FRAME_WRAP_CONTOUR, SfxCallMode::RECORD, &aItem, 0l); } -IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, ListBox*, pBox) +IMPL_LINK_TYPED(WrapPropertyPanel, SpacingLBHdl, ListBox&, rBox, void) { - sal_uInt16 nVal = (sal_uInt16)reinterpret_cast<sal_uLong>(pBox->GetSelectEntryData()); + sal_uInt16 nVal = (sal_uInt16)reinterpret_cast<sal_uLong>(rBox.GetSelectEntryData()); SvxLRSpaceItem aLRItem(nVal, nVal, 0, 0, RES_LR_SPACE); SvxULSpaceItem aULItem(nVal, nVal, RES_UL_SPACE); @@ -241,8 +241,6 @@ IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, ListBox*, pBox) nTop = nBottom = nLeft = nRight = nVal; mpBindings->GetDispatcher()->Execute(SID_ATTR_LRSPACE, SfxCallMode::RECORD, &aLRItem, 0l); mpBindings->GetDispatcher()->Execute(SID_ATTR_ULSPACE, SfxCallMode::RECORD, &aULItem, 0l); - - return 0L; } IMPL_LINK_NOARG_TYPED(WrapPropertyPanel, WrapTypeHdl, Button*, void) diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx index 960ce3b8bd93..b64b32e70740 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx @@ -98,7 +98,7 @@ namespace sw { namespace sidebar { DECL_LINK_TYPED(WrapTypeHdl, Button*, void); DECL_LINK_TYPED(EnableContourHdl, Button*, void); DECL_LINK_TYPED(EditContourHdl, Button*, void); - DECL_LINK(SpacingLBHdl, ListBox*); + DECL_LINK_TYPED(SpacingLBHdl, ListBox&, void); }; } } // end of namespace ::sw::sidebar diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 51bb694445a2..29ad1bcf791e 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -823,7 +823,7 @@ private: VclPtr<ListBox> aListBox; IFieldmark *pFieldmark; - DECL_LINK( MyListBoxHandler, ListBox * ); + DECL_LINK_TYPED( MyListBoxHandler, ListBox&, void ); public: SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ); @@ -886,12 +886,11 @@ void SwFieldDialog::dispose() FloatingWindow::dispose(); } -IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) +IMPL_LINK_TYPED( SwFieldDialog, MyListBoxHandler, ListBox&, rBox, void ) { - short res = 0; - if ( !pBox->IsTravelSelect() ) + if ( !rBox.IsTravelSelect() ) { - sal_Int32 selection = pBox->GetSelectEntryPos(); + sal_Int32 selection = rBox.GetSelectEntryPos(); if ( selection >= 0 ) { OUString sKey = OUString( ODF_FORMDROPDOWN_RESULT ); @@ -902,9 +901,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) } EndPopupMode(); - res = 1; } - return res; } IMPL_LINK_NOARG_TYPED(SwView, FieldPopupModeEndHdl, FloatingWindow*, void) diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index b1fac9b59029..77643b0ff4fe 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -55,7 +55,7 @@ class SwGlossDecideDlg : public ModalDialog VclPtr<ListBox> m_pListLB; DECL_LINK_TYPED(DoubleClickHdl, ListBox&, void); - DECL_LINK(SelectHdl, void*); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); public: explicit SwGlossDecideDlg(vcl::Window* pParent); @@ -93,10 +93,9 @@ IMPL_LINK_NOARG_TYPED(SwGlossDecideDlg, DoubleClickHdl, ListBox&, void) EndDialog(RET_OK); } -IMPL_LINK_NOARG(SwGlossDecideDlg, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwGlossDecideDlg, SelectHdl, ListBox&, void) { m_pOk->Enable(LISTBOX_ENTRY_NOTFOUND != m_pListLB->GetSelectEntryPos()); - return 0; } SwGlossaryList::SwGlossaryList() : diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 57661170b000..9d8eb3aa118c 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -124,9 +124,9 @@ static void lcl_UnSelectFrm(SwWrtShell *pSh) // Select the document view -IMPL_LINK( SwNavigationPI, DocListBoxSelectHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SwNavigationPI, DocListBoxSelectHdl, ListBox&, rBox, void ) { - int nEntryIdx = pBox->GetSelectEntryPos(); + int nEntryIdx = rBox.GetSelectEntryPos(); SwView *pView ; pView = SwModule::GetFirstView(); while (nEntryIdx-- && pView) @@ -144,7 +144,6 @@ IMPL_LINK( SwNavigationPI, DocListBoxSelectHdl, ListBox *, pBox ) { aContentTree->SetConstantShell(pView->GetWrtShellPtr()); } - return 0; } // Filling of the list box for outline view or documents diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index f0e86d3a4dd3..90a8154c82fe 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -366,14 +366,14 @@ sal_uLong NumFormatListBox::GetFormat() const return reinterpret_cast<sal_uLong>(GetEntryData(nPos)); } -IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( NumFormatListBox, SelectHdl, ListBox&, rBox, void ) { - const sal_Int32 nPos = pBox->GetSelectEntryPos(); + const sal_Int32 nPos = rBox.GetSelectEntryPos(); OUString sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT )); SwView *pView = GetView(); - if( pView && nPos == pBox->GetEntryCount() - 1 && - pBox->GetEntry( nPos ) == sDefine ) + if( pView && nPos == rBox.GetEntryCount() - 1 && + rBox.GetEntry( nPos ) == sDefine ) { SwWrtShell &rSh = pView->GetWrtShell(); SvNumberFormatter* pFormatter = rSh.GetNumberFormatter(); @@ -442,7 +442,6 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) else SetDefFormat(nFormat); } - return 0; } double NumFormatListBox::GetDefValue(const short nFormatType) const |