diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-17 14:02:16 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 14:41:59 +0200 |
commit | 277b9950a5a5d163073a8ab5a501bfad322eea90 (patch) | |
tree | 2ce79836655fae705eced89a9a143df4337360fb /sd | |
parent | 1fccdc3435604d4521f4e395ebeb80b637da92e6 (diff) |
convert Link<> to typed
Change-Id: Ic8def516b5a45dcb1d859eb74962a36c2b608f87
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPagesSelector.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPagesSelector.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/PreviewValueSet.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/sidebar/PreviewValueSet.hxx | 4 |
5 files changed, 10 insertions, 11 deletions
diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx index b511251c226e..aa1c1d3916b3 100644 --- a/sd/source/ui/sidebar/LayoutMenu.hxx +++ b/sd/source/ui/sidebar/LayoutMenu.hxx @@ -189,7 +189,7 @@ private: /** When clicked then set the current page of the view in the center pane. */ DECL_LINK_TYPED(ClickHandler, ValueSet*, void); - DECL_LINK(RightClickHandler, MouseEvent*); + DECL_LINK_TYPED(RightClickHandler, const MouseEvent&, void); DECL_LINK_TYPED(StateChangeHandler, const OUString&, void); DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*); DECL_LINK(WindowEventHandler, VclWindowEvent*); diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index 34af3591ced7..1ae6067113b6 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -178,7 +178,7 @@ IMPL_LINK_NOARG_TYPED(MasterPagesSelector, ClickHandler, ValueSet*, void) ExecuteCommand(mnDefaultClickAction); } -IMPL_LINK(MasterPagesSelector, RightClickHandler, MouseEvent*, pEvent) +IMPL_LINK_TYPED(MasterPagesSelector, RightClickHandler, const MouseEvent&, rEvent, void) { // Here we only prepare the display of the context menu: the item under // the mouse is selected. The actual display of the context menu is @@ -190,14 +190,13 @@ IMPL_LINK(MasterPagesSelector, RightClickHandler, MouseEvent*, pEvent) if (pViewFrame != NULL) { SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher(); - if (pDispatcher != NULL && pEvent != NULL) + if (pDispatcher != NULL) { - sal_uInt16 nIndex = PreviewValueSet::GetItemId (pEvent->GetPosPixel()); + sal_uInt16 nIndex = PreviewValueSet::GetItemId (rEvent.GetPosPixel()); if (nIndex > 0) PreviewValueSet::SelectItem (nIndex); } } - return 0; } void MasterPagesSelector::Command (const CommandEvent& rEvent) diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx index 8cd93cbe55d0..33a49cbd69c2 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.hxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx @@ -192,7 +192,7 @@ private: of an index for a token. */ DECL_LINK_TYPED(ClickHandler, ValueSet*, void); - DECL_LINK(RightClickHandler, MouseEvent*); + DECL_LINK_TYPED(RightClickHandler, const MouseEvent&, void); DECL_LINK(ContextMenuCallback, CommandEvent*); DECL_LINK_TYPED(ContainerChangeListener, MasterPageContainerChangeEvent&, void); DECL_LINK_TYPED(OnMenuItemSelected, Menu*, bool); diff --git a/sd/source/ui/sidebar/PreviewValueSet.cxx b/sd/source/ui/sidebar/PreviewValueSet.cxx index 7c1145cf9c60..25d5f2987e68 100644 --- a/sd/source/ui/sidebar/PreviewValueSet.cxx +++ b/sd/source/ui/sidebar/PreviewValueSet.cxx @@ -47,7 +47,7 @@ void PreviewValueSet::SetPreviewSize (const Size& rSize) maPreviewSize = rSize; } -void PreviewValueSet::SetRightMouseClickHandler (const Link<>& rLink) +void PreviewValueSet::SetRightMouseClickHandler (const Link<const MouseEvent&,void>& rLink) { maRightMouseClickHandler = rLink; } @@ -55,9 +55,9 @@ void PreviewValueSet::SetRightMouseClickHandler (const Link<>& rLink) void PreviewValueSet::MouseButtonDown (const MouseEvent& rEvent) { if (rEvent.IsRight()) - maRightMouseClickHandler.Call(&const_cast<MouseEvent&>(rEvent)); + maRightMouseClickHandler.Call(rEvent); else - ValueSet::MouseButtonDown (rEvent); + ValueSet::MouseButtonDown(rEvent); } diff --git a/sd/source/ui/sidebar/PreviewValueSet.hxx b/sd/source/ui/sidebar/PreviewValueSet.hxx index b48c840add33..86eb545ac513 100644 --- a/sd/source/ui/sidebar/PreviewValueSet.hxx +++ b/sd/source/ui/sidebar/PreviewValueSet.hxx @@ -33,7 +33,7 @@ public: explicit PreviewValueSet (vcl::Window* pParent); virtual ~PreviewValueSet(); - void SetRightMouseClickHandler (const Link<>& rLink); + void SetRightMouseClickHandler (const Link<const MouseEvent&,void>& rLink); virtual void Resize() SAL_OVERRIDE; void SetPreviewSize (const Size& rSize); @@ -49,7 +49,7 @@ protected: virtual void MouseButtonDown (const MouseEvent& rEvent) SAL_OVERRIDE; private: - Link<> maRightMouseClickHandler; + Link<const MouseEvent&,void> maRightMouseClickHandler; Size maPreviewSize; const int mnBorderWidth; const int mnBorderHeight; |