[Libreoffice-commits] core.git: sw/inc sw/qa sw/source

Stephan Bergmann sbergman at redhat.com
Wed Jun 10 06:32:22 PDT 2015


 sw/inc/calbck.hxx                  |    3 ++-
 sw/inc/unocrsr.hxx                 |    5 +++--
 sw/qa/extras/uiwriter/uiwriter.cxx |    6 ------
 sw/source/core/attr/calbck.cxx     |    1 +
 sw/source/core/unocore/unocrsr.cxx |    2 ++
 5 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 54253f382e77483b2831af82cf90e2afb0cd55db
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jun 10 15:24:18 2015 +0200

    Ensure single RTTI symbol instance
    
    ...to make typeid comparison in sw::UnoCursorPointer::SwClientNotify work also
    under the Itanium C++ ABI/libc++ semantics (as used on Mac OS X), not only the
    less strict GCC/libstc++ semantics (as typically used on Linux).  This caused
    CppunitTest_sw_uiwriter's testUnoCursorPointer to fail on Mac OS X.
    (DocDisposingHint and LegacyModifyHint need to be SW_DLLPUBLIC even though they
    are nominally only used inside the sw library, because they are also used from
    the CppunitTest_sw_uiwriter test code.)
    
    Change-Id: Ideceade22ca3049ae287aea468de93c72bee5fdc

diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index ce8bd7a..db28e0b 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -65,9 +65,10 @@ template<typename E, typename S> class SwIterator;
 namespace sw
 {
     class ClientIteratorBase;
-    struct LegacyModifyHint SAL_FINAL: SfxHint
+    struct SW_DLLPUBLIC LegacyModifyHint SAL_FINAL: SfxHint
     {
         LegacyModifyHint(const SfxPoolItem* pOld, const SfxPoolItem* pNew) : m_pOld(pOld), m_pNew(pNew) {};
+        virtual ~LegacyModifyHint();
         const SfxPoolItem* m_pOld;
         const SfxPoolItem* m_pNew;
     };
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 6f382ef..32006a4 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -24,9 +24,10 @@
 
 namespace sw
 {
-    struct DocDisposingHint SAL_FINAL : public SfxHint
+    struct SW_DLLPUBLIC DocDisposingHint SAL_FINAL : public SfxHint
     {
-        DocDisposingHint() {};
+        DocDisposingHint() {}
+        virtual ~DocDisposingHint();
     };
 }
 
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 1545605..57af4a8 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -96,9 +96,7 @@ public:
     void testTdf86639();
     void testTdf90883TableBoxGetCoordinates();
     void testEmbeddedDataSource();
-#if 0
     void testUnoCursorPointer();
-#endif
 
     CPPUNIT_TEST_SUITE(SwUiWriterTest);
     CPPUNIT_TEST(testReplaceForward);
@@ -137,9 +135,7 @@ public:
     CPPUNIT_TEST(testTdf86639);
     CPPUNIT_TEST(testTdf90883TableBoxGetCoordinates);
     CPPUNIT_TEST(testEmbeddedDataSource);
-#if 0
     CPPUNIT_TEST(testUnoCursorPointer);
-#endif
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1030,7 +1026,6 @@ void SwUiWriterTest::testEmbeddedDataSource()
 #endif
 }
 
-#if 0
 void SwUiWriterTest::testUnoCursorPointer()
 {
     auto xDocComponent(loadFromDesktop(
@@ -1049,7 +1044,6 @@ void SwUiWriterTest::testUnoCursorPointer()
     xDocComponent->dispose();
     CPPUNIT_ASSERT(!static_cast<bool>(pCursor));
 }
-#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index 127a774..f3a4aa0 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -23,6 +23,7 @@
 #include <swcache.hxx>
 #include <swfntcch.hxx>
 
+sw::LegacyModifyHint::~LegacyModifyHint() {}
 
 TYPEINIT0( SwClient );
 
diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx
index bca0bb7..04f30ce 100644
--- a/sw/source/core/unocore/unocrsr.cxx
+++ b/sw/source/core/unocore/unocrsr.cxx
@@ -25,6 +25,8 @@
 #include <rootfrm.hxx>
 #include <calbck.hxx>
 
+sw::DocDisposingHint::~DocDisposingHint() {}
+
 IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
 
 SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing )


More information about the Libreoffice-commits mailing list