[Libreoffice-commits] core.git: editeng/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.com
Mon Mar 10 15:06:35 PDT 2014
editeng/source/editeng/editattr.cxx | 9 +++++++++
editeng/source/editeng/editattr.hxx | 9 +++++++++
editeng/source/editeng/editdoc.cxx | 17 +++++++++++++++++
editeng/source/editeng/eerdll.cxx | 11 +++++------
4 files changed, 40 insertions(+), 6 deletions(-)
New commits:
commit 9e3f0a31845a79d472dc4467b3b6119615652331
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Mon Mar 10 23:03:01 2014 +0100
editeng: register GrabBag as a Char attribute
and hopefully this fixes the tests..
Change-Id: Ib736ee1c0bfcebb2515009ddad7e3c76cb58a095
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index ceab005..9091bca 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -23,6 +23,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
+#include <svl/grabbagitem.hxx>
#include <editeng/svxfont.hxx>
#include <editeng/flditem.hxx>
#include <editeng/fontitem.hxx>
@@ -450,4 +451,12 @@ void EditCharAttribRelief::SetFont( SvxFont& rFont, OutputDevice* )
rFont.SetRelief( (FontRelief)((const SvxCharReliefItem*)GetItem())->GetValue() );
}
+// class EditCharAttribGrabBag
+
+EditCharAttribGrabBag::EditCharAttribGrabBag( const SfxGrabBagItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
+ : EditCharAttrib( rAttr, _nStart, _nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_GRABBAG, "Not a grab bage attribute!" );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx
index 871adcc..baae459 100644
--- a/editeng/source/editeng/editattr.hxx
+++ b/editeng/source/editeng/editattr.hxx
@@ -48,6 +48,7 @@ class SvxCharReliefItem;
class SfxVoidItem;
class OutputDevice;
class SvxCaseMapItem;
+class SfxGrabBagItem;
#define CH_FEATURE_OLD (sal_uInt8) 0xFF
#define CH_FEATURE (sal_Unicode) 0x01
@@ -403,6 +404,14 @@ public:
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
};
+// class EditCharAttribGrabBag
+
+class EditCharAttribGrabBag: public EditCharAttrib
+{
+public:
+ EditCharAttribGrabBag( const SfxGrabBagItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
+};
+
#endif // INCLUDED_EDITENG_SOURCE_EDITENG_EDITATTR_HXX
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index aa82606..c1e8909 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -215,6 +215,7 @@ const SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
{ 0, SFX_ITEM_POOLABLE }, // EE_CHAR_XMLATTRIBS
{ SID_ATTR_CHAR_OVERLINE, SFX_ITEM_POOLABLE },
{ SID_ATTR_CHAR_CASEMAP, SFX_ITEM_POOLABLE }, // EE_CHAR_CASEMAP
+ { 0, SFX_ITEM_POOLABLE }, // EE_CHAR_GRABBAG
{ 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_TAB
{ 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_LINEBR
{ SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEM_POOLABLE }, // EE_FEATURE_NOTCONV
@@ -254,6 +255,16 @@ const sal_uInt16 aV5Map[] = {
4035, 4036, 4037, 4038
};
+const sal_uInt16 aV6Map[] = {
+ 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
+ 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
+ 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023,
+ 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033,
+ 4035, 4036, 4037, 4038,
+ /* EE_CHAR_GRABBAG inserted here */
+ 4039
+};
+
EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_Int32 nS, sal_Int32 nE )
{
// Create a new attribute in the pool
@@ -372,6 +383,11 @@ EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sa
pNew = new EditCharAttribCaseMap( (const SvxCaseMapItem&)rNew, nS, nE );
}
break;
+ case EE_CHAR_GRABBAG:
+ {
+ pNew = new EditCharAttribGrabBag( (const SfxGrabBagItem&)rNew, nS, nE );
+ }
+ break;
case EE_FEATURE_TAB:
{
pNew = new EditCharAttribTab( (const SfxVoidItem&)rNew, nS );
@@ -2985,6 +3001,7 @@ EditEngineItemPool::EditEngineItemPool( sal_Bool bPersistenRefCounts )
SetVersionMap( 3, 3997, 4020, aV3Map );
SetVersionMap( 4, 3994, 4022, aV4Map );
SetVersionMap( 5, 3994, 4037, aV5Map );
+ SetVersionMap( 6, 3994, 4038, aV6Map );
SfxPoolItem** ppDefItems = EE_DLL().GetGlobalData()->GetDefItems();
SetDefaults( ppDefItems );
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 05d1bfb..95c0bc6 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -155,13 +155,12 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems[46] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS );
ppDefItems[47] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
ppDefItems[48] = new SvxCaseMapItem( SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP );
-
+ ppDefItems[49] = new SfxGrabBagItem( EE_CHAR_GRABBAG );
// Features
- ppDefItems[49] = new SfxVoidItem( EE_FEATURE_TAB );
- ppDefItems[50] = new SfxVoidItem( EE_FEATURE_LINEBR );
- ppDefItems[51] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
- ppDefItems[52] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
- ppDefItems[53] = new SfxGrabBagItem( EE_CHAR_GRABBAG );
+ ppDefItems[50] = new SfxVoidItem( EE_FEATURE_TAB );
+ ppDefItems[51] = new SfxVoidItem( EE_FEATURE_LINEBR );
+ ppDefItems[52] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
+ ppDefItems[53] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
DBG_ASSERT( EDITITEMCOUNT == 54, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
More information about the Libreoffice-commits
mailing list