diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-24 18:59:52 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-25 18:19:12 +0000 |
commit | 51b2ad378a8531a7b02433594cd7f6bbd6a61222 (patch) | |
tree | b4d32c26ac00aeb87d5d82d4f33431d43f91ed0e | |
parent | 825b9982a5de3ab94820ce5257bb446ea0a1c20a (diff) |
convert Link<> to typed
Change-Id: I9a85b8d6557490775c3d8482ac49bd27c51b6c8a
Reviewed-on: https://gerrit.libreoffice.org/18853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 4 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 4 | ||||
-rw-r--r-- | cui/source/options/optcolor.cxx | 6 | ||||
-rw-r--r-- | cui/source/options/optcolor.hxx | 2 | ||||
-rw-r--r-- | include/svx/svxdlg.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel2.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawDocShell.hxx | 8 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsb.cxx | 9 |
11 files changed, 26 insertions, 35 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 88806b38b530..94356f2d8115 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -587,7 +587,7 @@ void AbstractSvxNameDialog_Impl::GetName(OUString& rName) pDlg->GetName( rName ); } -void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link<>& rLink, bool bCheckImmediately ) +void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately ) { aCheckNameHdl = rLink; if( rLink.IsSet() ) @@ -610,7 +610,7 @@ void AbstractSvxNameDialog_Impl::SetText( const OUString& rStr ) IMPL_LINK_NOARG_TYPED(AbstractSvxNameDialog_Impl, CheckNameHdl, SvxNameDialog&, bool) { if( aCheckNameHdl.IsSet() ) - return aCheckNameHdl.Call(this); + return aCheckNameHdl.Call(*this); return false; } diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 5477392c99e7..949e25266f4c 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -325,13 +325,13 @@ class AbstractSvxNameDialog_Impl :public AbstractSvxNameDialog { DECL_ABSTDLG_BASE(AbstractSvxNameDialog_Impl,SvxNameDialog) virtual void GetName( OUString& rName ) SAL_OVERRIDE ; - virtual void SetCheckNameHdl( const Link<>& rLink, bool bCheckImmediately = false ) SAL_OVERRIDE ; + virtual void SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately = false ) SAL_OVERRIDE ; virtual void SetEditHelpId(const OString&) SAL_OVERRIDE ; //from class Window virtual void SetHelpId( const OString& ) SAL_OVERRIDE ; virtual void SetText( const OUString& rStr ) SAL_OVERRIDE ; private: - Link<> aCheckNameHdl; + Link<AbstractSvxNameDialog&,bool> aCheckNameHdl; DECL_LINK_TYPED(CheckNameHdl, SvxNameDialog&, bool); }; diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 76a2ec3172f4..d95fd2a6a0d5 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1227,11 +1227,11 @@ IMPL_LINK_TYPED(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, vo m_pDeleteSchemePB->Enable( m_pColorSchemeLB->GetEntryCount() > 1 ); } -IMPL_LINK(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog*, pDialog ) +IMPL_LINK_TYPED(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog&, rDialog, bool ) { OUString sName; - pDialog->GetName(sName); - return long(!sName.isEmpty() && LISTBOX_ENTRY_NOTFOUND == m_pColorSchemeLB->GetEntryPos( sName )); + rDialog.GetName(sName); + return !sName.isEmpty() && LISTBOX_ENTRY_NOTFOUND == m_pColorSchemeLB->GetEntryPos( sName ); } void SvxColorOptionsTabPage::FillUserData() diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx index ca290410d458..f182e4bd5d3d 100644 --- a/cui/source/options/optcolor.hxx +++ b/cui/source/options/optcolor.hxx @@ -43,7 +43,7 @@ class SvxColorOptionsTabPage : public SfxTabPage DECL_LINK(SchemeChangedHdl_Impl, ListBox*); DECL_LINK_TYPED(SaveDeleteHdl_Impl, Button*, void); - DECL_LINK(CheckNameHdl_Impl, AbstractSvxNameDialog*); + DECL_LINK_TYPED(CheckNameHdl_Impl, AbstractSvxNameDialog&, bool); void UpdateColorConfig(); public: diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 459b61ef8566..d97090bac515 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -158,7 +158,7 @@ class AbstractSvxNameDialog :public VclAbstractDialog { public: virtual void GetName( OUString& rName ) = 0; - virtual void SetCheckNameHdl( const Link<>& rLink, bool bCheckImmediately = false ) = 0; + virtual void SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately = false ) = 0; virtual void SetEditHelpId(const OString&) = 0; //from class Window virtual void SetHelpId( const OString& ) = 0; diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index 88d14a6920f9..87b97987748f 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -410,16 +410,13 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr return bCanUseNewName; } -IMPL_LINK( DrawDocShell, RenameSlideHdl, AbstractSvxNameDialog*, pDialog ) +IMPL_LINK_TYPED( DrawDocShell, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool ) { - if( ! pDialog ) - return long(false); - OUString aNewName; - pDialog->GetName( aNewName ); - - return long(IsNewPageNameValid( aNewName )); + rDialog.GetName( aNewName ); + return IsNewPageNameValid( aNewName ); } + } // end of namespace sd /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 6ba5aee41553..009dafab5d93 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -197,7 +197,7 @@ public: */ virtual OutputDevice* GetDocumentRefDev() SAL_OVERRIDE; - DECL_LINK( RenameSlideHdl, AbstractSvxNameDialog* ); + DECL_LINK_TYPED( RenameSlideHdl, AbstractSvxNameDialog&, bool ); // ExecuteSpellPopup now handled by DrawDocShell DECL_LINK_TYPED( OnlineSpellCallback, SpellCallbackInfo&, void ); @@ -216,9 +216,9 @@ protected: FontList* mpFontList; rtl::Reference<FuPoor> mxDocShellFunction; DocumentType meDocType; - sal_uInt16 mnStyleFamily; - const sal_uInt16* mpFilterSIDs; - sal_uInt16 mnFilterCount; + sal_uInt16 mnStyleFamily; + const sal_uInt16* mpFilterSIDs; + sal_uInt16 mnFilterCount; bool mbFilterEnable; bool mbSdDataObj; bool mbInDestruction; diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index c3bf37d15600..1970900e9439 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -406,7 +406,7 @@ protected: DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void ); DECL_LINK_TYPED( TabSplitHdl, TabBar *, void ); DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* ); - DECL_LINK( RenameSlideHdl, AbstractSvxNameDialog* ); + DECL_LINK_TYPED( RenameSlideHdl, AbstractSvxNameDialog&, bool ); void DeleteActualPage(); void DeleteActualLayer(); diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 446c6fc8c5d9..5945a4a77247 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -934,13 +934,10 @@ void SlotManager::RenameSlide() } } -IMPL_LINK(SlotManager, RenameSlideHdl, AbstractSvxNameDialog*, pDialog) +IMPL_LINK_TYPED(SlotManager, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool) { - if( ! pDialog ) - return 0; - OUString aNewName; - pDialog->GetName( aNewName ); + rDialog.GetName( aNewName ); model::SharedPageDescriptor pDescriptor ( mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()); @@ -948,9 +945,9 @@ IMPL_LINK(SlotManager, RenameSlideHdl, AbstractSvxNameDialog*, pDialog) if (pDescriptor.get() != NULL) pCurrentPage = pDescriptor->GetPage(); - return long( (pCurrentPage!=NULL && aNewName == pCurrentPage->GetName()) + return (pCurrentPage!=NULL && aNewName == pCurrentPage->GetName()) || (mrSlideSorter.GetViewShell() - && mrSlideSorter.GetViewShell()->GetDocSh()->IsNewPageNameValid( aNewName ) )); + && mrSlideSorter.GetViewShell()->GetDocSh()->IsNewPageNameValid( aNewName ) ); } bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUString & rName ) diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx index e9db2ce099d7..814a17d40652 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx @@ -89,7 +89,7 @@ private: drviews2.cxx. */ void RenameSlide(); - DECL_LINK(RenameSlideHdl, AbstractSvxNameDialog*); + DECL_LINK_TYPED(RenameSlideHdl, AbstractSvxNameDialog&, bool); bool RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUString& rName); /** Handle SID_INSERTPAGE slot calls. diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index cdad44212dc0..7694df7e187e 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -138,17 +138,14 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName ) return bSuccess; } -IMPL_LINK( DrawViewShell, RenameSlideHdl, AbstractSvxNameDialog*, pDialog ) +IMPL_LINK_TYPED( DrawViewShell, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool ) { - if( ! pDialog ) - return 0; - OUString aNewName; - pDialog->GetName( aNewName ); + rDialog.GetName( aNewName ); SdPage* pCurrentPage = GetDoc()->GetSdPage( maTabControl->GetCurPageId() - 1, GetPageKind() ); - return long(pCurrentPage && ( aNewName == pCurrentPage->GetName() || GetDocSh()->IsNewPageNameValid( aNewName ) )); + return pCurrentPage && ( aNewName == pCurrentPage->GetName() || GetDocSh()->IsNewPageNameValid( aNewName ) ); } void DrawViewShell::ModifyLayer ( |