diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-08 13:33:22 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-08 21:03:51 -0500 |
commit | 678de8255795e7f3b654bf2022da26a4fdb48775 (patch) | |
tree | 8962466c87472666abdd89a589b1782e1b941fbd /editeng | |
parent | 71135683d125ec81feee07d771d3dd6ffd0c0fd3 (diff) |
Let's not have "which" value in EditTextObject.
In fact, this value is always EE_FORMAT_BIN, and that's not going to
change.
Change-Id: I9324bf878b5766ef7a27461ba2bdf17742396f3d
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editeng/editobj.hxx | 7 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 14 |
2 files changed, 7 insertions, 14 deletions
diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index 9c0a438f1076..393892c4d6c5 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -48,12 +48,11 @@ class FieldUpdater; class EDITENG_DLLPUBLIC EditTextObject : public SfxItemPoolUser { private: - sal_uInt16 nWhich; EDITENG_DLLPRIVATE EditTextObject& operator=( const EditTextObject& ); protected: - EditTextObject( sal_uInt16 nWhich ); - EditTextObject( const EditTextObject& r ); + EditTextObject(); + EditTextObject( const EditTextObject& r ); virtual void StoreData( SvStream& rOStream ) const; virtual void CreateData( SvStream& rIStream ); @@ -61,8 +60,6 @@ protected: public: virtual ~EditTextObject(); - sal_uInt16 Which() const { return nWhich; } - virtual sal_uInt16 GetUserType() const; // For OutlinerMode, it can however not save in compatible format virtual void SetUserType( sal_uInt16 n ); diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 969017a92522..e4fa4cb61e25 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -179,16 +179,14 @@ bool ContentInfo::operator!=(const ContentInfo& rCompare) const return !operator==(rCompare); } -EditTextObject::EditTextObject( sal_uInt16 n) +EditTextObject::EditTextObject() { DBG_CTOR( EE_EditTextObject, 0 ); - nWhich = n; } -EditTextObject::EditTextObject( const EditTextObject& r ) +EditTextObject::EditTextObject( const EditTextObject& ) { DBG_CTOR( EE_EditTextObject, 0 ); - nWhich = r.nWhich; } EditTextObject::~EditTextObject() @@ -369,7 +367,8 @@ sal_Bool EditTextObject::Store( SvStream& rOStream ) const sal_Size nStartPos = rOStream.Tell(); - rOStream << (sal_uInt16)Which(); + sal_uInt16 nWhich = static_cast<sal_uInt16>(EE_FORMAT_BIN); + rOStream << nWhich; sal_uInt32 nStructSz = 0; rOStream << nStructSz; @@ -496,8 +495,7 @@ EditEngineItemPool* getEditEngineItemPool(SfxItemPool* pPool) return pRetval; } -EditTextObjectImpl::EditTextObjectImpl( SfxItemPool* pP ) : - EditTextObject( EE_FORMAT_BIN ) +EditTextObjectImpl::EditTextObjectImpl( SfxItemPool* pP ) { nVersion = 0; nMetric = 0xFFFF; @@ -685,8 +683,6 @@ String EditTextObjectImpl::GetText(size_t nPara) const void EditTextObjectImpl::Insert(const EditTextObject& rObj, size_t nDestPara) { - DBG_ASSERT( rObj.Which() == EE_FORMAT_BIN, "UTO: unknown Textobjekt" ); - const EditTextObjectImpl& rBinObj = (const EditTextObjectImpl&)rObj; if (nDestPara > aContents.size()) |