Kaydet (Commit) b3847f3d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Work around MSC "'override' cannot be used with 'inline'" bug

Change-Id: Icd3b09f098c19268ac888dd6195fb535979557ed
üst 35ddbcbc
...@@ -203,10 +203,16 @@ namespace comphelper ...@@ -203,10 +203,16 @@ namespace comphelper
inline bool notify( const EventClass& _rEvent, NotificationMethod _pNotify ) SAL_THROW(( ::com::sun::star::uno::Exception )); inline bool notify( const EventClass& _rEvent, NotificationMethod _pNotify ) SAL_THROW(( ::com::sun::star::uno::Exception ));
protected: protected:
inline virtual bool implNotify( virtual bool implNotify(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener,
const ::com::sun::star::lang::EventObject& _rEvent 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 ...@@ -219,19 +225,6 @@ namespace comphelper
return bRet; 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 //= OListenerContainerBase
/** is a specialization of OListenerContainer which saves you some additional type casts, /** is a specialization of OListenerContainer which saves you some additional type casts,
...@@ -267,10 +260,16 @@ namespace comphelper ...@@ -267,10 +260,16 @@ namespace comphelper
using OListenerContainer::impl_notify; using OListenerContainer::impl_notify;
protected: protected:
inline virtual bool implNotify( virtual bool implNotify(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& _rxListener,
const ::com::sun::star::lang::EventObject& _rEvent 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( virtual bool implTypedNotify(
const ::com::sun::star::uno::Reference< ListenerClass >& _rxListener, const ::com::sun::star::uno::Reference< ListenerClass >& _rxListener,
...@@ -278,18 +277,6 @@ namespace comphelper ...@@ -278,18 +277,6 @@ namespace comphelper
) SAL_THROW( ( ::com::sun::star::uno::Exception ) ) = 0; ) 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 } // namespace comphelper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment