Kaydet (Commit) 1bcd2c94 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Just use the internal item pool already written for the edit engine.

üst c510670e
......@@ -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);
......
......@@ -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>
......
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