summaryrefslogtreecommitdiff
path: root/sw/source
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 /sw/source
parentc916152d8562cab868d4c522748ac30029fad179 (diff)
convert Link<> to typed
Change-Id: If3e2b00092440ebd42ae5b73ae2b0e44c3702683
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accdoc.cxx50
-rw-r--r--sw/source/core/access/accdoc.hxx2
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx41
3 files changed, 40 insertions, 53 deletions
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index d31a6f3be31c..fbfdde8fc2dc 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -390,45 +390,39 @@ void SwAccessibleDocument::Dispose( bool bRecursive )
SwAccessibleContext::Dispose( bRecursive );
}
-IMPL_LINK( SwAccessibleDocument, WindowChildEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( SwAccessibleDocument, WindowChildEventListener, VclWindowEvent&, rEvent, void )
{
- OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) )
+ OSL_ENSURE( rEvent.GetWindow(), "Window???" );
+ switch ( rEvent.GetId() )
{
- VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
- OSL_ENSURE( pVclEvent->GetWindow(), "Window???" );
- switch ( pVclEvent->GetId() )
+ case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
{
- case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
+ vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = static_cast< vcl::Window* >( pVclEvent->GetData() );
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- AddChild( pChildWin );
- }
+ AddChild( pChildWin );
}
- break;
- case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children
+ }
+ break;
+ case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children
+ {
+ vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = static_cast< vcl::Window* >( pVclEvent->GetData() );
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- RemoveChild( pChildWin );
- }
+ RemoveChild( pChildWin );
}
- break;
- case VCLEVENT_OBJECT_DYING: // send destroy on hide for direct accessible children
+ }
+ break;
+ case VCLEVENT_OBJECT_DYING: // send destroy on hide for direct accessible children
+ {
+ vcl::Window* pChildWin = rEvent.GetWindow();
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = pVclEvent->GetWindow();
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- RemoveChild( pChildWin );
- }
+ RemoveChild( pChildWin );
}
- break;
}
+ break;
}
- return 0;
}
OUString SAL_CALL SwAccessibleDocument::getImplementationName()
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index c31d2945c329..98fc056cd996 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -123,7 +123,7 @@ protected:
public:
SwAccessibleDocument( SwAccessibleMap* pInitMap );
- DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+ DECL_LINK_TYPED( WindowChildEventListener, VclWindowEvent&, void );
// XServiceInfo
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 3674f78f035e..47825289065f 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -258,33 +258,26 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
// Scrollbar - Handler
-IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( SwView, WindowChildEventListener, VclWindowEvent&, rEvent, void )
{
- OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) )
- {
- VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
- OSL_ENSURE( pVclEvent->GetWindow(), "Window???" );
- vcl::Window* pChildWin = static_cast< vcl::Window* >( pVclEvent->GetData() );
+ OSL_ENSURE( rEvent.GetWindow(), "Window???" );
+ vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
- switch ( pVclEvent->GetId() )
- {
- case VCLEVENT_WINDOW_HIDE:
- if( pChildWin == m_pHScrollbar )
- ShowHScrollbar( false );
- else if( pChildWin == m_pVScrollbar )
- ShowVScrollbar( false );
- break;
- case VCLEVENT_WINDOW_SHOW:
- if( pChildWin == m_pHScrollbar )
- ShowHScrollbar( true );
- else if( pChildWin == m_pVScrollbar )
- ShowVScrollbar( true );
- break;
- }
+ switch ( rEvent.GetId() )
+ {
+ case VCLEVENT_WINDOW_HIDE:
+ if( pChildWin == m_pHScrollbar )
+ ShowHScrollbar( false );
+ else if( pChildWin == m_pVScrollbar )
+ ShowVScrollbar( false );
+ break;
+ case VCLEVENT_WINDOW_SHOW:
+ if( pChildWin == m_pHScrollbar )
+ ShowHScrollbar( true );
+ else if( pChildWin == m_pVScrollbar )
+ ShowVScrollbar( true );
+ break;
}
-
- return 0;
}
int SwView::_CreateScrollbar( bool bHori )