diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2011-09-02 14:57:30 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2011-09-07 11:17:55 +0200 |
commit | 5c64fd7ce04ff82edb2989d862bd660c9b9492a5 (patch) | |
tree | 3b457843f3f2068b91bfa2e8a35e8c1de23a93ba /cppuhelper/source/propshlp.cxx | |
parent | compensate for missing newlines at end of windows .d files when concatenating (diff) | |
download | core-5c64fd7ce04ff82edb2989d862bd660c9b9492a5.tar.gz core-5c64fd7ce04ff82edb2989d862bd660c9b9492a5.zip |
Restore ABI compatibility with LO 3.4 and earlier
Factor out ABI-breaking changes to OPropertySetHelper into a derived
class OPropertySetHelper2.
Only gcc3.map is up-to-date.
Diffstat (limited to 'cppuhelper/source/propshlp.cxx')
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index 787806200564..2a71f00e1ce0 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -152,11 +152,13 @@ public: IEventNotificationHook *i_pFireEvents ) :m_bIgnoreRuntimeExceptionsWhileFiring( i_bIgnoreRuntimeExceptionsWhileFiring ) + ,m_bFireEvents(true) ,m_pFireEvents( i_pFireEvents ) { } bool m_bIgnoreRuntimeExceptionsWhileFiring; + bool m_bFireEvents; class IEventNotificationHook * const m_pFireEvents; ::std::vector< sal_Int32 > m_handles; @@ -173,7 +175,6 @@ OPropertySetHelper::OPropertySetHelper( : rBHelper( rBHelper_ ), aBoundLC( rBHelper_.rMutex ), aVetoableLC( rBHelper_.rMutex ), - m_bFireEvent(true), m_pReserved( new Impl(false, 0) ) { } @@ -183,7 +184,6 @@ OPropertySetHelper::OPropertySetHelper( : rBHelper( rBHelper_ ), aBoundLC( rBHelper_.rMutex ), aVetoableLC( rBHelper_.rMutex ), - m_bFireEvent(true), m_pReserved( new Impl( bIgnoreRuntimeExceptionsWhileFiring, 0 ) ) { } @@ -194,35 +194,50 @@ OPropertySetHelper::OPropertySetHelper( : rBHelper( rBHelper_ ), aBoundLC( rBHelper_.rMutex ), aVetoableLC( rBHelper_.rMutex ), - m_bFireEvent(true), m_pReserved( new Impl( bIgnoreRuntimeExceptionsWhileFiring, i_pFireEvents) ) { } +OPropertySetHelper2::OPropertySetHelper2( + OBroadcastHelper & irBHelper, + IEventNotificationHook *i_pFireEvents, + bool bIgnoreRuntimeExceptionsWhileFiring) + :OPropertySetHelper( irBHelper, i_pFireEvents, bIgnoreRuntimeExceptionsWhileFiring ) +{ +} + /** * You must call disposing before. */ OPropertySetHelper::~OPropertySetHelper() SAL_THROW( () ) { } +OPropertySetHelper2::~OPropertySetHelper2() SAL_THROW( () ) +{ +} -/** - * These method is called from queryInterface, if no delegator is set. - * Otherwise this method is called from the delegator. - */ -// XAggregation +// XInterface Any OPropertySetHelper::queryInterface( const ::com::sun::star::uno::Type & rType ) throw (RuntimeException) { return ::cppu::queryInterface( rType, static_cast< XPropertySet * >( this ), - static_cast< XPropertySetOption * >( this ), static_cast< XMultiPropertySet * >( this ), static_cast< XFastPropertySet * >( this ) ); } +Any OPropertySetHelper2::queryInterface( const ::com::sun::star::uno::Type & rType ) + throw (RuntimeException) +{ + Any cnd(cppu::queryInterface(rType, static_cast< XPropertySetOption * >(this))); + if ( cnd.hasValue() ) + return cnd; + else + return OPropertySetHelper::queryInterface(rType); +} + /** * called from the derivee's XTypeProvider::getTypes implementation */ @@ -631,10 +646,11 @@ void OPropertySetHelper::fire sal_Bool bVetoable ) { - if (!m_bFireEvent) + OSL_ENSURE( m_pReserved.get(), "No OPropertySetHelper::Impl" ); + + if (! m_pReserved->m_bFireEvents) return; - OSL_ENSURE( m_pReserved.get(), "No OPropertySetHelper::Impl" ); if (m_pReserved->m_pFireEvents) { m_pReserved->m_pFireEvents->fireEvents( pnHandles, nHandles, bVetoable, @@ -1037,10 +1053,10 @@ void OPropertySetHelper::firePropertiesChangeEvent( delete [] pHandles; } -void OPropertySetHelper::enableChangeListenerNotification( sal_Bool bEnable ) +void OPropertySetHelper2::enableChangeListenerNotification( sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException) { - m_bFireEvent = bEnable; + m_pReserved->m_bFireEvents = bEnable; } #ifdef xdvnsdfln |