summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-14 16:34:39 +0200
committerNoel Grandin <noel@peralex.com>2015-08-17 09:59:59 +0200
commit8cf544cb3a71598dcf98e6563b51d2e334c720d3 (patch)
treee645056a4a8dfe9d41083450ae6d7f91d0a273e4
parentmake Link<> typed (diff)
downloadcore-8cf544cb3a71598dcf98e6563b51d2e334c720d3.tar.gz
core-8cf544cb3a71598dcf98e6563b51d2e334c720d3.zip
convert Link<> to typed
Change-Id: Ib0bf56a0e642720ff5daafdfc2dc12809be87e43
-rw-r--r--dbaccess/source/ui/app/AppController.cxx3
-rw-r--r--dbaccess/source/ui/app/AppController.hxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx3
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx2
-rw-r--r--forms/source/richtext/clipboarddispatcher.cxx4
-rw-r--r--forms/source/richtext/clipboarddispatcher.hxx2
-rw-r--r--include/svtools/cliplistener.hxx5
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx3
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx16
-rw-r--r--sc/source/ui/inc/cellsh.hxx2
-rw-r--r--sc/source/ui/inc/drtxtob.hxx2
-rw-r--r--sc/source/ui/inc/editsh.hxx2
-rw-r--r--sc/source/ui/view/cellsh.cxx24
-rw-r--r--sc/source/ui/view/editsh.cxx16
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/inc/OutlineViewShell.hxx2
-rw-r--r--sd/source/ui/view/drviews7.cxx46
-rw-r--r--sd/source/ui/view/outlnvsh.cxx26
-rw-r--r--svtools/source/misc/cliplistener.cxx4
20 files changed, 72 insertions, 96 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index a21e6f7bfa5d..d6f67c3b02ee 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2246,10 +2246,9 @@ void OApplicationController::showPreviewFor(const ElementType _eType,const OUStr
}
}
-IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged)
+IMPL_LINK_NOARG_TYPED(OApplicationController, OnClipboardChanged, TransferableDataHelper*, void)
{
OnInvalidateClipboard();
- return 0L;
}
void OApplicationController::OnInvalidateClipboard()
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index ada71a0b3b40..fda9a6a5576e 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -524,7 +524,7 @@ namespace dbaui
getCurrentSelection( Control& _rControl ) const SAL_OVERRIDE;
void OnInvalidateClipboard();
- DECL_LINK( OnClipboardChanged, void* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
DECL_LINK( OnAsyncDrop, void* );
DECL_LINK( OnCreateWithPilot, void* );
DECL_LINK( OnSelectContainer, void* );
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 1f05479f4727..cc3b1c3ade8a 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2278,11 +2278,10 @@ void SbaXDataBrowserController::CellDeactivated()
OnInvalidateClipboard( NULL );
}
-IMPL_LINK_NOARG(SbaXDataBrowserController, OnClipboardChanged)
+IMPL_LINK_NOARG_TYPED(SbaXDataBrowserController, OnClipboardChanged, TransferableDataHelper*, void)
{
SolarMutexGuard aGuard;
OnInvalidateClipboard( NULL );
- return 0;
}
IMPL_LINK_TYPED(SbaXDataBrowserController, OnInvalidateClipboard, Timer*, _pTimer, void)
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 7c1dfef21e6a..2b1d027952c8 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -328,7 +328,7 @@ namespace dbaui
// time to check the CUT/COPY/PASTE-slot-states
DECL_LINK_TYPED( OnInvalidateClipboard, Timer*, void );
- DECL_LINK( OnClipboardChanged, void* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
// search callbacks
DECL_LINK(OnSearchContextRequest, FmSearchContext*);
diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx
index 2905690809b9..84e82be27d43 100644
--- a/forms/source/richtext/clipboarddispatcher.cxx
+++ b/forms/source/richtext/clipboarddispatcher.cxx
@@ -153,15 +153,13 @@ namespace frm
}
- IMPL_LINK( OPasteClipboardDispatcher, OnClipboardChanged, TransferableDataHelper*, _pDataHelper )
+ IMPL_LINK_TYPED( OPasteClipboardDispatcher, OnClipboardChanged, TransferableDataHelper*, _pDataHelper, void )
{
OSL_ENSURE( _pDataHelper, "OPasteClipboardDispatcher::OnClipboardChanged: ooops!" );
m_bPastePossible = _pDataHelper->HasFormat( SotClipboardFormatId::STRING )
|| _pDataHelper->HasFormat( SotClipboardFormatId::RTF );
invalidate();
-
- return 0L;
}
diff --git a/forms/source/richtext/clipboarddispatcher.hxx b/forms/source/richtext/clipboarddispatcher.hxx
index 16de754ea20c..11706ebf5de2 100644
--- a/forms/source/richtext/clipboarddispatcher.hxx
+++ b/forms/source/richtext/clipboarddispatcher.hxx
@@ -81,7 +81,7 @@ namespace frm
virtual void disposing( ::osl::ClearableMutexGuard& _rClearBeforeNotify ) SAL_OVERRIDE;
private:
- DECL_LINK( OnClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
};
diff --git a/include/svtools/cliplistener.hxx b/include/svtools/cliplistener.hxx
index e9af235b1203..2317b404b8d9 100644
--- a/include/svtools/cliplistener.hxx
+++ b/include/svtools/cliplistener.hxx
@@ -27,15 +27,16 @@
namespace vcl { class Window; }
+class TransferableDataHelper;
class SVT_DLLPUBLIC TransferableClipboardListener : public ::cppu::WeakImplHelper1<
::com::sun::star::datatransfer::clipboard::XClipboardListener >
{
- Link<> aLink;
+ Link<TransferableDataHelper*,void> aLink;
public:
// Link is called with a TransferableDataHelper pointer
- TransferableClipboardListener( const Link<>& rCallback );
+ TransferableClipboardListener( const Link<TransferableDataHelper*,void>& rCallback );
virtual ~TransferableClipboardListener();
void AddRemoveListener( vcl::Window* pWin, bool bAdd );
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index cd1d26f972a3..4c85a2c3159a 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -315,7 +315,7 @@ namespace rptui
,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
void OnInvalidateClipboard();
- DECL_LINK( OnClipboardChanged, void* );
+ DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
DECL_LINK( OnExecuteReport, void* );
DECL_LINK( OnOpenHelpAgent, void* );
// all the features which should be handled by this class
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 38c4c9a9549e..0e304d561a27 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2342,10 +2342,9 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr
}
}
-IMPL_LINK_NOARG(OReportController, OnClipboardChanged)
+IMPL_LINK_NOARG_TYPED(OReportController, OnClipboardChanged, TransferableDataHelper*, void)
{
OnInvalidateClipboard();
- return 0;
}
void OReportController::OnInvalidateClipboard()
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index c07b2dff7c03..e74c17fca932 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -476,18 +476,14 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
}
}
-IMPL_LINK( ScDrawTextObjectBar, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( ScDrawTextObjectBar, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
+ bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
- SfxBindings& rBindings = pViewData->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ SfxBindings& rBindings = pViewData->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet )
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 59a0868322cf..148b9671c607 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -63,7 +63,7 @@ private:
void ExecuteFillSingleEdit();
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
DECL_LINK( DialogClosed, void* );
RotateTransliteration m_aRotateCase;
diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx
index 16c718c0b32c..aadf7296d433 100644
--- a/sc/source/ui/inc/drtxtob.hxx
+++ b/sc/source/ui/inc/drtxtob.hxx
@@ -38,7 +38,7 @@ class ScDrawTextObjectBar : public SfxShell
TransferableClipboardListener* pClipEvtLstnr;
bool bPastePossible;
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
public:
TYPEINFO_OVERRIDE();
diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx
index 6ac257df8b44..5474ed174db5 100644
--- a/sc/source/ui/inc/editsh.hxx
+++ b/sc/source/ui/inc/editsh.hxx
@@ -46,7 +46,7 @@ private:
const SvxURLField* GetURLField();
ScInputHandler* GetMyInputHdl();
- DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
public:
TYPEINFO_OVERRIDE();
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 7d334bd2d604..ca925e4c6e4b 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -466,21 +466,17 @@ static bool lcl_IsCellPastePossible( const TransferableDataHelper& rData )
return bPossible;
}
-IMPL_LINK( ScCellShell, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( ScCellShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- bPastePossible = lcl_IsCellPastePossible( *pDataHelper );
-
- SfxBindings& rBindings = GetViewData()->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_PASTE_ONLY_VALUE );
- rBindings.Invalidate( SID_PASTE_ONLY_TEXT );
- rBindings.Invalidate( SID_PASTE_ONLY_FORMULA );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ bPastePossible = lcl_IsCellPastePossible( *pDataHelper );
+
+ SfxBindings& rBindings = GetViewData()->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_PASTE_ONLY_VALUE );
+ rBindings.Invalidate( SID_PASTE_ONLY_TEXT );
+ rBindings.Invalidate( SID_PASTE_ONLY_FORMULA );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
namespace {
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 37169ff157c2..846d780649d7 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -758,18 +758,14 @@ const SvxURLField* ScEditShell::GetURLField()
return NULL;
}
-IMPL_LINK( ScEditShell, ClipboardChanged, TransferableDataHelper*, pDataHelper )
+IMPL_LINK_TYPED( ScEditShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
{
- if ( pDataHelper )
- {
- bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
+ bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) );
- SfxBindings& rBindings = pViewData->GetBindings();
- rBindings.Invalidate( SID_PASTE );
- rBindings.Invalidate( SID_PASTE_SPECIAL );
- rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
- }
- return 0;
+ SfxBindings& rBindings = pViewData->GetBindings();
+ rBindings.Invalidate( SID_PASTE );
+ rBindings.Invalidate( SID_PASTE_SPECIAL );
+ rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
}
void ScEditShell::GetClipState( SfxItemSet& rSet )
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 );
}
/**
diff --git a/svtools/source/misc/cliplistener.cxx b/svtools/source/misc/cliplistener.cxx
index 857830c01157..e20a9d2cc2bb 100644
--- a/svtools/source/misc/cliplistener.cxx
+++ b/svtools/source/misc/cliplistener.cxx
@@ -31,7 +31,7 @@ using namespace ::com::sun::star;
-TransferableClipboardListener::TransferableClipboardListener( const Link<>& rCallback ) :
+TransferableClipboardListener::TransferableClipboardListener( const Link<TransferableDataHelper*,void>& rCallback ) :
aLink( rCallback )
{
}
@@ -83,7 +83,7 @@ void TransferableClipboardListener::AddRemoveListener( vcl::Window* pWin, bool b
void TransferableClipboardListener::ClearCallbackLink()
{
- aLink = Link<>();
+ aLink = Link<TransferableDataHelper*,void>();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */