summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-11-30 01:27:26 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-02 00:33:18 +0100
commit9e4e7b2f454a5a3ccd619e9789461d474c2dacc7 (patch)
treed236ce9a18cd036c626ad0965ed6ef0fb62e44a6 /sw
parent759ae3c367f63ee006cfa8f4239ddcc1302b5879 (diff)
test intrusive
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/editsh.hxx4
-rw-r--r--sw/inc/pam.hxx2
-rw-r--r--sw/inc/ring.hxx2
-rw-r--r--sw/qa/core/uwriter.cxx6
4 files changed, 13 insertions, 1 deletions
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 <vector>
#include <set>
#include <swundo.hxx>
+#include <ring.hxx>
#include <svtools/embedhlp.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
@@ -138,9 +139,12 @@ typedef boost::ptr_vector<SwGetINetAttr> SwGetINetAttrs;
#define CNT_HasGrf(USH) ((USH)&CNT_GRF)
#define CNT_HasOLE(USH) ((USH)&CNT_OLE)
+typedef boost::intrusive::member_hook<Ring, boost::intrusive::list_member_hook<>, &Ring::m_aHook> MemberHookOption;
+typedef boost::intrusive::list<Ring, MemberHookOption> 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 <swdllapi.h>
#include <swtypes.hxx>
+#include <boost/intrusive/list.hpp>
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();