[Libreoffice-commits] .: Branch 'libreoffice-3-6' - cppuhelper/inc sal/inc

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Jun 13 23:37:56 PDT 2012


 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 ++++++++++
 sal/inc/rtl/ref.hxx                      |    2 ++
 15 files changed, 45 insertions(+), 2 deletions(-)

New commits:
commit 968bdedd8f8647945b1742f728a7ec7ab0733207
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 14 08:28:32 2012 +0200

    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
    (cherry picked from commit 271c4e2fe53c6fe159789db27507804133e72814)

diff --git a/cppuhelper/inc/cppuhelper/implbase.hxx b/cppuhelper/inc/cppuhelper/implbase.hxx
index 85051fb..1c2c438 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 c49c916..cf6125a 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 8a51770..3f7b37f 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 4c1a307..72a9368 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 934dfbe..b978169 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 b77947a..3ed5aac 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 88eef99..e25d648 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 cb9660c..2129e96 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 71446a5..9819199 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 dca9d86..6984108 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 93115a3..55df3cd 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 e37c0c9..4a3c536 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 a09d79b..023671a 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 2812617..cd71587 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.
diff --git a/sal/inc/rtl/ref.hxx b/sal/inc/rtl/ref.hxx
index 19c77a5..f8d2a1f 100644
--- a/sal/inc/rtl/ref.hxx
+++ b/sal/inc/rtl/ref.hxx
@@ -49,7 +49,9 @@ public:
      */
     virtual oslInterlockedCount SAL_CALL release() = 0;
 
+#if !defined _MSC_VER // public -> protected changes mangled names there
 protected:
+#endif
     ~IReference() {}
         // avoid warnings about virtual members and non-virtual dtor
 };


More information about the Libreoffice-commits mailing list