convert Link<> to typed

Change-Id: I66e81dafa08b2e2a43b4b696741676e093439024
This commit is contained in:
Noel Grandin 2015-09-17 14:33:58 +02:00
parent cdadaa5556
commit 008de7099b
23 changed files with 123 additions and 147 deletions

View File

@ -287,7 +287,7 @@ void CustomAnimationPane::KeyInput( const KeyEvent& rKEvt )
void CustomAnimationPane::addListener()
{
Link<> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->AddEventListener (
aLink,
tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@ -300,14 +300,14 @@ void CustomAnimationPane::addListener()
void CustomAnimationPane::removeListener()
{
Link<> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
}
IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
tools::EventMultiplexerEvent*,pEvent)
IMPL_LINK_TYPED(CustomAnimationPane,EventMultiplexerListener,
tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
onSelectionChanged();
@ -344,11 +344,10 @@ IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
onChangeCurrentPage();
break;
case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
if( mpMainSequence.get() && pEvent->mpUserData )
if( mpMainSequence.get() && rEvent.mpUserData )
mpCustomAnimationList->update( mpMainSequence );
break;
}
return 0;
}
static sal_Int32 getPropertyType( const OUString& rProperty )

View File

@ -119,7 +119,7 @@ private:
DECL_LINK( implControlHdl, Control* );
DECL_LINK_TYPED( implClickHdl, Button*, void );
DECL_LINK(implPropertyHdl, void *);
DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
DECL_LINK_TYPED(lateInitCallback, Timer *, void);
private:

View File

