diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-10-04 15:05:38 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-12 10:48:13 +0000 |
commit | 3c99f8500f657ed84b316390d5175a6f5e56bc69 (patch) | |
tree | 749f16652560a50d409b12a23bf1a5d93b3cd2d5 /sfx2/source | |
parent | bbadb38539eb233ac45b267034066a7274181c65 (diff) |
convert Link<> to typed
Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb
Reviewed-on: https://gerrit.libreoffice.org/19305
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 24 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 2 |
7 files changed, 22 insertions, 31 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 1d7de9740fd8..06ebccb32c34 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1588,11 +1588,9 @@ IMPL_LINK_TYPED( SfxHelpIndexWindow_Impl, ActivatePageHdl, TabControl *, pTabCtr pTabCtrl->SetTabPage( nId, pPage ); } -IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectHdl) +IMPL_LINK_NOARG_TYPED(SfxHelpIndexWindow_Impl, SelectHdl, ListBox&, void) { aIdle.Start(); - - return 0; } IMPL_LINK_NOARG_TYPED(SfxHelpIndexWindow_Impl, InitHdl, Idle *, void) diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index 72217a1359dc..78b0947c79a9 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -313,7 +313,7 @@ private: inline BookmarksTabPage_Impl* GetBookmarksPage(); DECL_LINK_TYPED(ActivatePageHdl, TabControl*, void ); - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); DECL_LINK_TYPED(InitHdl, Idle *, void); DECL_LINK_TYPED(SelectFactoryHdl, Idle *, void); DECL_LINK_TYPED(KeywordHdl, IndexTabPage_Impl&, void); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3b24d4da76ab..4f2a3445f568 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1504,9 +1504,10 @@ void CustomPropertiesWindow::dispose() vcl::Window::dispose(); } -IMPL_STATIC_LINK( - CustomPropertiesWindow, TypeHdl, CustomPropertiesTypeBox*, pBox ) +IMPL_STATIC_LINK_TYPED( + CustomPropertiesWindow, TypeHdl, ListBox&, rListBox, void ) { + CustomPropertiesTypeBox* pBox = static_cast<CustomPropertiesTypeBox*>(&rListBox); long nType = reinterpret_cast<long>( pBox->GetSelectEntryData() ); CustomPropertyLine* pLine = pBox->GetLine(); pLine->m_aValueEdit->Show( (CUSTOM_TYPE_TEXT == nType) || (CUSTOM_TYPE_NUMBER == nType) ); @@ -1529,8 +1530,6 @@ IMPL_STATIC_LINK( pLine->m_bIsDate = false; pLine->m_aDateField->SetSizePixel( pLine->m_aTimeField->GetSizePixel() ); } - - return 0; } IMPL_LINK_TYPED( CustomPropertiesWindow, RemoveHdl, Button*, pBtn, void ) @@ -1878,7 +1877,7 @@ void CustomPropertiesWindow::AddLine( const OUString& sName, Any& rAny ) pNewLine->m_aTypeBox->SelectEntryPos( m_aTypeBox->GetEntryPos( reinterpret_cast<void*>(nType) ) ); } - TypeHdl( nullptr, pNewLine->m_aTypeBox.get() ); + TypeHdl( nullptr, *pNewLine->m_aTypeBox.get() ); pNewLine->m_aNameBox->GrabFocus(); } diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 425cf984dbda..16a06c479ebe 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -342,7 +342,7 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl() m_pDescFt->SetText( pStyle->GetDescription( eUnit ) ); } -IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) +IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditStyleSelectHdl_Impl, ListBox&, void ) { OUString aTemplName(m_pFollowLb->GetSelectEntry()); OUString aEditTemplName(m_pNameRo->GetText()); @@ -350,7 +350,6 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) m_pEditStyleBtn->Enable(); else m_pEditStyleBtn->Disable(); - return 0; } IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditStyleHdl_Impl, Button*, void ) @@ -361,14 +360,13 @@ IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditStyleHdl_Impl, Button*, void } } -IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl ) +IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl, ListBox&, void ) { sal_Int32 linkSelectPos = m_pBaseLb->GetSelectEntryPos(); if ( linkSelectPos == 0 ) m_pEditLinkStyleBtn->Disable(); else m_pEditLinkStyleBtn->Enable(); - return 0; } IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl, Button*, void ) diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 207166cc74f1..439cc15acef1 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1698,9 +1698,9 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable) } } -IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) +IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox&, rBox, void ) { - if (SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString() == pBox->GetSelectEntry()) + if (SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString() == rBox.GetSelectEntry()) { EnableHierarchical(true); } @@ -1708,8 +1708,6 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) { EnableHierarchical(false); } - - return 0; } // Select-Handler for the Toolbox diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index c15911e76891..5bc866fc27b4 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -147,8 +147,8 @@ class SfxNewFileDialog_Impl DECL_LINK_TYPED( Update, Idle *, void ); - DECL_LINK(RegionSelect, ListBox*); - DECL_LINK(TemplateSelect, void*); + DECL_LINK_TYPED(RegionSelect, ListBox&, void); + DECL_LINK_TYPED(TemplateSelect, ListBox&, void); DECL_LINK_TYPED(DoubleClick, ListBox&, void); DECL_LINK_TYPED(Expand, VclExpander&, void); DECL_LINK_TYPED(LoadFile, Button*, void); @@ -238,12 +238,12 @@ IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle*, void) } } -IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox*, pBox ) +IMPL_LINK_TYPED( SfxNewFileDialog_Impl, RegionSelect, ListBox&, rBox, void ) { if (xDocShell.Is() && xDocShell->GetProgress()) - return 0; + return; - const sal_uInt16 nRegion = pBox->GetSelectEntryPos(); + const sal_uInt16 nRegion = rBox.GetSelectEntryPos(); const sal_uInt16 nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0; m_pTemplateLb->SetUpdateMode(false); m_pTemplateLb->Clear(); @@ -259,27 +259,25 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox*, pBox ) m_pTemplateLb->SetUpdateMode(true); m_pTemplateLb->Invalidate(); m_pTemplateLb->Update(); - TemplateSelect(m_pTemplateLb); - return 0; + TemplateSelect(*m_pTemplateLb); } IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Expand, VclExpander&, void) { - TemplateSelect(m_pTemplateLb); + TemplateSelect(*m_pTemplateLb); } -IMPL_LINK_NOARG(SfxNewFileDialog_Impl, TemplateSelect) +IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, TemplateSelect, ListBox&, void) { // Still loading if ( xDocShell && xDocShell->GetProgress() ) - return 0; + return; if (!m_pMoreBt->get_expanded()) // Dialog is not opened - return 0; + return; aPrevIdle.Start(); - return 0; } IMPL_LINK_NOARG_TYPED( SfxNewFileDialog_Impl, DoubleClick, ListBox&, void ) @@ -418,7 +416,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl( aPrevIdle.SetIdleHdl( LINK( this, SfxNewFileDialog_Impl, Update)); m_pRegionLb->SelectEntryPos(0); - RegionSelect(m_pRegionLb); + RegionSelect(*m_pRegionLb); } SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl() diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index afa26b5be746..e327154fdd67 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -219,7 +219,7 @@ protected: bool m_bWantHierarchical :1; bool bBindingUpdate :1; - DECL_LINK( FilterSelectHdl, ListBox* ); + DECL_LINK_TYPED( FilterSelectHdl, ListBox&, void ); DECL_LINK_TYPED( FmtSelectHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( ApplyHdl, LinkParamNone*, void ); DECL_LINK_TYPED( TreeListApplyHdl, SvTreeListBox*, bool ); |