summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-21 08:03:25 +0200
committerNoel Grandin <noel@peralex.com>2015-09-21 08:03:52 +0200
commit1e67e94f1a308ca60d4934e9fe9d5c048225ebe8 (patch)
treec3bdf0fcec6912bc84e835fe48a80ee9f9391106 /svx
parentc916152d8562cab868d4c522748ac30029fad179 (diff)
convert Link<> to typed
Change-Id: If3e2b00092440ebd42ae5b73ae2b0e44c3702683
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.cxx33
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.hxx2
2 files changed, 14 insertions, 21 deletions
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
index df89146cf949..ff120dcae83d 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
@@ -91,59 +91,52 @@ void InsertPropertyPanel::dispose()
-IMPL_LINK(InsertPropertyPanel, WindowEventListener, VclSimpleEvent*, pEvent)
+IMPL_LINK_TYPED(InsertPropertyPanel, WindowEventListener, VclWindowEvent&, rEvent, void)
{
// We will be getting a lot of window events (well, basically all
// of them), so reject early everything that is not connected to
// toolbox selection.
- if (pEvent == NULL)
- return 1;
- if ( ! pEvent->ISA(VclWindowEvent))
- return 1;
- if (pEvent->GetId() != VCLEVENT_TOOLBOX_SELECT)
- return 1;
-
- VclWindowEvent* pWindowEvent = dynamic_cast<VclWindowEvent*>(pEvent);
- vcl::Window* pWindow = pWindowEvent ? pWindowEvent->GetWindow() : NULL;
+ if (rEvent.GetId() != VCLEVENT_TOOLBOX_SELECT)
+ return;
+
+ vcl::Window* pWindow = rEvent.GetWindow();
ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
if (pToolBox == NULL)
- return 1;
+ return;
// Extract name of (sub)toolbar from help id.
OUString sToolbarName (rtl::OStringToOUString(pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8));
if (sToolbarName.getLength() == 0)
- return 1;
+ return;
const util::URL aURL (sfx2::sidebar::Tools::GetURL(sToolbarName));
if (aURL.Path.getLength() == 0)
- return 1;
+ return;
// Get item id.
sal_uInt16 nId = pToolBox->GetCurItemId();
if (nId == 0)
- return 1;
+ return;
SidebarToolBox* pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpStandardShapesToolBox.get());
if (pSidebarToolBox == NULL)
- return 1;
+ return;
sal_uInt16 nItemId (pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path));
if (nItemId == 0)
{
pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpCustomShapesToolBox.get());
if (pSidebarToolBox == NULL)
- return 1;
+ return;
nItemId = pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path);
if (nItemId == 0)
- return 1;
+ return;
}
Reference<frame::XSubToolbarController> xController (pSidebarToolBox->GetControllerForItemId(nItemId), UNO_QUERY);
if ( ! xController.is() )
- return 1;
+ return;
const OUString sCommand (pToolBox->GetItemCommand(nId));
xController->functionSelected(sCommand);
-
- return 1;
}
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.hxx b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
index 01ce363d5e02..f8feaf74f43c 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.hxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
@@ -49,7 +49,7 @@ private:
VclPtr<ToolBox> mpCustomShapesToolBox;
const css::uno::Reference<css::frame::XFrame> mxFrame;
- DECL_LINK(WindowEventListener, VclSimpleEvent*);
+ DECL_LINK_TYPED(WindowEventListener, VclWindowEvent&, void);
};