summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-26 17:10:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-26 17:11:29 +0100
commitb3847f3dfda6ed18f5f09f01354c529925c25889 (patch)
tree9980ea1a5b99e0dbf5da1fa912e9c53629904061 /include
parentFix merge conflicts (diff)
downloadcore-b3847f3dfda6ed18f5f09f01354c529925c25889.tar.gz
core-b3847f3dfda6ed18f5f09f01354c529925c25889.zip
Work around MSC "'override' cannot be used with 'inline'" bug
Change-Id: Icd3b09f098c19268ac888dd6195fb535979557ed
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/listenernotification.hxx45
1 files changed, 16 insertions, 29 deletions
diff --git a/include/comphelper/listenernotification.hxx b/include/comphelper/listenernotification.hxx
index cac3a79765b6..5ae133bd5f95 100644
--- a/include/comphelper/listenernotification.hxx
+++ b/include/comphelper/listenernotification.hxx
@@ -203,10 +203,16 @@ namespace comphelper
inline bool notify( const EventClass& _rEvent, NotificationMethod _pNotify ) SAL_THROW(( ::com::sun::star::uno::Exception ));
protected:
- inline virtual bool implNotify(
+ virtual bool implNotify(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener,
const ::com::sun::star::lang::EventObject& _rEvent
- ) SAL_THROW( ( ::com::sun::star::uno::Exception ) ) SAL_OVERRIDE;
+ ) SAL_THROW( ( ::com::sun::star::uno::Exception ) ) SAL_OVERRIDE
+ {
+ const EventClass& rTypedEvent( static_cast< const EventClass& >( _rEvent ) );
+ ListenerClass* pTypedListener( static_cast< ListenerClass* >( _rxListener.get() ) );
+ (pTypedListener->*m_pNotificationMethod)( rTypedEvent );
+ return true;
+ }
};
@@ -219,19 +225,6 @@ namespace comphelper
return bRet;
}
-
- template< class LISTENER, class EVENT >
- inline bool OSimpleListenerContainer< LISTENER, EVENT >::implNotify(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener,
- const ::com::sun::star::lang::EventObject& _rEvent ) SAL_THROW( ( ::com::sun::star::uno::Exception ) )
- {
- const EventClass& rTypedEvent( static_cast< const EventClass& >( _rEvent ) );
- ListenerClass* pTypedListener( static_cast< ListenerClass* >( _rxListener.get() ) );
- (pTypedListener->*m_pNotificationMethod)( rTypedEvent );
- return true;
- }
-
-
//= OListenerContainerBase
/** is a specialization of OListenerContainer which saves you some additional type casts,
@@ -267,10 +260,16 @@ namespace comphelper
using OListenerContainer::impl_notify;
protected:
- inline virtual bool implNotify(
+ virtual bool implNotify(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener,
const ::com::sun::star::lang::EventObject& _rEvent
- ) SAL_THROW( ( ::com::sun::star::uno::Exception ) ) SAL_OVERRIDE;
+ ) SAL_THROW( ( ::com::sun::star::uno::Exception ) ) SAL_OVERRIDE
+ {
+ return implTypedNotify(
+ ::com::sun::star::uno::Reference< ListenerClass >( static_cast< ListenerClass* >( _rxListener.get() ) ),
+ static_cast< const EventClass& >( _rEvent )
+ );
+ }
virtual bool implTypedNotify(
const ::com::sun::star::uno::Reference< ListenerClass >& _rxListener,
@@ -278,18 +277,6 @@ namespace comphelper
) SAL_THROW( ( ::com::sun::star::uno::Exception ) ) = 0;
};
- template< class LISTENER, class EVENT >
- inline bool OListenerContainerBase< LISTENER, EVENT >::implNotify(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener,
- const ::com::sun::star::lang::EventObject& _rEvent ) SAL_THROW( ( ::com::sun::star::uno::Exception ) )
- {
- return implTypedNotify(
- ::com::sun::star::uno::Reference< ListenerClass >( static_cast< ListenerClass* >( _rxListener.get() ) ),
- static_cast< const EventClass& >( _rEvent )
- );
- }
-
-
} // namespace comphelper