diff options
-rw-r--r-- | editeng/inc/editeng/flditem.hxx | 5 | ||||
-rw-r--r-- | editeng/source/items/flditem.cxx | 21 |
2 files changed, 23 insertions, 3 deletions
diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx index 4b85be9e4074..933f3e27b543 100644 --- a/editeng/inc/editeng/flditem.hxx +++ b/editeng/inc/editeng/flditem.hxx @@ -237,9 +237,14 @@ public: class EDITENG_DLLPUBLIC SvxTableField : public SvxFieldData { + int mnTab; public: SV_DECL_PERSIST1( SvxTableField, SvxFieldData, SVX_TABLEFIELD ) SvxTableField(); + SvxTableField(int nTab); + + void SetTab(int nTab); + int GetTab() const; virtual SvxFieldData* Clone() const; virtual int operator==( const SvxFieldData& ) const; diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index fb1647998e1a..5b5361dd93be 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -535,16 +535,31 @@ void SvxFileField::Save( SvPersistStream & /*rStm*/ ) SV_IMPL_PERSIST1( SvxTableField, SvxFieldData ); -SvxTableField::SvxTableField() {} +SvxTableField::SvxTableField() : mnTab(0) {} + +SvxTableField::SvxTableField(int nTab) : mnTab(nTab) {} + +void SvxTableField::SetTab(int nTab) +{ + mnTab = nTab; +} + +int SvxTableField::GetTab() const +{ + return mnTab; +} SvxFieldData* SvxTableField::Clone() const { - return new SvxTableField; // empty + return new SvxTableField(mnTab); } int SvxTableField::operator==( const SvxFieldData& rCmp ) const { - return ( rCmp.Type() == TYPE(SvxTableField) ); + if (rCmp.Type() != TYPE(SvxTableField)) + return false; + + return mnTab == static_cast<const SvxTableField&>(rCmp).mnTab; } void SvxTableField::Load( SvPersistStream & /*rStm*/ ) |