Kaydet (Commit) 54253f38 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 172a96e5
...@@ -65,9 +65,10 @@ template<typename E, typename S> class SwIterator; ...@@ -65,9 +65,10 @@ template<typename E, typename S> class SwIterator;
namespace sw namespace sw
{ {
class ClientIteratorBase; 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) {}; LegacyModifyHint(const SfxPoolItem* pOld, const SfxPoolItem* pNew) : m_pOld(pOld), m_pNew(pNew) {};
virtual ~LegacyModifyHint();
const SfxPoolItem* m_pOld; const SfxPoolItem* m_pOld;
const SfxPoolItem* m_pNew; const SfxPoolItem* m_pNew;
}; };
......
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
namespace sw namespace sw
{ {
struct DocDisposingHint SAL_FINAL : public SfxHint struct SW_DLLPUBLIC DocDisposingHint SAL_FINAL : public SfxHint
{ {
DocDisposingHint() {}; DocDisposingHint() {}
virtual ~DocDisposingHint();
}; };
} }
......
...@@ -96,9 +96,7 @@ public: ...@@ -96,9 +96,7 @@ public:
void testTdf86639(); void testTdf86639();
void testTdf90883TableBoxGetCoordinates(); void testTdf90883TableBoxGetCoordinates();
void testEmbeddedDataSource(); void testEmbeddedDataSource();
#if 0
void testUnoCursorPointer(); void testUnoCursorPointer();
#endif
CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward); CPPUNIT_TEST(testReplaceForward);
...@@ -137,9 +135,7 @@ public: ...@@ -137,9 +135,7 @@ public:
CPPUNIT_TEST(testTdf86639); CPPUNIT_TEST(testTdf86639);
CPPUNIT_TEST(testTdf90883TableBoxGetCoordinates); CPPUNIT_TEST(testTdf90883TableBoxGetCoordinates);
CPPUNIT_TEST(testEmbeddedDataSource); CPPUNIT_TEST(testEmbeddedDataSource);
#if 0
CPPUNIT_TEST(testUnoCursorPointer); CPPUNIT_TEST(testUnoCursorPointer);
#endif
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -1030,7 +1026,6 @@ void SwUiWriterTest::testEmbeddedDataSource() ...@@ -1030,7 +1026,6 @@ void SwUiWriterTest::testEmbeddedDataSource()
#endif #endif
} }
#if 0
void SwUiWriterTest::testUnoCursorPointer() void SwUiWriterTest::testUnoCursorPointer()
{ {
auto xDocComponent(loadFromDesktop( auto xDocComponent(loadFromDesktop(
...@@ -1049,7 +1044,6 @@ void SwUiWriterTest::testUnoCursorPointer() ...@@ -1049,7 +1044,6 @@ void SwUiWriterTest::testUnoCursorPointer()
xDocComponent->dispose(); xDocComponent->dispose();
CPPUNIT_ASSERT(!static_cast<bool>(pCursor)); CPPUNIT_ASSERT(!static_cast<bool>(pCursor));
} }
#endif
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <swcache.hxx> #include <swcache.hxx>
#include <swfntcch.hxx> #include <swfntcch.hxx>
sw::LegacyModifyHint::~LegacyModifyHint() {}
TYPEINIT0( SwClient ); TYPEINIT0( SwClient );
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <rootfrm.hxx> #include <rootfrm.hxx>
#include <calbck.hxx> #include <calbck.hxx>
sw::DocDisposingHint::~DocDisposingHint() {}
IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr ) IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing ) SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment