summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-10 15:24:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-10 15:31:54 +0200
commit54253f382e77483b2831af82cf90e2afb0cd55db (patch)
tree4eef01996551c8a8cfc5705f68c3c4acf618397a /sw
parent172a96e5246c7847313838464c671dccfd564ab8 (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/calbck.hxx3
-rw-r--r--sw/inc/unocrsr.hxx5
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx6
-rw-r--r--sw/source/core/attr/calbck.cxx1
-rw-r--r--sw/source/core/unocore/unocrsr.cxx2
5 files changed, 8 insertions, 9 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index ce8bd7a9839a..db28e0bc5297 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 6f382ef8870c..32006a4db909 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 154560592a13..57af4a8d058d 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 127a7749a2ae..f3a4aa0a33b4 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 bca0bb79f859..04f30ceea2f0 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 )