@ -905,7 +905,7 @@ void SlideTransitionPane::stopEffects()
void SlideTransitionPane::addListener()
{
Link<> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->AddEventListener (
aLink,
tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@ -918,14 +918,14 @@ void SlideTransitionPane::addListener()
void SlideTransitionPane::removeListener()
{
Link<> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
}
IMPL_LINK(SlideTransitionPane,EventMultiplexerListener,
tools::EventMultiplexerEvent*,pEvent)
IMPL_LINK_TYPED(SlideTransitionPane,EventMultiplexerListener,
tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
onSelectionChanged();
@ -966,7 +966,6 @@ IMPL_LINK(SlideTransitionPane,EventMultiplexerListener,
default:
break;
}
return 0;
}
IMPL_LINK_NOARG_TYPED(SlideTransitionPane, ApplyToAllButtonClicked, Button*, void)

View File

@ -95,7 +95,7 @@ private:
DECL_LINK( SpeedListBoxSelected, void * );
DECL_LINK( SoundListBoxSelected, void * );
DECL_LINK_TYPED( LoopSoundBoxChecked, Button*, void );
DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
DECL_LINK_TYPED(LateInitCallback, Timer *, void);
ViewShellBase & mrBase;

View File

@ -862,7 +862,7 @@ void AnnotationManagerImpl::DisposeTags()
void AnnotationManagerImpl::addListener()
{
Link<> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->AddEventListener (
aLink,
tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@ -873,14 +873,14 @@ void AnnotationManagerImpl::addListener()
void AnnotationManagerImpl::removeListener()
{
Link<> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
}
IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
tools::EventMultiplexerEvent*,pEvent)
IMPL_LINK_TYPED(AnnotationManagerImpl,EventMultiplexerListener,
tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
@ -897,7 +897,6 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
onSelectionChanged();
break;
}
return 0;
}
void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation > xAnnotation, vcl::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ )

View File

@ -95,7 +95,7 @@ public:
void invalidateSlots();
DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
DECL_LINK_TYPED(UpdateTagsHdl, void *, void);
void UpdateTags(bool bSynchron = false);

View File

@ -177,7 +177,7 @@ public:
be informed about.
*/
void AddEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypeSet);
/** Remove an event listener for the specified event types.
@ -188,7 +188,7 @@ public:
for.
*/
void RemoveEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypeSet = EID_FULL_SET);
/** This method is used for out-of-line events. An event of the

View File

@ -114,7 +114,7 @@ private:
When this happens then we unregister at the window of the old and
register at the window of the new shell.
*/
DECL_LINK(ConfigurationUpdateHandler, ::sd::tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(ConfigurationUpdateHandler, ::sd::tools::EventMultiplexerEvent&, void);
/** This call back is called by the form shell when it gets the focus.
In this case the form shell is moved to the top of the shell stack.

View File

@ -202,7 +202,7 @@ private:
*/
DECL_LINK( AppEventListenerHdl, void * );
DECL_LINK(EventMultiplexerListener, sd::tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener, sd::tools::EventMultiplexerEvent&, void);
/** holds a model guard during drag and drop between BeginMovingHdl and EndMovingHdl */
std::unique_ptr< OutlineViewModelChangeGuard > maDragAndDropModelGuard;

View File

@ -40,7 +40,7 @@ public:
void onZoomChanged();
void UpdateTags();
DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
DECL_LINK_TYPED(UpdateTagsHdl, void *, void);
bool CreateTags();

View File

@ -77,7 +77,7 @@ CurrentMasterPagesSelector::CurrentMasterPagesSelector (
// left clicks.
mnDefaultClickAction = SID_TP_APPLY_TO_SELECTED_SLIDES;
Link<> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
rBase.GetEventMultiplexer()->AddEventListener(aLink,
sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE
| sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL
@ -104,7 +104,7 @@ void CurrentMasterPagesSelector::dispose()
OSL_ASSERT(mrDocument.GetDocSh() != NULL);
}
Link<> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
mrBase.GetEventMultiplexer()->RemoveEventListener(aLink);
MasterPagesSelector::dispose();
@ -254,41 +254,36 @@ void CurrentMasterPagesSelector::ProcessPopupMenu (Menu& rMenu)
MasterPagesSelector::ProcessPopupMenu(rMenu);
}
IMPL_LINK(CurrentMasterPagesSelector,EventMultiplexerListener,
sd::tools::EventMultiplexerEvent*,pEvent)
IMPL_LINK_TYPED(CurrentMasterPagesSelector,EventMultiplexerListener,
sd::tools::EventMultiplexerEvent&, rEvent, void)
{
if (pEvent != NULL)
switch (rEvent.meEventId)
{
switch (pEvent->meEventId)
{
case sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL:
case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER:
case sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION:
UpdateSelection();
break;
case sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL:
case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER:
case sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION:
UpdateSelection();
break;
case sd::tools::EventMultiplexerEvent::EID_PAGE_ORDER:
// This is tricky. If a master page is removed, moved, or
// added we have to wait until both the notes master page
// and the standard master page have been removed, moved,
// or added. We do this by looking at the number of master
// pages which has to be odd in the consistent state (the
// handout master page is always present). If the number is
// even we ignore the hint.
if (mrBase.GetDocument()->GetMasterPageCount()%2 == 1)
MasterPagesSelector::Fill();
break;
case sd::tools::EventMultiplexerEvent::EID_PAGE_ORDER:
// This is tricky. If a master page is removed, moved, or
// added we have to wait until both the notes master page
// and the standard master page have been removed, moved,
// or added. We do this by looking at the number of master
// pages which has to be odd in the consistent state (the
// handout master page is always present). If the number is
// even we ignore the hint.
if (mrBase.GetDocument()->GetMasterPageCount()%2 == 1)
MasterPagesSelector::Fill();
break;
case sd::tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
case sd::tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
case sd::tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
InvalidatePreview(static_cast<const SdPage*>(pEvent->mpUserData));
break;
}
case sd::tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
case sd::tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
case sd::tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
InvalidatePreview(static_cast<const SdPage*>(rEvent.mpUserData));
break;
}
return 0;
}
} } // end of namespace sd::sidebar

View File

@ -73,7 +73,7 @@ private:
virtual void LateInit() SAL_OVERRIDE;
DECL_LINK(EventMultiplexerListener,sd::tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener,sd::tools::EventMultiplexerEvent&, void);
};
} } // end of namespace sd::sidebar

View File

@ -168,7 +168,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
SetSelectHdl (LINK(this, LayoutMenu, ClickHandler));
InvalidateContent();
Link<> aEventListenerLink (LINK(this,LayoutMenu,EventMultiplexerListener));
Link<::sd::tools::EventMultiplexerEvent&,void> aEventListenerLink (LINK(this,LayoutMenu,EventMultiplexerListener));
mrBase.GetEventMultiplexer()->AddEventListener(aEventListenerLink,
::sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE
| ::sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION
@ -218,7 +218,7 @@ void LayoutMenu::Dispose()
xComponent->dispose();
Clear();
Link<> aLink (LINK(this,LayoutMenu,EventMultiplexerListener));
Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,LayoutMenu,EventMultiplexerListener));
mrBase.GetEventMultiplexer()->RemoveEventListener (aLink);
Link<> aWindowEventHandlerLink (LINK(this,LayoutMenu,WindowEventHandler));
@ -704,9 +704,9 @@ void LayoutMenu::UpdateSelection()
SetNoSelection();
}
IMPL_LINK(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*, pEvent)
IMPL_LINK_TYPED(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case ::sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
case ::sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION:
@ -734,8 +734,6 @@ IMPL_LINK(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEve
/* Ignored */
break;
}
return 0;
}
IMPL_LINK(LayoutMenu, WindowEventHandler, VclWindowEvent*, pEvent)

