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 /sd | |
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>
Diffstat (limited to 'sd')
-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 |
6 files changed, 17 insertions, 26 deletions
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 ( |