summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
parentc916152d8562cab868d4c522748ac30029fad179 (diff)
convert Link<> to typed
Change-Id: If3e2b00092440ebd42ae5b73ae2b0e44c3702683
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/FocusManager.cxx21
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx40
2 files changed, 24 insertions, 37 deletions
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index d36b7ac870ef..d44f0b16f660 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -537,24 +537,17 @@ IMPL_LINK_TYPED(FocusManager, WindowEventListener, VclWindowEvent&, rWindowEvent
}
}
-IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
+IMPL_LINK_TYPED(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void)
{
- if (pEvent == NULL)
- return 0;
-
- if (!pEvent->ISA(VclWindowEvent))
- return 0;
-
- VclWindowEvent* pWindowEvent = static_cast<VclWindowEvent*>(pEvent);
- vcl::Window* pSource = pWindowEvent->GetWindow();
+ vcl::Window* pSource = rEvent.GetWindow();
if (pSource == NULL)
- return 0;
+ return;
- switch (pWindowEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_WINDOW_KEYINPUT:
{
- KeyEvent* pKeyEvent = static_cast<KeyEvent*>(pWindowEvent->GetData());
+ KeyEvent* pKeyEvent = static_cast<KeyEvent*>(rEvent.GetData());
// Go up the window hierarchy to find out whether the
// parent of the event source is known to us.
@@ -593,7 +586,7 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
break;
}
}
- return 1;
+ return;
}
case VCLEVENT_WINDOW_GETFOCUS:
@@ -609,8 +602,6 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
default:
break;
}
-
- return 0;
}
} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index f6bc338cb91e..a873ea9f5377 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -63,7 +63,7 @@ public:
void SetSymbolsSize_Impl( sal_Int16 );
DECL_LINK_TYPED( OptionsChanged_Impl, LinkParamNone*, void );
- DECL_LINK( SettingsChanged_Impl, VclWindowEvent* );
+ DECL_LINK_TYPED( SettingsChanged_Impl, VclSimpleEvent&, void );
explicit SfxImageManager_Impl(SfxModule& rModule);
~SfxImageManager_Impl();
@@ -207,32 +207,28 @@ IMPL_LINK_NOARG_TYPED(SfxImageManager_Impl, OptionsChanged_Impl, LinkParamNone*,
-IMPL_LINK( SfxImageManager_Impl, SettingsChanged_Impl, VclWindowEvent*, pEvent)
+IMPL_LINK_TYPED( SfxImageManager_Impl, SettingsChanged_Impl, VclSimpleEvent&, rEvent, void)
{
- if (pEvent)
+ switch (rEvent.GetId())
{
- switch (pEvent->GetId())
+ case VCLEVENT_OBJECT_DYING:
+ if (m_bAppEventListener)
{
- case VCLEVENT_OBJECT_DYING:
- if (m_bAppEventListener)
- {
- Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) );
- m_bAppEventListener = false;
- }
- break;
- case VCLEVENT_APPLICATION_DATACHANGED:
- // Check if toolbar button size have changed and we have to use system settings
- {
- sal_Int16 nSymbolsSize = m_aOpt.GetCurrentSymbolsSize();
- if (m_nSymbolsSize != nSymbolsSize)
- SetSymbolsSize_Impl(nSymbolsSize);
- }
- break;
- default:
- break;
+ Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) );
+ m_bAppEventListener = false;
+ }
+ break;
+ case VCLEVENT_APPLICATION_DATACHANGED:
+ // Check if toolbar button size have changed and we have to use system settings
+ {
+ sal_Int16 nSymbolsSize = m_aOpt.GetCurrentSymbolsSize();
+ if (m_nSymbolsSize != nSymbolsSize)
+ SetSymbolsSize_Impl(nSymbolsSize);
}
+ break;
+ default:
+ break;
}
- return 0L;
}
SfxImageManager::SfxImageManager(SfxModule& rModule)