summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-17 13:48:36 +0200
committerNoel Grandin <noel@peralex.com>2015-09-17 14:41:58 +0200
commit118dd2fba2038891d06381e9cda0396e661e60ac (patch)
tree30dffbe1956a22bd709dabf2550c6f8fd5f66fac /sd/source
parent0fd07e53efbe6ff73db51711d36f9aeaf893479e (diff)
convert Link<> to typed
Change-Id: I83b3a4a637db8f623b18615227a495a15078561f
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/inc/tools/SlotStateListener.hxx6
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx5
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.hxx2
-rw-r--r--sd/source/ui/tools/SlotStateListener.cxx8
4 files changed, 10 insertions, 11 deletions
diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx b/sd/source/ui/inc/tools/SlotStateListener.hxx
index 0983d6b9967b..4d9401e6bcf2 100644
--- a/sd/source/ui/inc/tools/SlotStateListener.hxx
+++ b/sd/source/ui/inc/tools/SlotStateListener.hxx
@@ -51,7 +51,7 @@ public:
explanations about the parameters.
*/
SlotStateListener (
- Link<>& rCallback,
+ Link<const OUString&,void>& rCallback,
const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider>& rxDispatchProvider,
const OUString& rSlotName);
@@ -66,7 +66,7 @@ public:
Changing the callback does not release the listeners.
@throws DisposedException
*/
- void SetCallback (const Link<>& rCallback);
+ void SetCallback (const Link<const OUString&,void>& rCallback);
/** Set the frame whose slots shall be observed. When an object of this
class is already observing slots of another frame then these
@@ -111,7 +111,7 @@ protected:
virtual void SAL_CALL disposing() SAL_OVERRIDE;
private:
- Link<> maCallback;
+ Link<const OUString&,void> maCallback;
/** Remember the URLs that describe slots whose state changes we are
listening to.
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 3eda44c82c08..d5010b2738a2 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -181,7 +181,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
Window::SetHelpId(HID_SD_TASK_PANE_PREVIEW_LAYOUTS);
SetAccessibleName(SdResId(STR_TASKPANEL_LAYOUT_MENU_TITLE));
- Link<> aStateChangeLink (LINK(this,LayoutMenu,StateChangeHandler));
+ Link<const OUString&,void> aStateChangeLink (LINK(this,LayoutMenu,StateChangeHandler));
mxListener = new ::sd::tools::SlotStateListener(
aStateChangeLink,
Reference<frame::XDispatchProvider>(mrBase.GetController()->getFrame(), UNO_QUERY),
@@ -635,10 +635,9 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
}
}
-IMPL_LINK_NOARG(LayoutMenu, StateChangeHandler)
+IMPL_LINK_NOARG_TYPED(LayoutMenu, StateChangeHandler, const OUString&, void)
{
InvalidateContent();
- return 0;
}
IMPL_LINK_TYPED(LayoutMenu, OnMenuItemSelected, Menu*, pMenu, bool)
diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx
index 813682f361df..b511251c226e 100644
--- a/sd/source/ui/sidebar/LayoutMenu.hxx
+++ b/sd/source/ui/sidebar/LayoutMenu.hxx
@@ -190,7 +190,7 @@ private:
*/
DECL_LINK_TYPED(ClickHandler, ValueSet*, void);
DECL_LINK(RightClickHandler, MouseEvent*);
- DECL_LINK(StateChangeHandler, void *);
+ DECL_LINK_TYPED(StateChangeHandler, const OUString&, void);
DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*);
DECL_LINK(WindowEventHandler, VclWindowEvent*);
DECL_LINK_TYPED(OnMenuItemSelected, Menu*, bool);
diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx
index 2167e761f2f2..a3d1be1c462b 100644
--- a/sd/source/ui/tools/SlotStateListener.cxx
+++ b/sd/source/ui/tools/SlotStateListener.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star;
namespace sd { namespace tools {
SlotStateListener::SlotStateListener (
- Link<>& rCallback,
+ Link<const OUString&,void>& rCallback,
const uno::Reference<frame::XDispatchProvider>& rxDispatchProvider,
const OUString& rSlotName)
: SlotStateListenerInterfaceBase(maMutex),
@@ -49,7 +49,7 @@ SlotStateListener::~SlotStateListener()
ReleaseListeners();
}
-void SlotStateListener::SetCallback (const Link<>& rCallback)
+void SlotStateListener::SetCallback (const Link<const OUString&,void>& rCallback)
{
ThrowIfDisposed();
@@ -90,7 +90,7 @@ void SlotStateListener::disposing()
{
ReleaseListeners();
mxDispatchProviderWeak = uno::WeakReference<frame::XDispatchProvider>(NULL);
- maCallback = Link<>();
+ maCallback = Link<const OUString&,void>();
}
util::URL SlotStateListener::MakeURL (const OUString& rSlotName)
@@ -123,7 +123,7 @@ void SlotStateListener::statusChanged (
ThrowIfDisposed();
OUString sSlotName (rState.FeatureURL.Complete);
if (maCallback.IsSet())
- maCallback.Call(&sSlotName);
+ maCallback.Call(sSlotName);
}
void SlotStateListener::ReleaseListeners()