View File

@ -191,7 +191,7 @@ private:
DECL_LINK_TYPED(ClickHandler, ValueSet*, void);
DECL_LINK_TYPED(RightClickHandler, const MouseEvent&, void);
DECL_LINK_TYPED(StateChangeHandler, const OUString&, void);
DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, void);
DECL_LINK(WindowEventHandler, VclWindowEvent*);
DECL_LINK_TYPED(OnMenuItemSelected, Menu*, bool);
};

View File

@ -125,7 +125,7 @@ Listener::Listener (
StartListening(*pMainViewShell);
}
Link<> aLink (LINK(this, Listener, EventMultiplexerCallback));
Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this, Listener, EventMultiplexerCallback));
mpBase->GetEventMultiplexer()->AddEventListener(
aLink,
tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
@ -185,7 +185,7 @@ void Listener::ReleaseListeners()
if (mpBase != NULL)
{
Link<> aLink (LINK(this, Listener, EventMultiplexerCallback));
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, Listener, EventMultiplexerCallback));
mpBase->GetEventMultiplexer()->RemoveEventListener(
aLink,
tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
@ -349,9 +349,9 @@ void Listener::Notify (
}
}
IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent*, pEvent)
IMPL_LINK_TYPED(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
{
@ -396,13 +396,13 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
case tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
case tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
case tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
HandleShapeModification(static_cast<const SdrPage*>(pEvent->mpUserData));
HandleShapeModification(static_cast<const SdrPage*>(rEvent.mpUserData));
break;
case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
if (pEvent->mpUserData != NULL)
if (rEvent.mpUserData != NULL)
{
const SdrObject* pObject = static_cast<const SdrObject*>(pEvent->mpUserData);
const SdrObject* pObject = static_cast<const SdrObject*>(rEvent.mpUserData);
HandleShapeModification(pObject->GetPage());
}
break;
@ -410,8 +410,6 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
default:
break;
}
return 0;
}
//===== lang::XEventListener ================================================

View File

@ -176,7 +176,7 @@ private:
void ThrowIfDisposed()
throw (::com::sun::star::lang::DisposedException);
DECL_LINK(EventMultiplexerCallback, tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerCallback, tools::EventMultiplexerEvent&, void);
};
} } } // end of namespace ::sd::slidesorter::controller

View File

