diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-02 14:15:15 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-03 10:20:05 -0400 |
commit | 79bd9550d368ab8c9d636476b6df6521218e40ef (patch) | |
tree | 899efd4eb577cc0ce0b0340019df95ea3fe7891b /editeng/source/editeng/editdoc.hxx | |
parent | 581cf10b90349bb91297f9f5a374098afe13cabf (diff) |
Merged ContentList into EditDoc.
There is no reason for this separation to exist.
Diffstat (limited to 'editeng/source/editeng/editdoc.hxx')
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 147fc90bef46..bd967ca476e0 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -301,27 +301,6 @@ public: sal_Bool IsFeature( sal_uInt16 nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); } }; -class ContentList -{ - mutable size_t nLastCache; - boost::ptr_vector<ContentNode> maContents; -public: - ContentList(); - size_t GetPos(const ContentNode* p) const; - const ContentNode* GetObject(size_t nPos) const; - ContentNode* GetObject(size_t nPos); - const ContentNode* operator[](size_t nPos) const; - ContentNode* operator[](size_t nPos); - - void Insert(size_t nPos, ContentNode* p); - /// deletes - void Remove(size_t nPos); - /// does not delete - void Release(size_t nPos); - size_t Count() const; - void Clear(); -}; - // ------------------------------------------------------------------------- // class EditPaM // ------------------------------------------------------------------------- @@ -703,7 +682,7 @@ public: sal_Bool IsInvalid() const; sal_Bool DbgIsBuggy( EditDoc& rDoc ); - sal_Bool Adjust( const ContentList& rNodes ); + sal_Bool Adjust( const EditDoc& rNodes ); EditSelection& operator = ( const EditPaM& r ); sal_Bool operator == ( const EditSelection& r ) const @@ -736,9 +715,12 @@ SV_DECL_PTRARR( DeletedNodesList, DeletedNodeInfoPtr, 0 ) // ------------------------------------------------------------------------- // class EditDoc // ------------------------------------------------------------------------- -class EditDoc : public ContentList +class EditDoc { private: + mutable size_t nLastCache; + boost::ptr_vector<ContentNode> maContents; + SfxItemPool* pItemPool; Link aModifyHdl; @@ -804,10 +786,21 @@ public: sal_Bool RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 ); void FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet ); - sal_uInt16 GetPos( const ContentNode* pNode ) const { return ContentList::GetPos(pNode); } const ContentNode* SafeGetObject(size_t nPos) const; ContentNode* SafeGetObject(size_t nPos); + size_t GetPos(const ContentNode* pNode) const; + const ContentNode* GetObject(size_t nPos) const; + ContentNode* GetObject(size_t nPos); + size_t Count() const; + const ContentNode* operator[](size_t nPos) const; + ContentNode* operator[](size_t nPos); + void Insert(size_t nPos, ContentNode* p); + /// deletes + void Remove(size_t nPos); + /// does not delete + void Release(size_t nPos); + static XubString GetSepStr( LineEnd eEnd ); }; |