diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-03 01:53:40 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-03 10:20:10 -0400 |
commit | 05173270c11a997096671c035c18692cfd6b51dc (patch) | |
tree | 486ee3ab0b5a77c2f36f897fd89b442169a01f9f /editeng/source/editeng/editdoc.hxx | |
parent | 221cbbf64a20b87443f378fcb2ed22068867f494 (diff) |
Removed the last SC_DECL_PTRARR from editdoc.hxx.
Diffstat (limited to 'editeng/source/editeng/editdoc.hxx')
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 5bdce4cd589c..bd05ae1fb528 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -427,19 +427,28 @@ public: // ------------------------------------------------------------------------- // class TextPortionList // ------------------------------------------------------------------------- -typedef TextPortion* TextPortionPtr; -SV_DECL_PTRARR( TextPortionArray, TextPortionPtr, 0 ) - -class TextPortionList : public TextPortionArray +class TextPortionList { + typedef boost::ptr_vector<TextPortion> PortionsType; + PortionsType maPortions; + public: TextPortionList(); ~TextPortionList(); void Reset(); - sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False ) const; - sal_uInt16 GetStartPos( sal_uInt16 nPortion ); - void DeleteFromPortion( sal_uInt16 nDelFrom ); + size_t FindPortion( + sal_uInt16 nCharPos, sal_uInt16& rPortionStart, bool bPreferStartingPortion = false) const; + sal_uInt16 GetStartPos(size_t nPortion); + void DeleteFromPortion(size_t nDelFrom); + size_t Count() const; + const TextPortion* operator[](size_t nPos) const; + TextPortion* operator[](size_t nPos); + + void Append(TextPortion* p); + void Insert(size_t nPos, TextPortion* p); + void Remove(size_t nPos); + size_t GetPos(const TextPortion* p) const; }; class ParaPortion; |