From 271c4e2fe53c6fe159789db27507804133e72814 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 14 Jun 2012 08:28:32 +0200 Subject: Revert MSVC ABI incompatible URE change (public -> protected) ...the mangled names of the corresponding symbols change with MSVC if you change a member from public to protected. This had been changed with 6e67c03dc0225fc66343546b14e902b9d238b1a3 "Enable -Wnon-virtual-dtor for GCC 4.6" but should only be necessary for GCC, not for MSVC, so can simply be reverted under _MSC_VER. Change-Id: Id22aadaff3d7f30ed824f39fe22eab7ca39bd408 --- cppuhelper/inc/cppuhelper/implbase.hxx | 11 +++++++++-- cppuhelper/inc/cppuhelper/implbase1.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase10.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase11.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase12.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase2.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase3.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase4.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase5.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase6.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase7.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase8.hxx | 2 ++ cppuhelper/inc/cppuhelper/implbase9.hxx | 2 ++ cppuhelper/inc/cppuhelper/propshlp.hxx | 10 ++++++++++ 14 files changed, 43 insertions(+), 2 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/inc/cppuhelper/implbase.hxx b/cppuhelper/inc/cppuhelper/implbase.hxx index 85051fb407a2..1c2c438918c0 100644 --- a/cppuhelper/inc/cppuhelper/implbase.hxx +++ b/cppuhelper/inc/cppuhelper/implbase.hxx @@ -157,6 +157,12 @@ CPPUHELPER_DLLPUBLIC ::osl::Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_TH //================================================================================================== +#if defined _MSC_VER // public -> protected changes mangled names there +#define CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED public +#else +#define CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED protected +#endif + /** Implementation helper macros Not for common use. There are expanded forms of the macro usage in implbaseN.hxx/compbaseN.hxx. So there is commonly no need to use these macros. Though, you may need to implement more than @@ -185,8 +191,9 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelperBase##N \ : public ::com::sun::star::lang::XTypeProvider \ , __PUBLIC_IFC##N \ { \ -protected: \ +CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED: \ ~ImplHelperBase##N() throw () {} \ +protected: \ ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) SAL_THROW(()) \ { \ ClassData & rCD = * static_cast< ClassData * >( &s_aCD ); \ @@ -222,7 +229,7 @@ public: \ { return this->getClassData( s_aCD ).getTypes(); } \ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ { return this->getClassData( s_aCD ).getImplementationId(); } \ -protected: \ +CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED: \ ~ImplHelper##N() throw () {} \ }; \ template< __CLASS_IFC##N > \ diff --git a/cppuhelper/inc/cppuhelper/implbase1.hxx b/cppuhelper/inc/cppuhelper/implbase1.hxx index c49c9162a14c..cf6125a2200b 100644 --- a/cppuhelper/inc/cppuhelper/implbase1.hxx +++ b/cppuhelper/inc/cppuhelper/implbase1.hxx @@ -86,7 +86,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper1() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase10.hxx b/cppuhelper/inc/cppuhelper/implbase10.hxx index 8a51770601f3..3f7b37f9b1c1 100644 --- a/cppuhelper/inc/cppuhelper/implbase10.hxx +++ b/cppuhelper/inc/cppuhelper/implbase10.hxx @@ -95,7 +95,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper10() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase11.hxx b/cppuhelper/inc/cppuhelper/implbase11.hxx index 4c1a307ae116..72a9368d69f6 100644 --- a/cppuhelper/inc/cppuhelper/implbase11.hxx +++ b/cppuhelper/inc/cppuhelper/implbase11.hxx @@ -96,7 +96,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper11() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase12.hxx b/cppuhelper/inc/cppuhelper/implbase12.hxx index 934dfbe55b83..b9781690df23 100644 --- a/cppuhelper/inc/cppuhelper/implbase12.hxx +++ b/cppuhelper/inc/cppuhelper/implbase12.hxx @@ -97,7 +97,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper12() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase2.hxx b/cppuhelper/inc/cppuhelper/implbase2.hxx index b77947a8cdc8..3ed5aacf90d5 100644 --- a/cppuhelper/inc/cppuhelper/implbase2.hxx +++ b/cppuhelper/inc/cppuhelper/implbase2.hxx @@ -86,7 +86,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper2() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase3.hxx b/cppuhelper/inc/cppuhelper/implbase3.hxx index 88eef99e45af..e25d6481954e 100644 --- a/cppuhelper/inc/cppuhelper/implbase3.hxx +++ b/cppuhelper/inc/cppuhelper/implbase3.hxx @@ -87,7 +87,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper3() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase4.hxx b/cppuhelper/inc/cppuhelper/implbase4.hxx index cb9660cb34aa..2129e9602a02 100644 --- a/cppuhelper/inc/cppuhelper/implbase4.hxx +++ b/cppuhelper/inc/cppuhelper/implbase4.hxx @@ -89,7 +89,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper4() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase5.hxx b/cppuhelper/inc/cppuhelper/implbase5.hxx index 71446a5ff72e..98191999f6b9 100644 --- a/cppuhelper/inc/cppuhelper/implbase5.hxx +++ b/cppuhelper/inc/cppuhelper/implbase5.hxx @@ -90,7 +90,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper5() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase6.hxx b/cppuhelper/inc/cppuhelper/implbase6.hxx index dca9d86ac2e6..6984108f94e6 100644 --- a/cppuhelper/inc/cppuhelper/implbase6.hxx +++ b/cppuhelper/inc/cppuhelper/implbase6.hxx @@ -91,7 +91,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper6() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase7.hxx b/cppuhelper/inc/cppuhelper/implbase7.hxx index 93115a38873f..55df3cdc4525 100644 --- a/cppuhelper/inc/cppuhelper/implbase7.hxx +++ b/cppuhelper/inc/cppuhelper/implbase7.hxx @@ -92,7 +92,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper7() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase8.hxx b/cppuhelper/inc/cppuhelper/implbase8.hxx index e37c0c96e206..4a3c536fc185 100644 --- a/cppuhelper/inc/cppuhelper/implbase8.hxx +++ b/cppuhelper/inc/cppuhelper/implbase8.hxx @@ -93,7 +93,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper8() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/implbase9.hxx b/cppuhelper/inc/cppuhelper/implbase9.hxx index a09d79b0a681..023671a8f5f2 100644 --- a/cppuhelper/inc/cppuhelper/implbase9.hxx +++ b/cppuhelper/inc/cppuhelper/implbase9.hxx @@ -94,7 +94,9 @@ namespace cppu virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) { return ImplHelper_getImplementationId( cd::get() ); } +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~ImplHelper9() throw () {} }; /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and diff --git a/cppuhelper/inc/cppuhelper/propshlp.hxx b/cppuhelper/inc/cppuhelper/propshlp.hxx index 2812617d8f28..cd71587fb3c7 100644 --- a/cppuhelper/inc/cppuhelper/propshlp.hxx +++ b/cppuhelper/inc/cppuhelper/propshlp.hxx @@ -335,7 +335,9 @@ public: sal_Bool bVetoable, bool bIgnoreRuntimeExceptionsWhileFiring) = 0; +#if !defined _MSC_VER // public -> protected changes mangled names there protected: +#endif ~IEventNotificationHook() {} // avoid warnings about virtual members and non-virtual dtor }; @@ -660,7 +662,11 @@ private: sal_Int32 i_count ); +#if defined _MSC_VER // public -> protected changes mangled names there +public: +#else protected: +#endif // Suppress warning about virtual functions but non-virtual destructor: #if defined _MSC_VER #pragma warning(push) @@ -705,7 +711,11 @@ private: OPropertySetHelper2( const OPropertySetHelper2 & ) SAL_THROW(()); OPropertySetHelper2 & operator = ( const OPropertySetHelper2 & ) SAL_THROW(()); +#if defined _MSC_VER // public -> protected changes mangled names there +public: +#else protected: +#endif // Suppress warning about virtual functions but non-virtual destructor: /** You must call disposing before destruction. -- cgit