From 9e4e7b2f454a5a3ccd619e9789461d474c2dacc7 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Sun, 30 Nov 2014 01:27:26 +0100 Subject: test intrusive --- sw/inc/editsh.hxx | 4 ++++ sw/inc/pam.hxx | 2 +- sw/inc/ring.hxx | 2 ++ sw/qa/core/uwriter.cxx | 6 ++++++ 4 files changed, 13 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index b59cc50e94cc..f74b797e9267 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -138,9 +139,12 @@ typedef boost::ptr_vector SwGetINetAttrs; #define CNT_HasGrf(USH) ((USH)&CNT_GRF) #define CNT_HasOLE(USH) ((USH)&CNT_OLE) +typedef boost::intrusive::member_hook, &Ring::m_aHook> MemberHookOption; +typedef boost::intrusive::list RingList; class SW_DLLPUBLIC SwEditShell: public SwCrsrShell { static SvxSwAutoFmtFlags* pAutoFmtFlags; + RingList m_aList; /// For the private methods DelRange and those of AutoCorrect. friend class SwAutoFormat; diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 86144536dbec..b5a7357ba00e 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -154,7 +154,7 @@ extern SwGoInDoc fnGoCntntCellsSkipHidden; void _InitPam(); /// PaM is Point and Mark: a selection of the document model. -class SW_DLLPUBLIC SwPaM : public Ring +class SW_DLLPUBLIC SwPaM : public Ring { SwPosition m_Bound1; SwPosition m_Bound2; diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx index 5d8e7dee0763..25697c9b120e 100644 --- a/sw/inc/ring.hxx +++ b/sw/inc/ring.hxx @@ -21,6 +21,7 @@ #include #include +#include class SW_DLLPUBLIC Ring { @@ -39,6 +40,7 @@ public: Ring* GetPrev() const { return pPrev; } sal_uInt32 numberOf() const; + boost::intrusive::list_member_hook<> m_aHook; }; #endif diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 71409b861fb1..cb6b1b7ff662 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -100,6 +100,7 @@ public: void testGraphicAnchorDeletion(); void testTransliterate(); void testMarkMove(); + void testInstrusiveList(); CPPUNIT_TEST_SUITE(SwDocTest); CPPUNIT_TEST(testTransliterate); @@ -127,6 +128,7 @@ public: CPPUNIT_TEST(testUserPerceivedCharCount); CPPUNIT_TEST(testGraphicAnchorDeletion); CPPUNIT_TEST(testMarkMove); + CPPUNIT_TEST(testInstrusiveList); CPPUNIT_TEST_SUITE_END(); private: @@ -1269,6 +1271,10 @@ void SwDocTest::testMarkMove() pBM3->GetMarkEnd().nNode.GetIndex()); } +void SwDocTest::testInstrusiveList() +{ +} + void SwDocTest::setUp() { BootstrapFixture::setUp(); -- cgit