@ -427,7 +427,7 @@ void TableDesignWidget::updateControls()
void TableDesignWidget::addListener()
{
Link<> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->AddEventListener (
aLink,
tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@ -439,14 +439,14 @@ void TableDesignWidget::addListener()
void TableDesignWidget::removeListener()
{
Link<> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
}
IMPL_LINK(TableDesignWidget,EventMultiplexerListener,
tools::EventMultiplexerEvent*,pEvent)
IMPL_LINK_TYPED(TableDesignWidget,EventMultiplexerListener,
tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
@ -463,7 +463,6 @@ IMPL_LINK(TableDesignWidget,EventMultiplexerListener,
onSelectionChanged();
break;
}
return 0;
}
struct CellInfo

View File

@ -85,7 +85,7 @@ private:
void FillDesignPreviewControl();
DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
DECL_LINK_TYPED(implValueSetHdl, ValueSet*, void);
DECL_LINK_TYPED(implCheckBoxHdl, Button*, void);

View File

@ -68,11 +68,11 @@ public:
virtual ~Implementation();
void AddEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypes);
void RemoveEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypes);
void CallListeners (EventMultiplexerEvent& rEvent);
@ -120,7 +120,7 @@ protected:
private:
ViewShellBase& mrBase;
typedef ::std::pair<Link<>,EventMultiplexerEvent::EventId> ListenerDescriptor;
typedef ::std::pair<Link<EventMultiplexerEvent&,void>,EventMultiplexerEvent::EventId> ListenerDescriptor;
typedef ::std::vector<ListenerDescriptor> ListenerList;
ListenerList maListeners;
@ -184,14 +184,14 @@ EventMultiplexer::~EventMultiplexer()
}
void EventMultiplexer::AddEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypes)
{
mpImpl->AddEventListener (rCallback, aEventTypes);
}
void EventMultiplexer::RemoveEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypes)
{
mpImpl->RemoveEventListener (rCallback, aEventTypes);
@ -315,7 +315,7 @@ void EventMultiplexer::Implementation::ReleaseListeners()
}
void EventMultiplexer::Implementation::AddEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypes)
{
ListenerList::iterator iListener (maListeners.begin());
@ -335,7 +335,7 @@ void EventMultiplexer::Implementation::AddEventListener (
}
void EventMultiplexer::Implementation::RemoveEventListener (
Link<>& rCallback,
const Link<EventMultiplexerEvent&,void>& rCallback,
EventMultiplexerEvent::EventId aEventTypes)
{
ListenerList::iterator iListener (maListeners.begin());
@ -700,7 +700,7 @@ void EventMultiplexer::Implementation::CallListeners (EventMultiplexerEvent& rEv
for (; iListener!=iListenerEnd; ++iListener)
{
if ((iListener->second && rEvent.meEventId))
iListener->first.Call(&rEvent);
iListener->first.Call(rEvent);
}
}

View File

@ -57,7 +57,7 @@ FormShellManager::FormShellManager (ViewShellBase& rBase)
{
// Register at the EventMultiplexer to be informed about changes in the
// center pane.
Link<> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
mrBase.GetEventMultiplexer()->AddEventListener(
aLink,
sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
@ -73,7 +73,7 @@ FormShellManager::~FormShellManager()
UnregisterAtCenterPane();
// Unregister from the EventMultiplexer.
Link<> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
mrBase.GetEventMultiplexer()->RemoveEventListener(aLink);
if (mpSubShellFactory.get() != NULL)
@ -198,9 +198,9 @@ IMPL_LINK_NOARG_TYPED(FormShellManager, FormControlActivated, LinkParamNone*, vo
}
}
IMPL_LINK(FormShellManager, ConfigurationUpdateHandler, sd::tools::EventMultiplexerEvent*, pEvent)
IMPL_LINK_TYPED(FormShellManager, ConfigurationUpdateHandler, sd::tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
UnregisterAtCenterPane();
@ -221,8 +221,6 @@ IMPL_LINK(FormShellManager, ConfigurationUpdateHandler, sd::tools::EventMultiple
default:
break;
}
return 0;
}
IMPL_LINK(FormShellManager, WindowEventHandler, VclWindowEvent*, pEvent)

View File

@ -324,7 +324,7 @@ private:
bool CheckPlugInMode (const OUString& rsName) const;
DECL_LINK_TYPED(UpdateCallback, void *, void);
DECL_LINK(EventMultiplexerCallback, sd::tools::EventMultiplexerEvent*);
DECL_LINK_TYPED(EventMultiplexerCallback, sd::tools::EventMultiplexerEvent&, void);
DECL_LINK_TYPED(SetValidCallback, void*, void);
};
@ -535,7 +535,7 @@ ToolBarManager::Implementation::Implementation (
mnPendingSetValidCall(0),
maToolBarRules(rpToolBarManager,rpViewShellManager)
{
Link<> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
mpEventMultiplexer->AddEventListener(
aLink,
tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED
@ -550,7 +550,7 @@ ToolBarManager::Implementation::Implementation (
ToolBarManager::Implementation::~Implementation()
{
// Unregister at broadcasters.
Link<> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
mpEventMultiplexer->RemoveEventListener(aLink);
// Abort pending user calls.
@ -861,29 +861,25 @@ IMPL_LINK_NOARG_TYPED(ToolBarManager::Implementation, UpdateCallback, void*, voi
}
}
IMPL_LINK(ToolBarManager::Implementation,EventMultiplexerCallback,
sd::tools::EventMultiplexerEvent*,pEvent)
IMPL_LINK_TYPED(ToolBarManager::Implementation,EventMultiplexerCallback,
sd::tools::EventMultiplexerEvent&, rEvent, void)
{
if (pEvent != NULL)
switch (rEvent.meEventId)
{
switch (pEvent->meEventId)
{
case tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED:
if (mnPendingSetValidCall == 0)
mnPendingSetValidCall
= Application::PostUserEvent(LINK(this,Implementation,SetValidCallback));
break;
case tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED:
if (mnPendingSetValidCall == 0)
mnPendingSetValidCall
= Application::PostUserEvent(LINK(this,Implementation,SetValidCallback));
break;
case tools::EventMultiplexerEvent::EID_CONTROLLER_DETACHED:
SetValid(false);
break;
case tools::EventMultiplexerEvent::EID_CONTROLLER_DETACHED:
SetValid(false);
break;
case tools::EventMultiplexerEvent::EID_PANE_MANAGER_DYING:
SetValid(false);
break;
}
case tools::EventMultiplexerEvent::EID_PANE_MANAGER_DYING:
SetValid(false);
break;
}
return 0;
}
IMPL_LINK_NOARG_TYPED(ToolBarManager::Implementation, SetValidCallback, void*, void)

View File

@ -131,7 +131,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
FillOutliner();
}
Link<> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->AddEventListener(
aLink,
tools::EventMultiplexerEvent::EID_CURRENT_PAGE
@ -171,7 +171,7 @@ OutlineView::~OutlineView()
{
DBG_ASSERT(maDragAndDropModelGuard.get() == 0, "sd::OutlineView::~OutlineView(), prior drag operation not finished correctly!" );
Link<> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->RemoveEventListener( aLink );
DisconnectFromApplication();
@ -1430,32 +1430,28 @@ IMPL_LINK_NOARG(OutlineView, AppEventListenerHdl)
return 0;
}
IMPL_LINK(OutlineView, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*, pEvent)
IMPL_LINK_TYPED(OutlineView, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, rEvent, void)
{
if (pEvent != NULL)
switch (rEvent.meEventId)
{
switch (pEvent->meEventId)
{
case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
SetActualPage(mrOutlineViewShell.GetActualPage());
break;
case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
SetActualPage(mrOutlineViewShell.GetActualPage());
break;
case tools::EventMultiplexerEvent::EID_PAGE_ORDER:
if (dynamic_cast<Outliner&>(mrOutliner).GetIgnoreCurrentPageChangesLevel()==0)
case tools::EventMultiplexerEvent::EID_PAGE_ORDER:
if (dynamic_cast<Outliner&>(mrOutliner).GetIgnoreCurrentPageChangesLevel()==0)
{
if (((mrDoc.GetPageCount()-1)%2) == 0)
{
if (((mrDoc.GetPageCount()-1)%2) == 0)
{
mrOutliner.Clear();
FillOutliner();
::sd::Window* pWindow = mrOutlineViewShell.GetActiveWindow();
if (pWindow != NULL)
pWindow->Invalidate();
}
mrOutliner.Clear();
FillOutliner();
::sd::Window* pWindow = mrOutlineViewShell.GetActiveWindow();
if (pWindow != NULL)
pWindow->Invalidate();
}
break;
}
}
break;
}
return 0;
}
void OutlineView::IgnoreCurrentPageChanges (bool bIgnoreChanges)

View File

@ -422,7 +422,7 @@ ViewOverlayManager::ViewOverlayManager( ViewShellBase& rViewShellBase )
: mrBase( rViewShellBase )
, mnUpdateTagsEvent( 0 )
{
Link<> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->AddEventListener(aLink, tools::EventMultiplexerEvent::EID_CURRENT_PAGE
| tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
| tools::EventMultiplexerEvent::EID_VIEW_ADDED
@ -434,7 +434,7 @@ ViewOverlayManager::ViewOverlayManager( ViewShellBase& rViewShellBase )
ViewOverlayManager::~ViewOverlayManager()
{
Link<> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
if( mnUpdateTagsEvent )
@ -529,10 +529,10 @@ bool ViewOverlayManager::DisposeTags()
return false;
}
IMPL_LINK(ViewOverlayManager,EventMultiplexerListener,
tools::EventMultiplexerEvent*,pEvent)
IMPL_LINK_TYPED(ViewOverlayManager,EventMultiplexerListener,
tools::EventMultiplexerEvent&, rEvent, void)
{
switch (pEvent->meEventId)
switch (rEvent.meEventId)
{
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
case tools::EventMultiplexerEvent::EID_VIEW_ADDED:
@ -542,7 +542,6 @@ IMPL_LINK(ViewOverlayManager,EventMultiplexerListener,
UpdateTags();
break;
}
return 0;
}
}