summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-04-11 21:27:34 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-04-11 21:27:34 -0400
commit1bcd2c94930c95c1807c6112559f5b0041aeb4fa (patch)
tree6a64a91d0954d46d8854a55b4372915d3b0b3e5f /editeng
parentc510670e3cab5322ed82e5702f6f6e311c9823f6 (diff)
Just use the internal item pool already written for the edit engine.
Diffstat (limited to 'editeng')
-rw-r--r--editeng/qa/unit/core-test.cxx73
-rw-r--r--editeng/source/editeng/editdoc.hxx4
2 files changed, 6 insertions, 71 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 66707fa5ec05..e5c556fea151 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -40,75 +40,10 @@
#include "editeng/editeng.hxx"
#include "editeng/eeitem.hxx"
#include "editeng/editids.hrc"
+#include "editeng/editdoc.hxx"
namespace {
-const SfxItemInfo aItemInfos[] = {
- { SID_ATTR_FRAMEDIRECTION, SFX_ITEM_POOLABLE }, // EE_PARA_WRITINGDIR
- { 0, SFX_ITEM_POOLABLE }, // EE_PARA_XMLATTRIBS
- { SID_ATTR_PARA_HANGPUNCTUATION, SFX_ITEM_POOLABLE }, // EE_PARA_HANGINGPUNCTUATION
- { SID_ATTR_PARA_FORBIDDEN_RULES, SFX_ITEM_POOLABLE },
- { SID_ATTR_PARA_SCRIPTSPACE, SFX_ITEM_POOLABLE }, // EE_PARA_ASIANCJKSPACING
- { SID_ATTR_NUMBERING_RULE, SFX_ITEM_POOLABLE }, // EE_PARA_NUMBULL
- { 0, SFX_ITEM_POOLABLE }, // EE_PARA_HYPHENATE
- { 0, SFX_ITEM_POOLABLE }, // EE_PARA_BULLETSTATE
- { 0, SFX_ITEM_POOLABLE }, // EE_PARA_OUTLLRSPACE
- { SID_ATTR_PARA_OUTLLEVEL, SFX_ITEM_POOLABLE }, // EE_PARA_OUTLLEVEL
- { SID_ATTR_PARA_BULLET, SFX_ITEM_POOLABLE }, // EE_PARA_BULLET
- { SID_ATTR_LRSPACE, SFX_ITEM_POOLABLE }, // EE_PARA_LRSPACE
- { SID_ATTR_ULSPACE, SFX_ITEM_POOLABLE }, // EE_PARA_ULSPACE
- { SID_ATTR_PARA_LINESPACE, SFX_ITEM_POOLABLE }, // EE_PARA_SBL
- { SID_ATTR_PARA_ADJUST, SFX_ITEM_POOLABLE }, // EE_PARA_JUST
- { SID_ATTR_TABSTOP, SFX_ITEM_POOLABLE }, // EE_PARA_TABS
- { SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD, SFX_ITEM_POOLABLE }, // EE_PARA_JUST_METHOD
- { SID_ATTR_ALIGN_VER_JUSTIFY, SFX_ITEM_POOLABLE }, // EE_PARA_VER_JUST
- { SID_ATTR_CHAR_COLOR, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_FONT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_FONTHEIGHT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_SCALEWIDTH, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_WEIGHT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_UNDERLINE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_STRIKEOUT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_POSTURE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CONTOUR, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_SHADOWED, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_ESCAPEMENT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_AUTOKERN, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_KERNING, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_WORDLINEMODE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_LANGUAGE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CJK_LANGUAGE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CTL_LANGUAGE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CJK_FONT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CTL_FONT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CJK_FONTHEIGHT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CTL_FONTHEIGHT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CJK_WEIGHT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CTL_WEIGHT, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CJK_POSTURE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_CTL_POSTURE, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_EMPHASISMARK, SFX_ITEM_POOLABLE },
- { SID_ATTR_CHAR_RELIEF, SFX_ITEM_POOLABLE },
- { 0, SFX_ITEM_POOLABLE }, // EE_CHAR_RUBI_DUMMY
- { 0, SFX_ITEM_POOLABLE }, // EE_CHAR_XMLATTRIBS
- { SID_ATTR_CHAR_OVERLINE, SFX_ITEM_POOLABLE },
- { 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_TAB
- { 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_LINEBR
- { SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEM_POOLABLE }, // EE_FEATURE_NOTCONV
- { SID_FIELD, SFX_ITEM_POOLABLE }
-};
-
-class TestPool : public SfxItemPool
-{
-public:
- TestPool() : SfxItemPool("TestPool", EE_ITEMS_START, EE_ITEMS_END, aItemInfos, NULL, true)
- {
- SfxPoolItem** ppDefItems = EditDLL::Get().GetGlobalData()->GetDefItems();
- SetDefaults(ppDefItems);
- }
- virtual ~TestPool() {}
-};
-
class Test : public test::BootstrapFixture
{
public:
@@ -125,9 +60,9 @@ Test::Test() {}
void Test::testConstruction()
{
- TestPool aPool;
-
- EditEngine aEngine(&aPool);
+ EditEngineItemPool* pPool = new EditEngineItemPool(true);
+ EditEngine aEngine(pPool);
+ SfxItemPool::Free(pPool);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 27c5b142253e..afd1398ef06e 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -31,8 +31,8 @@
#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
-#include <editattr.hxx>
-#include <edtspell.hxx>
+#include "editattr.hxx"
+#include "edtspell.hxx"
#include <editeng/svxfont.hxx>
#include <svl/itemset.hxx>
#include <svl/style.hxx>