diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-14 16:34:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-17 09:59:59 +0200 |
commit | 8cf544cb3a71598dcf98e6563b51d2e334c720d3 (patch) | |
tree | e645056a4a8dfe9d41083450ae6d7f91d0a273e4 /sd | |
parent | 979b460faf310be202d627ebd31dd87e3308e4b9 (diff) |
convert Link<> to typed
Change-Id: Ib0bf56a0e642720ff5daafdfc2dc12809be87e43
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/OutlineViewShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 46 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 26 |
4 files changed, 34 insertions, 42 deletions
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index b3eefc112328..44b56f2b074e 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -403,7 +403,7 @@ protected: bool mbReadOnly; static bool mbPipette; - DECL_LINK( ClipboardChanged, TransferableDataHelper* ); + DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void ); DECL_LINK( TabSplitHdl, TabBar * ); DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* ); DECL_LINK( RenameSlideHdl, AbstractSvxNameDialog* ); diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index 08bbf1b9b897..e31e04b2888d 100644 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -159,7 +159,7 @@ private: bool mbInitialized; void Construct (DrawDocShell* pDocSh); - DECL_LINK( ClipboardChanged, TransferableDataHelper* ); + DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void ); }; } // end of namespace sd diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index b773cff8484b..bfd65c9a2627 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -180,32 +180,28 @@ using namespace ::com::sun::star::linguistic2; namespace sd { -IMPL_LINK( DrawViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper ) +IMPL_LINK_TYPED( DrawViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void ) { - if ( pDataHelper ) - { - mbPastePossible = ( pDataHelper->GetFormatCount() != 0 ); - - // Update the list of supported clipboard formats according to the - // new clipboard content. - // There are some stack traces that indicate the possibility of the - // DrawViewShell destructor called during the call to - // GetSupportedClipboardFormats(). If that really has happened then - // exit immediately. - TransferableDataHelper aDataHelper ( - TransferableDataHelper::CreateFromSystemClipboard(GetActiveWindow())); - ::std::unique_ptr<SvxClipboardFormatItem> pFormats (GetSupportedClipboardFormats(aDataHelper)); - if (mpDrawView == NULL) - return 0; - mpCurrentClipboardFormats = std::move(pFormats); - - SfxBindings& rBindings = GetViewFrame()->GetBindings(); - rBindings.Invalidate( SID_PASTE ); - rBindings.Invalidate( SID_PASTE_SPECIAL ); - rBindings.Invalidate( SID_PASTE_UNFORMATTED ); - rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS ); - } - return 0; + mbPastePossible = ( pDataHelper->GetFormatCount() != 0 ); + + // Update the list of supported clipboard formats according to the + // new clipboard content. + // There are some stack traces that indicate the possibility of the + // DrawViewShell destructor called during the call to + // GetSupportedClipboardFormats(). If that really has happened then + // exit immediately. + TransferableDataHelper aDataHelper ( + TransferableDataHelper::CreateFromSystemClipboard(GetActiveWindow())); + ::std::unique_ptr<SvxClipboardFormatItem> pFormats (GetSupportedClipboardFormats(aDataHelper)); + if (mpDrawView == NULL) + return; + mpCurrentClipboardFormats = std::move(pFormats); + + SfxBindings& rBindings = GetViewFrame()->GetBindings(); + rBindings.Invalidate( SID_PASTE ); + rBindings.Invalidate( SID_PASTE_SPECIAL ); + rBindings.Invalidate( SID_PASTE_UNFORMATTED ); + rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS ); } void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet) diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index c3382c85967a..ed7dde9c1f41 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -706,22 +706,18 @@ void OutlineViewShell::FuPermanent(SfxRequest &rReq) } } -IMPL_LINK( OutlineViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper ) +IMPL_LINK_TYPED( OutlineViewShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void ) { - if ( pDataHelper ) - { - bPastePossible = ( pDataHelper->GetFormatCount() != 0 && - ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || - pDataHelper->HasFormat( SotClipboardFormatId::RTF ) || - pDataHelper->HasFormat( SotClipboardFormatId::HTML ) ) ); - - SfxBindings& rBindings = GetViewFrame()->GetBindings(); - rBindings.Invalidate( SID_PASTE ); - rBindings.Invalidate( SID_PASTE_SPECIAL ); - rBindings.Invalidate( SID_PASTE_UNFORMATTED ); - rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS ); - } - return 0; + bPastePossible = pDataHelper->GetFormatCount() != 0 && + ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || + pDataHelper->HasFormat( SotClipboardFormatId::RTF ) || + pDataHelper->HasFormat( SotClipboardFormatId::HTML ) ); + + SfxBindings& rBindings = GetViewFrame()->GetBindings(); + rBindings.Invalidate( SID_PASTE ); + rBindings.Invalidate( SID_PASTE_SPECIAL ); + rBindings.Invalidate( SID_PASTE_UNFORMATTED ); + rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS ); } /** |