summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-30 10:20:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-30 10:20:00 +0200
commit3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed (patch)
treebdfd28afe5a452060e3d985c5f01b45f4b7bc2cd /vcl
parent57d254d42b6e1d836bd21e6fb2e968af2b511c7d (diff)
Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/idlemgr.hxx4
-rw-r--r--vcl/inc/ilstbox.hxx74
-rw-r--r--vcl/inc/impgraph.hxx4
-rw-r--r--vcl/inc/osx/a11yfocustracker.hxx2
-rw-r--r--vcl/inc/svdata.hxx4
-rw-r--r--vcl/inc/toolbox.h4
-rw-r--r--vcl/source/app/idlemgr.cxx6
-rw-r--r--vcl/source/app/svapp.cxx26
-rw-r--r--vcl/source/app/vclevent.cxx26
-rw-r--r--vcl/source/control/button.cxx2
-rw-r--r--vcl/source/control/ctrl.cxx2
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/edit/textdata.cxx4
-rw-r--r--vcl/source/filter/graphicfilter.cxx4
-rw-r--r--vcl/source/gdi/animate.cxx2
-rw-r--r--vcl/source/gdi/bitmap3.cxx4
-rw-r--r--vcl/source/gdi/bitmap4.cxx18
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
-rw-r--r--vcl/source/gdi/graph.cxx4
-rw-r--r--vcl/source/gdi/impgraph.cxx6
-rw-r--r--vcl/source/gdi/impvect.cxx4
-rw-r--r--vcl/source/gdi/impvect.hxx4
-rw-r--r--vcl/source/gdi/print3.cxx4
-rw-r--r--vcl/source/helper/evntpost.cxx2
-rw-r--r--vcl/source/window/dialog.cxx8
-rw-r--r--vcl/source/window/event.cxx12
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/menu.cxx8
-rw-r--r--vcl/source/window/menubarwindow.cxx4
-rw-r--r--vcl/source/window/menubarwindow.hxx8
-rw-r--r--vcl/source/window/menuwindow.hxx6
-rw-r--r--vcl/source/window/syswin.cxx6
-rw-r--r--vcl/source/window/toolbox2.cxx6
-rw-r--r--vcl/source/window/winproc.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx2
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx6
36 files changed, 144 insertions, 144 deletions
diff --git a/vcl/inc/idlemgr.hxx b/vcl/inc/idlemgr.hxx
index 4e0a6396b8cf..d993e836a535 100644
--- a/vcl/inc/idlemgr.hxx
+++ b/vcl/inc/idlemgr.hxx
@@ -37,8 +37,8 @@ public:
ImplIdleMgr();
~ImplIdleMgr();
- bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority );
- void RemoveIdleHdl( const Link& rLink );
+ bool InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority );
+ void RemoveIdleHdl( const Link<>& rLink );
void RestartIdler()
{ if ( maTimer.IsActive() ) maTimer.Start(); }
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index 4d653054db98..71d86f270257 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -95,7 +95,7 @@ private:
sal_Int32 mnMRUCount;
sal_Int32 mnMaxMRUCount;
- Link maSelectionChangedHdl;
+ Link<> maSelectionChangedHdl;
bool mbCallSelectionChangedHdl;
boost::ptr_vector<ImplEntryType> maEntries;
@@ -154,7 +154,7 @@ public:
void SetSelectionAnchor( sal_Int32 nPos ) { mnSelectionAnchor = nPos; }
sal_Int32 GetSelectionAnchor() const { return mnSelectionAnchor; }
- void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; }
+ void SetSelectionChangedHdl( const Link<>& rLnk ) { maSelectionChangedHdl = rLnk; }
void SetCallSelectionChangedHdl( bool bCall ) { mbCallSelectionChangedHdl = bCall; }
void SetMRUCount( sal_Int32 n ) { mnMRUCount = n; }
@@ -229,13 +229,13 @@ private:
bool mbCenter : 1; ///< center Text output
bool mbEdgeBlending : 1;
- Link maScrollHdl;
- Link maSelectHdl;
- Link maCancelHdl;
- Link maDoubleClickHdl;
- Link maMRUChangedHdl;
- Link maFocusHdl;
- Link maListItemSelectHdl;
+ Link<> maScrollHdl;
+ Link<> maSelectHdl;
+ Link<> maCancelHdl;
+ Link<> maDoubleClickHdl;
+ Link<> maMRUChangedHdl;
+ Link<> maFocusHdl;
+ Link<> maListItemSelectHdl;
vcl::QuickSelectionEngine maQuickSelectionEngine;
@@ -334,23 +334,23 @@ public:
long GetEntryHeight() const { return mnMaxHeight; }
long GetMaxEntryWidth() const { return mnMaxWidth; }
- void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; }
- const Link& GetScrollHdl() const { return maScrollHdl; }
- void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return maSelectHdl; }
- void SetCancelHdl( const Link& rLink ) { maCancelHdl = rLink; }
- const Link& GetCancelHdl() const { return maCancelHdl; }
- void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; }
- const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
- void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; }
- const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; }
- void SetFocusHdl( const Link& rLink ) { maFocusHdl = rLink ; }
- const Link& GetFocusHdl() const { return maFocusHdl; }
+ void SetScrollHdl( const Link<>& rLink ) { maScrollHdl = rLink; }
+ const Link<>& GetScrollHdl() const { return maScrollHdl; }
+ void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; }
+ const Link<>& GetSelectHdl() const { return maSelectHdl; }
+ void SetCancelHdl( const Link<>& rLink ) { maCancelHdl = rLink; }
+ const Link<>& GetCancelHdl() const { return maCancelHdl; }
+ void SetDoubleClickHdl( const Link<>& rLink ) { maDoubleClickHdl = rLink; }
+ const Link<>& GetDoubleClickHdl() const { return maDoubleClickHdl; }
+ void SetMRUChangedHdl( const Link<>& rLink ) { maMRUChangedHdl = rLink; }
+ const Link<>& GetMRUChangedHdl() const { return maMRUChangedHdl; }
+ void SetFocusHdl( const Link<>& rLink ) { maFocusHdl = rLink ; }
+ const Link<>& GetFocusHdl() const { return maFocusHdl; }
boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal;
- void SetListItemSelectHdl( const Link& rLink ) { maListItemSelectHdl = rLink ; }
- const Link& GetListItemSelectHdl() const { return maListItemSelectHdl; }
+ void SetListItemSelectHdl( const Link<>& rLink ) { maListItemSelectHdl = rLink ; }
+ const Link<>& GetListItemSelectHdl() const { return maListItemSelectHdl; }
bool IsSelectionChanged() const { return mbSelectionChanged; }
sal_uInt16 GetSelectModifier() const { return mnSelectModifier; }
@@ -392,7 +392,7 @@ private:
bool mbAutoHScroll : 1; // AutoHScroll an oder aus
bool mbEdgeBlending : 1;
- Link maScrollHdl; // because it is needed by ImplListBoxWindow itself
+ Link<> maScrollHdl; // because it is needed by ImplListBoxWindow itself
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer;
protected:
@@ -471,22 +471,22 @@ public:
long GetEntryHeight() const { return maLBWindow->GetEntryHeight(); }
long GetMaxEntryWidth() const { return maLBWindow->GetMaxEntryWidth(); }
- void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; }
- const Link& GetScrollHdl() const { return maScrollHdl; }
- void SetSelectHdl( const Link& rLink ) { maLBWindow->SetSelectHdl( rLink ); }
- const Link& GetSelectHdl() const { return maLBWindow->GetSelectHdl(); }
- void SetCancelHdl( const Link& rLink ) { maLBWindow->SetCancelHdl( rLink ); }
- const Link& GetCancelHdl() const { return maLBWindow->GetCancelHdl(); }
- void SetDoubleClickHdl( const Link& rLink ) { maLBWindow->SetDoubleClickHdl( rLink ); }
- const Link& GetDoubleClickHdl() const { return maLBWindow->GetDoubleClickHdl(); }
+ void SetScrollHdl( const Link<>& rLink ) { maScrollHdl = rLink; }
+ const Link<>& GetScrollHdl() const { return maScrollHdl; }
+ void SetSelectHdl( const Link<>& rLink ) { maLBWindow->SetSelectHdl( rLink ); }
+ const Link<>& GetSelectHdl() const { return maLBWindow->GetSelectHdl(); }
+ void SetCancelHdl( const Link<>& rLink ) { maLBWindow->SetCancelHdl( rLink ); }
+ const Link<>& GetCancelHdl() const { return maLBWindow->GetCancelHdl(); }
+ void SetDoubleClickHdl( const Link<>& rLink ) { maLBWindow->SetDoubleClickHdl( rLink ); }
+ const Link<>& GetDoubleClickHdl() const { return maLBWindow->GetDoubleClickHdl(); }
boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal;
- void SetFocusHdl( const Link& rLink ) { maLBWindow->SetFocusHdl( rLink ); }
- const Link& GetFocusHdl() const { return maLBWindow->GetFocusHdl(); }
- void SetListItemSelectHdl( const Link& rLink ) { maLBWindow->SetListItemSelectHdl( rLink ); }
- const Link& GetListItemSelectHdl() const { return maLBWindow->GetListItemSelectHdl(); }
- void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow->GetEntryList()->SetSelectionChangedHdl( rLnk ); }
+ void SetFocusHdl( const Link<>& rLink ) { maLBWindow->SetFocusHdl( rLink ); }
+ const Link<>& GetFocusHdl() const { return maLBWindow->GetFocusHdl(); }
+ void SetListItemSelectHdl( const Link<>& rLink ) { maLBWindow->SetListItemSelectHdl( rLink ); }
+ const Link<>& GetListItemSelectHdl() const { return maLBWindow->GetListItemSelectHdl(); }
+ void SetSelectionChangedHdl( const Link<>& rLnk ) { maLBWindow->GetEntryList()->SetSelectionChangedHdl( rLnk ); }
void SetCallSelectionChangedHdl( bool bCall ) { maLBWindow->GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
bool IsSelectionChanged() const { return maLBWindow->IsSelectionChanged(); }
sal_uInt16 GetSelectModifier() const { return maLBWindow->GetSelectModifier(); }
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 29a53c5e01ba..6baed716244b 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -118,8 +118,8 @@ private:
void ImplStopAnimation( OutputDevice* pOutputDevice = NULL,
long nExtraData = 0 );
- void ImplSetAnimationNotifyHdl( const Link& rLink );
- Link ImplGetAnimationNotifyHdl() const;
+ void ImplSetAnimationNotifyHdl( const Link<>& rLink );
+ Link<> ImplGetAnimationNotifyHdl() const;
sal_uLong ImplGetAnimationLoopCount() const;
diff --git a/vcl/inc/osx/a11yfocustracker.hxx b/vcl/inc/osx/a11yfocustracker.hxx
index 6f1efd6946de..2dc3d82baf60 100644
--- a/vcl/inc/osx/a11yfocustracker.hxx
+++ b/vcl/inc/osx/a11yfocustracker.hxx
@@ -87,7 +87,7 @@ private:
std::set<VclPtr<vcl::Window>> m_aDocumentWindowList;
// the link object needed for Application::addEventListener
- Link m_aWindowEventLink;
+ Link<> m_aWindowEventLink;
// the UNO XAccessibilityEventListener for Documents and other non VCL objects
const ::com::sun::star::uno::Reference< DocumentFocusListener > m_xDocumentFocusListener;
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 1b2796ee65a9..932ebe516212 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -340,7 +340,7 @@ struct ImplSVData
std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList;
std::unordered_map< int, OUString >* mpPaperNames;
- Link maDeInitHook;
+ Link<> maDeInitHook;
};
void ImplDeInitSVData();
@@ -399,7 +399,7 @@ struct ImplFocusDelData : public ImplDelData
struct ImplSVEvent
{
void* mpData;
- Link* mpLink;
+ Link<>* mpLink;
VclPtr<vcl::Window> mpWindow;
ImplDelData maDelData;
bool mbCall;
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h
index 61d247bd270b..71e841eb5491 100644
--- a/vcl/inc/toolbox.h
+++ b/vcl/inc/toolbox.h
@@ -129,7 +129,7 @@ struct ImplToolBoxPrivateData
void ImplClearLayoutData() { delete m_pLayoutData; m_pLayoutData = NULL; }
// called when dropdown items are clicked
- Link maDropdownClickHdl;
+ Link<> maDropdownClickHdl;
Timer maDropdownTimer; // for opening dropdown items on "long click"
// large or small buttons ?
@@ -141,7 +141,7 @@ struct ImplToolBoxPrivateData
ImplSVEvent * mnEventId;
// called when menu button is clicked and before the popup menu is executed
- Link maMenuButtonHdl;
+ Link<> maMenuButtonHdl;
// a dummy item representing the custom menu button
ImplToolItem maMenubuttonItem;
diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx
index fbbd14159ec1..5fa5bef1c340 100644
--- a/vcl/source/app/idlemgr.cxx
+++ b/vcl/source/app/idlemgr.cxx
@@ -23,7 +23,7 @@
struct ImplIdleData
{
- Link maIdleHdl;
+ Link<> maIdleHdl;
sal_uInt16 mnPriority;
bool mbTimeout;
};
@@ -52,7 +52,7 @@ ImplIdleMgr::~ImplIdleMgr()
delete mpIdleList;
}
-bool ImplIdleMgr::InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority )
+bool ImplIdleMgr::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority )
{
size_t nPos = (size_t)-1;
size_t n = mpIdleList->size();
@@ -86,7 +86,7 @@ bool ImplIdleMgr::InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority )
return true;
}
-void ImplIdleMgr::RemoveIdleHdl( const Link& rLink )
+void ImplIdleMgr::RemoveIdleHdl( const Link<>& rLink )
{
if (mbInDestruction)
return;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 07cbab812cc9..5a397f430965 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -143,7 +143,7 @@ struct ImplHotKey
ImplHotKey* mpNext;
void* mpUserData;
vcl::KeyCode maKeyCode;
- Link maLink;
+ Link<> maLink;
};
struct ImplEventHook
@@ -641,7 +641,7 @@ void Application::ImplCallEventListeners( VclSimpleEvent* pEvent )
pSVData->maAppData.mpEventListeners->Call( pEvent );
}
-void Application::AddEventListener( const Link& rEventListener )
+void Application::AddEventListener( const Link<>& rEventListener )
{
ImplSVData* pSVData = ImplGetSVData();
if( !pSVData->maAppData.mpEventListeners )
@@ -649,14 +649,14 @@ void Application::AddEventListener( const Link& rEventListener )
pSVData->maAppData.mpEventListeners->addListener( rEventListener );
}
-void Application::RemoveEventListener( const Link& rEventListener )
+void Application::RemoveEventListener( const Link<>& rEventListener )
{
ImplSVData* pSVData = ImplGetSVData();
if( pSVData->maAppData.mpEventListeners )
pSVData->maAppData.mpEventListeners->removeListener( rEventListener );
}
-void Application::AddKeyListener( const Link& rKeyListener )
+void Application::AddKeyListener( const Link<>& rKeyListener )
{
ImplSVData* pSVData = ImplGetSVData();
if( !pSVData->maAppData.mpKeyListeners )
@@ -664,7 +664,7 @@ void Application::AddKeyListener( const Link& rKeyListener )
pSVData->maAppData.mpKeyListeners->addListener( rKeyListener );
}
-void Application::RemoveKeyListener( const Link& rKeyListener )
+void Application::RemoveKeyListener( const Link<>& rKeyListener )
{
ImplSVData* pSVData = ImplGetSVData();
if( pSVData->maAppData.mpKeyListeners )
@@ -897,11 +897,11 @@ void Application::RemoveMouseAndKeyEvents( vcl::Window* pWin )
}
}
-ImplSVEvent * Application::PostUserEvent( const Link& rLink, void* pCaller )
+ImplSVEvent * Application::PostUserEvent( const Link<>& rLink, void* pCaller )
{
ImplSVEvent* pSVEvent = new ImplSVEvent;
pSVEvent->mpData = pCaller;
- pSVEvent->mpLink = new Link( rLink );
+ pSVEvent->mpLink = new Link<>( rLink );
pSVEvent->mpWindow = NULL;
pSVEvent->mbCall = true;
vcl::Window* pDefWindow = ImplGetDefaultWindow();
@@ -934,7 +934,7 @@ void Application::RemoveUserEvent( ImplSVEvent * nUserEvent )
}
}
-bool Application::InsertIdleHdl( const Link& rLink, sal_uInt16 nPrio )
+bool Application::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPrio )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -945,7 +945,7 @@ bool Application::InsertIdleHdl( const Link& rLink, sal_uInt16 nPrio )
return pSVData->maAppData.mpIdleMgr->InsertIdleHdl( rLink, nPrio );
}
-void Application::RemoveIdleHdl( const Link& rLink )
+void Application::RemoveIdleHdl( const Link<>& rLink )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -965,7 +965,7 @@ void Application::DisableNoYieldMode()
pSVData->maAppData.mbNoYield = false;
}
-void Application::AddPostYieldListener( const Link& i_rListener )
+void Application::AddPostYieldListener( const Link<>& i_rListener )
{
ImplSVData* pSVData = ImplGetSVData();
if( ! pSVData->maAppData.mpPostYieldListeners )
@@ -973,7 +973,7 @@ void Application::AddPostYieldListener( const Link& i_rListener )
pSVData->maAppData.mpPostYieldListeners->addListener( i_rListener );
}
-void Application::RemovePostYieldListener( const Link& i_rListener )
+void Application::RemovePostYieldListener( const Link<>& i_rListener )
{
ImplSVData* pSVData = ImplGetSVData();
if( pSVData->maAppData.mpPostYieldListeners )
@@ -1416,7 +1416,7 @@ void Application::SetUnoWrapper( UnoWrapperBase* pWrapper )
return pSVData->mxDisplayConnection.get();
}
-void Application::SetFilterHdl( const Link& rLink )
+void Application::SetFilterHdl( const Link<>& rLink )
{
ImplGetSVData()->maGDIData.mpGrfConverter->SetFilterHdl( rLink );
}
@@ -1620,7 +1620,7 @@ Application::createFolderPicker( const Reference< uno::XComponentContext >& xSM
return pSVData->mpDefInst->createFolderPicker( xSM );
}
-void Application::setDeInitHook(Link const & hook) {
+void Application::setDeInitHook(Link<> const & hook) {
ImplSVData * pSVData = ImplGetSVData();
assert(!pSVData->maDeInitHook.IsSet());
pSVData->maDeInitHook = hook;
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 325c9b659b18..00c4ffd525e2 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -48,16 +48,16 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const
return;
// Copy the list, because this can be destroyed when calling a Link...
- std::list<Link> aCopy( m_aListeners );
- std::list<Link>::iterator aIter( aCopy.begin() );
- std::list<Link>::const_iterator aEnd( aCopy.end() );
+ std::list<Link<>> aCopy( m_aListeners );
+ std::list<Link<>>::iterator aIter( aCopy.begin() );
+ std::list<Link<>>::const_iterator aEnd( aCopy.end() );
if( pEvent->IsA( VclWindowEvent::StaticType() ) )
{
VclWindowEvent* pWinEvent = static_cast<VclWindowEvent*>(pEvent);
ImplDelData aDel( pWinEvent->GetWindow() );
while ( aIter != aEnd && ! aDel.IsDead() )
{
- Link &rLink = *aIter;
+ Link<> &rLink = *aIter;
// check this hasn't been removed in some re-enterancy scenario fdo#47368
if( std::find(m_aListeners.begin(), m_aListeners.end(), rLink) != m_aListeners.end() )
rLink.Call( pEvent );
@@ -68,7 +68,7 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const
{
while ( aIter != aEnd )
{
- Link &rLink = *aIter;
+ Link<> &rLink = *aIter;
if( std::find(m_aListeners.begin(), m_aListeners.end(), rLink) != m_aListeners.end() )
rLink.Call( pEvent );
++aIter;
@@ -83,9 +83,9 @@ bool VclEventListeners::Process( VclSimpleEvent* pEvent ) const
bool bProcessed = false;
// Copy the list, because this can be destroyed when calling a Link...
- std::list<Link> aCopy( m_aListeners );
- std::list<Link>::iterator aIter( aCopy.begin() );
- std::list<Link>::const_iterator aEnd( aCopy.end() );
+ std::list<Link<>> aCopy( m_aListeners );
+ std::list<Link<>>::iterator aIter( aCopy.begin() );
+ std::list<Link<>>::const_iterator aEnd( aCopy.end() );
while ( aIter != aEnd )
{
if( (*aIter).Call( pEvent ) != 0 )
@@ -98,12 +98,12 @@ bool VclEventListeners::Process( VclSimpleEvent* pEvent ) const
return bProcessed;
}
-void VclEventListeners::addListener( const Link& rListener )
+void VclEventListeners::addListener( const Link<>& rListener )
{
m_aListeners.push_back( rListener );
}
-void VclEventListeners::removeListener( const Link& rListener )
+void VclEventListeners::removeListener( const Link<>& rListener )
{
m_aListeners.remove( rListener );
}
@@ -116,10 +116,10 @@ VclEventListeners2::~VclEventListeners2()
{
}
-void VclEventListeners2::addListener( const Link& i_rLink )
+void VclEventListeners2::addListener( const Link<>& i_rLink )
{
// ensure uniqueness
- for( std::list< Link >::const_iterator it = m_aListeners.begin(); it != m_aListeners.end(); ++it )
+ for( std::list< Link<> >::const_iterator it = m_aListeners.begin(); it != m_aListeners.end(); ++it )
{
if( *it == i_rLink )
return;
@@ -127,7 +127,7 @@ void VclEventListeners2::addListener( const Link& i_rLink )
m_aListeners.push_back( i_rLink );
}
-void VclEventListeners2::removeListener( const Link& i_rLink )
+void VclEventListeners2::removeListener( const Link<>& i_rLink )
{
size_t n = m_aIterators.size();
for( size_t i = 0; i < n; i++ )
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 3128f11cd554..ef0c8c310685 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -106,7 +106,7 @@ void Button::dispose()
void Button::SetCommandHandler(const OUString& aCommand)
{
maCommand = aCommand;
- SetClickHdl(Link(NULL, dispatchCommandHandler));
+ SetClickHdl(Link<>(NULL, dispatchCommandHandler));
}
void Button::Click()
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 79c6933614cf..e57c296a991c 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -321,7 +321,7 @@ void Control::AppendLayoutData( const Control& rSubControl ) const
}
}
-bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link& rHandler, void* pCaller )
+bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link<>& rHandler, void* pCaller )
{
ImplDelData aCheckDelete;
ImplAddDel( &aCheckDelete );
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 1f6830b72a3f..fbbcad1e6160 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2151,7 +2151,7 @@ ImplListBox::ImplListBox( vcl::Window* pParent, WinBits nWinStyle ) :
mpHScrollBar = VclPtr<ScrollBar>::Create( this, WB_HSCROLL | WB_DRAG );
mpScrollBarBox = VclPtr<ScrollBarBox>::Create( this );
- Link aLink( LINK( this, ImplListBox, ScrollBarHdl ) );
+ Link<> aLink( LINK( this, ImplListBox, ScrollBarHdl ) );
mpVScrollBar->SetScrollHdl( aLink );
mpHScrollBar->SetScrollHdl( aLink );
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 3e1df3ee6937..d1f36aaf1989 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -241,7 +241,7 @@ void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts )
if ( mnRestarts > nMaxRestarts )
{
mnRestarts = 0;
- ((Link&)GetIdleHdl()).Call( this );
+ ((Link<>&)GetIdleHdl()).Call( this );
}
else
{
@@ -255,7 +255,7 @@ void IdleFormatter::ForceTimeout()
{
Stop();
mnRestarts = 0;
- ((Link&)GetIdleHdl()).Call( this );
+ ((Link<>&)GetIdleHdl()).Call( this );
}
}
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 961679796fc7..6886843ebc1f 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -2171,9 +2171,9 @@ void GraphicFilter::ResetLastError()
pErrorEx->nFilterError = pErrorEx->nStreamError = 0UL;
}
-const Link GraphicFilter::GetFilterCallback() const
+const Link<> GraphicFilter::GetFilterCallback() const
{
- const Link aLink( LINK( const_cast<GraphicFilter*>(this), GraphicFilter, FilterCallback ) );
+ const Link<> aLink( LINK( const_cast<GraphicFilter*>(this), GraphicFilter, FilterCallback ) );
return aLink;
}
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 4ab246f0d713..e0ce99a20959 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -669,7 +669,7 @@ bool Animation::Adjust( short nLuminancePercent, short nContrastPercent,
return bRet;
}
-bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link<>* pProgress )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index d3d6db4deca4..9451b160969e 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -2445,12 +2445,12 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal,
}
}
-bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress )
+bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link<>* pProgress )
{
return ImplVectorizer::ImplVectorize( *this, rPolyPoly, nFlags, pProgress );
}
-bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress )
+bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link<>* pProgress )
{
return ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress );
}
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index 8790b2baf58b..42ac92d0b859 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -38,7 +38,7 @@ static inline sal_uInt8 lcl_getDuotoneColorComponent( sal_uInt8 base, sal_uInt16
return (sal_uInt8) (color1+color2);
}
-bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link<>* pProgress )
{
bool bRet = false;
@@ -111,7 +111,7 @@ bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, cons
}
bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
- const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+ const BmpFilterParam* /*pFilterParam*/, const Link<>* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
bool bRet = false;
@@ -256,7 +256,7 @@ bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
return bRet;
}
-bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link<>* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
bool bRet = false;
@@ -385,7 +385,7 @@ bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
return bRet;
}
-bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link<>* /*pProgress*/ )
{
bool bRet = ImplMakeGreyscales( 256 );
@@ -511,7 +511,7 @@ bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
return bRet;
}
-bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link<>* /*pProgress*/ )
{
bool bRet = ImplMakeGreyscales( 256 );
@@ -623,7 +623,7 @@ bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
return bRet;
}
-bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link<>* /*pProgress*/ )
{
bool bRet = false;
BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
@@ -671,7 +671,7 @@ bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
return bRet;
}
-bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link<>* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
bool bRet = false;
@@ -756,7 +756,7 @@ bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
return bRet;
}
-bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link<>* /*pProgress*/ )
{
sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
@@ -941,7 +941,7 @@ extern "C" int SAL_CALL ImplPopArtCmpFnc( const void* p1, const void* p2 )
return nRet;
}
-bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link<>* /*pProgress*/ )
{
bool bRet = ( GetBitCount() <= 8 ) || Convert( BMP_CONVERSION_8BIT_COLORS );
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 80cb6f832b29..41f1e9254d4d 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -649,7 +649,7 @@ bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent,
fGamma, bInvert, msoBrightness );
}
-bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link<>* pProgress )
{
return !!aBitmap && aBitmap.Filter( eFilter, pFilterParam, pProgress );
}
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 80522e76ecdb..40bd87c8ffca 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -476,12 +476,12 @@ void Graphic::StopAnimation( OutputDevice* pOutDev, long nExtraData )
mpImpGraphic->ImplStopAnimation( pOutDev, nExtraData );
}
-void Graphic::SetAnimationNotifyHdl( const Link& rLink )
+void Graphic::SetAnimationNotifyHdl( const Link<>& rLink )
{
mpImpGraphic->ImplSetAnimationNotifyHdl( rLink );
}
-Link Graphic::GetAnimationNotifyHdl() const
+Link<> Graphic::GetAnimationNotifyHdl() const
{
return mpImpGraphic->ImplGetAnimationNotifyHdl();
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 0aace4e88651..58bb314a1a10 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -914,15 +914,15 @@ void ImpGraphic::ImplStopAnimation( OutputDevice* pOutDev, long nExtraData )
mpAnimation->Stop( pOutDev, nExtraData );
}
-void ImpGraphic::ImplSetAnimationNotifyHdl( const Link& rLink )
+void ImpGraphic::ImplSetAnimationNotifyHdl( const Link<>& rLink )
{
if( mpAnimation )
mpAnimation->SetNotifyHdl( rLink );
}
-Link ImpGraphic::ImplGetAnimationNotifyHdl() const
+Link<> ImpGraphic::ImplGetAnimationNotifyHdl() const
{
- Link aLink;
+ Link<> aLink;
if( mpAnimation )
aLink = mpAnimation->GetNotifyHdl();
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index bdb5f3114eeb..fb640216d483 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -634,7 +634,7 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
namespace ImplVectorizer {
bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress )
+ sal_uInt8 cReduce, sal_uLong nFlags, const Link<>* pProgress )
{
bool bRet = false;
@@ -737,7 +737,7 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
bool ImplVectorize( const Bitmap& rMonoBmp,
tools::PolyPolygon& rPolyPoly,
- sal_uLong nFlags, const Link* pProgress )
+ sal_uLong nFlags, const Link<>* pProgress )
{
std::unique_ptr<Bitmap> xBmp(new Bitmap( rMonoBmp ));
BitmapReadAccess* pRAcc;
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index 4e1ec38b7b17..c2e7a48b7e43 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -27,9 +27,9 @@
namespace ImplVectorizer
{
bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress );
+ sal_uInt8 cReduce, sal_uLong nFlags, const Link<>* pProgress );
bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly,
- sal_uLong nFlags, const Link* pProgress );
+ sal_uLong nFlags, const Link<>* pProgress );
};
#endif
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index bf5c5eef4ae8..6b181b6155a9 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -145,7 +145,7 @@ public:
std::vector< PropertyValue > maUIProperties;
std::vector< bool > maUIPropertyEnabled;
PropertyToIndexMap maPropertyToIndex;
- Link maOptionChangeHdl;
+ Link<> maOptionChangeHdl;
ControlDependencyMap maControlDependencies;
ChoiceDisableMap maChoiceDisableMap;
bool mbFirstPage;
@@ -1635,7 +1635,7 @@ OUString PrinterController::makeEnabled( const OUString& i_rProperty )
return aDependency;
}
-void PrinterController::setOptionChangeHdl( const Link& i_rHdl )
+void PrinterController::setOptionChangeHdl( const Link<>& i_rHdl )
{
mpImplData->maOptionChangeHdl = i_rHdl;
}
diff --git a/vcl/source/helper/evntpost.cxx b/vcl/source/helper/evntpost.cxx
index 06ba4a37390d..d278e9aa71b0 100644
--- a/vcl/source/helper/evntpost.cxx
+++ b/vcl/source/helper/evntpost.cxx
@@ -26,7 +26,7 @@
namespace vcl
{
-EventPoster::EventPoster( const Link& rLink )
+EventPoster::EventPoster( const Link<>& rLink )
: m_aLink(rLink)
{
m_nId = 0;
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 9e6d4bf12dae..3381ef6f5991 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -334,7 +334,7 @@ struct DialogImpl
{
long mnResult;
bool mbStartedModal;
- Link maEndDialogHdl;
+ Link<> maEndDialogHdl;
DialogImpl() : mnResult( -1 ), mbStartedModal( false ) {}
};
@@ -864,7 +864,7 @@ short Dialog::Execute()
}
// virtual
-void Dialog::StartExecuteModal( const Link& rEndDialogHdl )
+void Dialog::StartExecuteModal( const Link<>& rEndDialogHdl )
{
if ( !ImplStartExecuteModal() )
return;
@@ -921,7 +921,7 @@ void Dialog::EndDialog( long nResult )
ImplEndExecuteModal();
mpDialogImpl->maEndDialogHdl.Call( this );
- mpDialogImpl->maEndDialogHdl = Link();
+ mpDialogImpl->maEndDialogHdl = Link<>();
mpDialogImpl->mbStartedModal = false;
mpDialogImpl->mnResult = -1;
}
@@ -945,7 +945,7 @@ void Dialog::EndAllDialogs( vcl::Window* pParent )
if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, true ) ) )
{
pModDialog->EndDialog( RET_CANCEL );
- pModDialog->PostUserEvent( Link() );
+ pModDialog->PostUserEvent( Link<>() );
}
pModDialog = pTempModDialog;
}
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 9c954125779d..bd2b36d39c39 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -243,31 +243,31 @@ void Window::FireVclEvent( VclSimpleEvent* pEvent )
Application::ImplCallEventListeners(pEvent);
}
-void Window::AddEventListener( const Link& rEventListener )
+void Window::AddEventListener( const Link<>& rEventListener )
{
mpWindowImpl->maEventListeners.addListener( rEventListener );
}
-void Window::RemoveEventListener( const Link& rEventListener )
+void Window::RemoveEventListener( const Link<>& rEventListener )
{
mpWindowImpl->maEventListeners.removeListener( rEventListener );
}
-void Window::AddChildEventListener( const Link& rEventListener )
+void Window::AddChildEventListener( const Link<>& rEventListener )
{
mpWindowImpl->maChildEventListeners.addListener( rEventListener );
}
-void Window::RemoveChildEventListener( const Link& rEventListener )
+void Window::RemoveChildEventListener( const Link<>& rEventListener )
{
mpWindowImpl->maChildEventListeners.removeListener( rEventListener );
}
-ImplSVEvent * Window::PostUserEvent( const Link& rLink, void* pCaller )
+ImplSVEvent * Window::PostUserEvent( const Link<>& rLink, void* pCaller )
{
ImplSVEvent* pSVEvent = new ImplSVEvent;
pSVEvent->mpData = pCaller;
- pSVEvent->mpLink = new Link( rLink );
+ pSVEvent->mpLink = new Link<>( rLink );
pSVEvent->mpWindow = this;
pSVEvent->mbCall = true;
ImplAddDel( &(pSVEvent->maDelData) );
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index c9a43087cdf7..3bfa40a049d9 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1633,7 +1633,7 @@ VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent, WinBits nStyle)
{
SetType(WINDOW_SCROLLWINDOW);
- Link aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) );
+ Link<> aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) );
m_pVScroll->SetScrollHdl(aLink);
m_pHScroll->SetScrollHdl(aLink);
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index e972321a7f53..a70a3d0c1a17 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -353,12 +353,12 @@ void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos )
}
}
-void Menu::AddEventListener( const Link& rEventListener )
+void Menu::AddEventListener( const Link<>& rEventListener )
{
maEventListeners.addListener( rEventListener );
}
-void Menu::RemoveEventListener( const Link& rEventListener )
+void Menu::RemoveEventListener( const Link<>& rEventListener )
{
maEventListeners.removeListener( rEventListener );
}
@@ -2648,13 +2648,13 @@ bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId )
return false;
}
-sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const OUString& i_rToolTip, sal_uInt16 i_nPos )
+sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link<>& i_rLink, const OUString& i_rToolTip, sal_uInt16 i_nPos )
{
IMenuBarWindow* pMenuWin = getMenuBarWindow();
return pMenuWin ? pMenuWin->AddMenuBarButton(i_rImage, i_rLink, i_rToolTip, i_nPos) : 0;
}
-void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& rLink )
+void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& rLink )
{
IMenuBarWindow* pMenuWin = getMenuBarWindow();
if (!pMenuWin)
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index ef83cacb83da..83754722d925 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -1080,7 +1080,7 @@ void MenuBarWindow::GetFocus()
return xAcc;
}
-sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const OUString& i_rToolTip, sal_uInt16 i_nPos )
+sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<>& i_rLink, const OUString& i_rToolTip, sal_uInt16 i_nPos )
{
// find first free button id
sal_uInt16 nId = IID_DOCUMENTCLOSE;
@@ -1107,7 +1107,7 @@ sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i
return nId;
}
-void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& rLink )
+void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& rLink )
{
std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( nId );
if( it != m_aAddButtons.end() )
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index 348d167e6469..3f10c6303954 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -66,8 +66,8 @@ private:
struct AddButtonEntry
{
sal_uInt16 m_nId;
- Link m_aSelectLink;
- Link m_aHighlightLink;
+ Link<> m_aSelectLink;
+ Link<> m_aHighlightLink;
AddButtonEntry() : m_nId( 0 ) {}
};
@@ -138,8 +138,8 @@ public:
Size MinCloseButtonSize();
/// Add an arbitrary button to the menubar that will appear next to the close button.
- virtual sal_uInt16 AddMenuBarButton(const Image&, const Link&, const OUString&, sal_uInt16 nPos) SAL_OVERRIDE;
- virtual void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link&) SAL_OVERRIDE;
+ virtual sal_uInt16 AddMenuBarButton(const Image&, const Link<>&, const OUString&, sal_uInt16 nPos) SAL_OVERRIDE;
+ virtual void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<>&) SAL_OVERRIDE;
virtual Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId) SAL_OVERRIDE;
virtual void RemoveMenuBarButton(sal_uInt16 nId) SAL_OVERRIDE;
virtual bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId) SAL_OVERRIDE;
diff --git a/vcl/source/window/menuwindow.hxx b/vcl/source/window/menuwindow.hxx
index 391bc08e3625..16d2b8870ea2 100644
--- a/vcl/source/window/menuwindow.hxx
+++ b/vcl/source/window/menuwindow.hxx
@@ -21,12 +21,12 @@
#define INCLUDED_VCL_SOURCE_WINDOW_MENUWINDOW_HXX
#include <sal/types.h>
+#include <tools/link.hxx>
#include <tools/solar.h>
#include <vcl/event.hxx>
class HelpEvent;
class Image;
-class Link;
class Menu;
class MenuBar;
class Rectangle;
@@ -84,8 +84,8 @@ public:
virtual void KillActivePopup() = 0;
/// Add an arbitrary button to the menubar that will appear next to the close button.
- virtual sal_uInt16 AddMenuBarButton(const Image&, const Link&, const OUString&, sal_uInt16 nPos) = 0;
- virtual void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link&) = 0;
+ virtual sal_uInt16 AddMenuBarButton(const Image&, const Link<>&, const OUString&, sal_uInt16 nPos) = 0;
+ virtual void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<>&) = 0;
virtual Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId) = 0;
virtual void RemoveMenuBarButton(sal_uInt16 nId) = 0;
virtual bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId) = 0;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 99ac9bcb4fa4..13028b927695 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -51,7 +51,7 @@ public:
TaskPaneList* mpTaskPaneList;
Size maMaxOutSize;
OUString maRepresentedURL;
- Link maCloseHdl;
+ Link<> maCloseHdl;
};
SystemWindow::ImplData::ImplData()
@@ -992,12 +992,12 @@ void SystemWindow::SetApplicationID(const OUString &rApplicationID)
mpWindowImpl->mpFrame->SetApplicationID( rApplicationID );
}
-void SystemWindow::SetCloseHdl(const Link& rLink)
+void SystemWindow::SetCloseHdl(const Link<>& rLink)
{
mpImplData->maCloseHdl = rLink;
}
-const Link& SystemWindow::GetCloseHdl() const
+const Link<>& SystemWindow::GetCloseHdl() const
{
return mpImplData->maCloseHdl;
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 481122834fc5..a743f6c1b31f 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1717,12 +1717,12 @@ long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
return nIndex;
}
-void ToolBox::SetDropdownClickHdl( const Link& rLink )
+void ToolBox::SetDropdownClickHdl( const Link<>& rLink )
{
mpData->maDropdownClickHdl = rLink;
}
-const Link& ToolBox::GetDropdownClickHdl() const
+const Link<>& ToolBox::GetDropdownClickHdl() const
{
return mpData->maDropdownClickHdl;
}
@@ -1767,7 +1767,7 @@ PopupMenu* ToolBox::GetMenu() const
return mpData->mpMenu;
}
-void ToolBox::SetMenuButtonHdl( const Link& rLink )
+void ToolBox::SetMenuButtonHdl( const Link<>& rLink )
{
mpData->maMenuButtonHdl = rLink;
}
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index ce4edf81670b..6cccd1879333 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -815,7 +815,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
pEv->pWindow = pChild;
pEv->aChildPos = aChildPos;
pChild->ImplAddDel( &pEv->aDelData );
- Application::PostUserEvent( Link( pEv, ContextMenuEventLink ) );
+ Application::PostUserEvent( Link<>( pEv, ContextMenuEventLink ) );
}
else
bRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, true, &aChildPos );
@@ -1996,7 +1996,7 @@ void ImplHandleClose( vcl::Window* pWindow )
if (pSysWin)
{
// See if the custom close handler is set.
- const Link& rLink = pSysWin->GetCloseHdl();
+ const Link<>& rLink = pSysWin->GetCloseHdl();
if (rLink.IsSet())
{
rLink.Call(pSysWin);
@@ -2010,7 +2010,7 @@ void ImplHandleClose( vcl::Window* pWindow )
DelayedCloseEvent* pEv = new DelayedCloseEvent;
pEv->pWindow = pWin;
pWin->ImplAddDel( &pEv->aDelData );
- Application::PostUserEvent( Link( pEv, DelayedCloseEventLink ) );
+ Application::PostUserEvent( Link<>( pEv, DelayedCloseEventLink ) );
}
}
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index d95f700809c8..03f08e4f30c6 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -676,7 +676,7 @@ sal_IntPtr WindowEventHandler(void *, void * p)
return 0;
}
-static Link g_aEventListenerLink( NULL, WindowEventHandler );
+static Link<> g_aEventListenerLink( NULL, WindowEventHandler );
/*****************************************************************************/
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 97727a727d54..73ca34b6ce69 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -483,11 +483,11 @@ static long RefreshMenusUnity(void*, void*)
return 0;
}
-static Link* getRefreshLinkInstance()
+static Link<>* getRefreshLinkInstance()
{
- static Link* pLink = NULL;
+ static Link<>* pLink = NULL;
if(!pLink) {
- pLink = new Link(NULL, &RefreshMenusUnity);
+ pLink = new Link<>(NULL, &RefreshMenusUnity);
}
return pLink;
}