diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-01 17:09:14 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-03 20:28:17 -0400 |
commit | 2cf292d9a7ee3667a35350fd949b0cbf4024a8b3 (patch) | |
tree | 7ebb9c24cab19a1d271ac3580075430a06d87030 /editeng | |
parent | aabbb0a4d15671f00ced2d9d21395c1574d63cd0 (diff) |
Have the table field item store sheet ID.
I forgot to commit this change...
Change-Id: Ifcdbb2b16cf31b180393ea9b4188171c6cfe9963
Diffstat (limited to 'editeng')
-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*/ ) |