summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-27 13:08:02 +0200
committerNoel Grandin <noel@peralex.com>2015-08-28 09:49:56 +0200
commitbd8b93fdff93ff7b2b7e493a7bcef6a59f299dae (patch)
treef05be9665737f0667faf95702d96fbf3f0a103c5 /svtools/source
parent1b9c3a17e8496aedfb80528c5275e6658154789d (diff)
make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx10
-rw-r--r--svtools/source/contnr/fileview.cxx8
-rw-r--r--svtools/source/contnr/imivctl.hxx4
-rw-r--r--svtools/source/contnr/imivctl1.cxx3
-rw-r--r--svtools/source/contnr/svimpbox.cxx3
-rw-r--r--svtools/source/control/asynclink.cxx3
-rw-r--r--svtools/source/control/tabbar.cxx6
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx4
-rw-r--r--svtools/source/hatchwindow/documentcloser.cxx7
-rw-r--r--svtools/source/inc/svimpbox.hxx2
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx3
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx2
-rw-r--r--svtools/source/uno/contextmenuhelper.cxx4
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx4
-rw-r--r--svtools/source/uno/popupmenucontrollerbase.cxx4
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx4
16 files changed, 29 insertions, 42 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 569606e45ffd..d64b3b850394 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -252,7 +252,7 @@ namespace svt
}
- IMPL_LINK_NOARG(EditBrowseBox, StartEditHdl)
+ IMPL_LINK_NOARG_TYPED(EditBrowseBox, StartEditHdl, void*, void)
{
nStartEvent = 0;
if (IsEditing())
@@ -261,7 +261,6 @@ namespace svt
if (!aController->GetWindow().HasFocus() && (m_pFocusWhileRequest.get() == Application::GetFocusWindow()))
aController->GetWindow().GrabFocus();
}
- return 0;
}
@@ -1079,15 +1078,13 @@ namespace svt
}
- IMPL_LINK_NOARG(EditBrowseBox, EndEditHdl)
+ IMPL_LINK_NOARG_TYPED(EditBrowseBox, EndEditHdl, void*, void)
{
nEndEvent = 0;
aOldController = CellControllerRef();
nOldEditRow = -1;
nOldEditCol = 0;
-
- return 0;
}
@@ -1100,11 +1097,10 @@ namespace svt
}
- IMPL_LINK_NOARG(EditBrowseBox, CellModifiedHdl)
+ IMPL_LINK_NOARG_TYPED(EditBrowseBox, CellModifiedHdl, void*, void)
{
nCellModifiedEvent = 0;
CellModified();
- return 0;
}
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 564235822c45..3c3f6d94e5ce 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -341,7 +341,7 @@ protected:
::rtl::Reference< ::svt::FileViewContentEnumerator >
m_xContentEnumerator;
- Link<> m_aCurrentAsyncActionHandler;
+ Link<void*,void> m_aCurrentAsyncActionHandler;
::osl::Condition m_aAsyncActionFinished;
::rtl::Reference< ::salhelper::Timer > m_xCancelAsyncTimer;
::svt::EnumerationResult m_eAsyncActionResult;
@@ -1597,7 +1597,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
// don't (yet) set m_aCurrentAsyncActionHandler to pTimeout->aFinishHandler.
// By definition, this handler *only* get's called when the result cannot be obtained
// during the minimum wait time, so it is only set below, when needed.
- m_aCurrentAsyncActionHandler = Link<>();
+ m_aCurrentAsyncActionHandler = Link<void*,void>();
// minimum time to wait
boost::scoped_ptr< TimeValue > pTimeout( new TimeValue );
@@ -1856,7 +1856,7 @@ void SvtFileView_Impl::onTimeout( CallbackTimer* )
if ( m_aCurrentAsyncActionHandler.IsSet() )
{
Application::PostUserEvent( m_aCurrentAsyncActionHandler, reinterpret_cast< void* >( eTimeout ) );
- m_aCurrentAsyncActionHandler = Link<>();
+ m_aCurrentAsyncActionHandler = Link<void*,void>();
}
}
@@ -1886,7 +1886,7 @@ void SvtFileView_Impl::enumerationDone( ::svt::EnumerationResult eResult )
if ( m_aCurrentAsyncActionHandler.IsSet() )
{
Application::PostUserEvent( m_aCurrentAsyncActionHandler, reinterpret_cast< void* >( m_eAsyncActionResult ) );
- m_aCurrentAsyncActionHandler = Link<>();
+ m_aCurrentAsyncActionHandler = Link<void*,void>();
}
}
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index d806740c53b1..cc777f3e112c 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -226,8 +226,8 @@ class SvxIconChoiceCtrl_Impl
DECL_LINK( ScrollUpDownHdl, ScrollBar * );
DECL_LINK( ScrollLeftRightHdl, ScrollBar * );
- DECL_LINK_TYPED(EditTimeoutHdl, Idle *, void);
- DECL_LINK( UserEventHdl, void* );
+ DECL_LINK_TYPED( EditTimeoutHdl, Idle *, void);
+ DECL_LINK_TYPED( UserEventHdl, void*, void );
DECL_LINK_TYPED( AutoArrangeHdl, Idle*, void );
DECL_LINK_TYPED( DocRectChangedHdl, Idle*, void );
DECL_LINK_TYPED( VisRectChangedHdl, Idle*, void );
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 9d1f2a54a484..0a115d96c5e1 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2963,7 +2963,7 @@ bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos
-IMPL_LINK(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId )
+IMPL_LINK_TYPED(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId, void )
{
if( nId == EVENTID_ADJUST_SCROLLBARS )
{
@@ -2975,7 +2975,6 @@ IMPL_LINK(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId )
nUserEventShowCursor = 0;
ShowCursor( true );
}
- return 0;
}
void SvxIconChoiceCtrl_Impl::CancelUserEvents()
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 211fec12088f..5206c1bdb70d 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -3341,7 +3341,7 @@ bool SvImpLBox::IsNowExpandable() const
return IsExpandable() && !pView->IsExpanded( pCursor );
}
-IMPL_LINK(SvImpLBox, MyUserEvent, void*, pArg )
+IMPL_LINK_TYPED(SvImpLBox, MyUserEvent, void*, pArg, void )
{
nCurUserEvent = 0;
if( !pArg )
@@ -3355,7 +3355,6 @@ IMPL_LINK(SvImpLBox, MyUserEvent, void*, pArg )
ShowVerSBar();
pView->Invalidate( GetVisibleArea() );
}
- return 0;
}
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx
index 6c079e0fc71c..5b4d6a9936ac 100644
--- a/svtools/source/control/asynclink.cxx
+++ b/svtools/source/control/asynclink.cxx
@@ -85,10 +85,9 @@ IMPL_LINK_NOARG_TYPED( AsynchronLink, HandleCall_Idle, Idle*, void )
Call_Impl( _pArg );
}
-IMPL_LINK_NOARG( AsynchronLink, HandleCall_PostUserEvent )
+IMPL_LINK_NOARG_TYPED( AsynchronLink, HandleCall_PostUserEvent, void*, void )
{
HandleCall_Idle(nullptr);
- return 0;
}
void AsynchronLink::ClearPendingCall()
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 6cb9fe4919ef..68637b63f84d 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -395,7 +395,7 @@ private:
Idle maLoseFocusIdle;
bool mbPostEvt;
- DECL_LINK( ImplEndEditHdl, void* );
+ DECL_LINK_TYPED( ImplEndEditHdl, void*, void );
DECL_LINK_TYPED( ImplEndTimerHdl, Idle*, void );
public:
@@ -458,7 +458,7 @@ void TabBarEdit::LoseFocus()
Edit::LoseFocus();
}
-IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel )
+IMPL_LINK_TYPED( TabBarEdit, ImplEndEditHdl, void*, pCancel, void )
{
ResetPostEvent();
maLoseFocusIdle.Stop();
@@ -473,8 +473,6 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel )
}
else
GetParent()->EndEditMode( pCancel != 0 );
-
- return 0;
}
IMPL_LINK_NOARG_TYPED(TabBarEdit, ImplEndTimerHdl, Idle *, void)
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 041c198e619a..539d33703eef 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -1109,7 +1109,7 @@ void AssignmentPersistentData::ImplCommit()
}
- IMPL_LINK_NOARG(AddressBookSourceDialog, OnDelayedInitialize)
+ IMPL_LINK_NOARG_TYPED(AddressBookSourceDialog, OnDelayedInitialize, void*, void)
{
// load the initial data from the configuration
loadConfiguration();
@@ -1119,8 +1119,6 @@ void AssignmentPersistentData::ImplCommit()
if ( !m_pImpl->bWorkingPersistent )
if ( m_pImpl->pFields[0] )
m_pImpl->pFields[0]->GrabFocus();
-
- return 0L;
}
diff --git a/svtools/source/hatchwindow/documentcloser.cxx b/svtools/source/hatchwindow/documentcloser.cxx
index e7260aba093b..2629362905d4 100644
--- a/svtools/source/hatchwindow/documentcloser.cxx
+++ b/svtools/source/hatchwindow/documentcloser.cxx
@@ -77,7 +77,7 @@ class MainThreadFrameCloserRequest
: m_xFrame( xFrame )
{}
- DECL_STATIC_LINK( MainThreadFrameCloserRequest, worker, MainThreadFrameCloserRequest* );
+ DECL_STATIC_LINK_TYPED( MainThreadFrameCloserRequest, worker, void*, void );
static void Start( MainThreadFrameCloserRequest* pRequest );
};
@@ -98,8 +98,9 @@ void MainThreadFrameCloserRequest::Start( MainThreadFrameCloserRequest* pMTReque
}
-IMPL_STATIC_LINK( MainThreadFrameCloserRequest, worker, MainThreadFrameCloserRequest*, pMTRequest )
+IMPL_STATIC_LINK_TYPED( MainThreadFrameCloserRequest, worker, void*, p, void )
{
+ MainThreadFrameCloserRequest* pMTRequest = static_cast<MainThreadFrameCloserRequest*>(p);
if ( pMTRequest )
{
if ( pMTRequest->m_xFrame.is() )
@@ -140,8 +141,6 @@ IMPL_STATIC_LINK( MainThreadFrameCloserRequest, worker, MainThreadFrameCloserReq
delete pMTRequest;
}
-
- return 0;
}
ODocumentCloser::ODocumentCloser(const css::uno::Sequence< css::uno::Any >& aArguments)
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index ec8b19e7f1aa..72a75379d7fc 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -164,7 +164,7 @@ private:
DECL_LINK_TYPED(EditTimerCall, Idle *, void);
DECL_LINK_TYPED( BeginDragHdl, Idle*, void );
- DECL_LINK( MyUserEvent,void*);
+ DECL_LINK_TYPED( MyUserEvent, void*, void);
void StopUserEvent();
void InvalidateEntriesFrom( long nY ) const;
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index dc6b43f6eaab..a6491b64613e 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2386,12 +2386,11 @@ namespace svt { namespace table
}
- IMPL_LINK_NOARG( TableControl_Impl, OnUpdateScrollbars )
+ IMPL_LINK_NOARG_TYPED( TableControl_Impl, OnUpdateScrollbars, void*, void )
{
// TODO: can't we simply use lcl_updateScrollbar here, so the scrollbars ranges are updated, instead of
// doing a complete re-layout?
impl_ni_relayout();
- return 1L;
}
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 478f611ba5ea..574042a8ca87 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -459,7 +459,7 @@ namespace svt { namespace table
void impl_invalidateColumn( ColPos const i_column );
DECL_LINK( OnScroll, ScrollBar* );
- DECL_LINK( OnUpdateScrollbars, void* );
+ DECL_LINK_TYPED( OnUpdateScrollbars, void*, void );
};
//see seleng.hxx, seleng.cxx, FunctionSet overridables, part of selection engine
diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index 87c1f41b9581..dc9ecf6af369 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -609,8 +609,9 @@ ContextMenuHelper::completeMenuProperties(
}
-IMPL_STATIC_LINK( ContextMenuHelper, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo )
+IMPL_STATIC_LINK_TYPED( ContextMenuHelper, ExecuteHdl_Impl, void*, p, void )
{
+ ExecuteInfo* pExecuteInfo = static_cast<ExecuteInfo*>(p);
// Release solar mutex to prevent deadlocks with clipboard thread
SolarMutexReleaser aReleaser;
try
@@ -624,7 +625,6 @@ IMPL_STATIC_LINK( ContextMenuHelper, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo
}
delete pExecuteInfo;
- return 0;
}
} // namespace svt
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index da53d908b3e3..e8f961cd395f 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -167,8 +167,9 @@ throw ( RuntimeException, std::exception )
}
}
-IMPL_STATIC_LINK( GenericToolboxController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo )
+IMPL_STATIC_LINK_TYPED( GenericToolboxController, ExecuteHdl_Impl, void*, p, void )
{
+ ExecuteInfo* pExecuteInfo = static_cast<ExecuteInfo*>(p);
try
{
// Asynchronous execution as this can lead to our own destruction!
@@ -180,7 +181,6 @@ IMPL_STATIC_LINK( GenericToolboxController, ExecuteHdl_Impl, ExecuteInfo*, pExec
{
}
delete pExecuteInfo;
- return 0;
}
} // namespace
diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx
index 472a62131a0f..d89a7fe3d481 100644
--- a/svtools/source/uno/popupmenucontrollerbase.cxx
+++ b/svtools/source/uno/popupmenucontrollerbase.cxx
@@ -148,11 +148,11 @@ void PopupMenuControllerBase::dispatchCommand( const OUString& sCommandURL, cons
}
-IMPL_STATIC_LINK( PopupMenuControllerBase, ExecuteHdl_Impl, PopupMenuControllerBaseDispatchInfo*, pDispatchInfo )
+IMPL_STATIC_LINK_TYPED( PopupMenuControllerBase, ExecuteHdl_Impl, void*, p, void )
{
+ PopupMenuControllerBaseDispatchInfo* pDispatchInfo = static_cast<PopupMenuControllerBaseDispatchInfo*>(p);
pDispatchInfo->mxDispatch->dispatch( pDispatchInfo->maURL, pDispatchInfo->maArgs );
delete pDispatchInfo;
- return 0;
}
void SAL_CALL PopupMenuControllerBase::itemActivated( const awt::MenuEvent& ) throw (RuntimeException, std::exception)
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 99f7a57360ef..cd5c2c5b62f5 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -763,11 +763,11 @@ throw( com::sun::star::uno::Exception, std::exception)
-IMPL_STATIC_LINK( ToolboxController, ExecuteHdl_Impl, DispatchInfo*, pDispatchInfo )
+IMPL_STATIC_LINK_TYPED( ToolboxController, ExecuteHdl_Impl, void*, p, void )
{
+ DispatchInfo* pDispatchInfo = static_cast<DispatchInfo*>(p);
pDispatchInfo->mxDispatch->dispatch( pDispatchInfo->maURL, pDispatchInfo->maArgs );
delete pDispatchInfo;
- return 0;
}
void ToolboxController::enable( bool bEnable )