From ed381a77fc846ec5d42d2f19c6470f4dbb7bb0bf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 10 Nov 2015 14:28:26 +0200 Subject: editeng: boost::ptr_vector->std::vector Change-Id: I8fc80274e7eb33c81062f8514f63e6d0682d1b8f --- editeng/source/editeng/editdoc.cxx | 10 +++++----- editeng/source/editeng/editdoc.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'editeng/source') diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index a0abc5b1aee2..31a5786a2dc1 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1125,7 +1125,7 @@ sal_Int32 EditLineList::FindLine(sal_Int32 nChar, bool bInclEnd) sal_Int32 n = maLines.size(); for (sal_Int32 i = 0; i < n; ++i) { - const EditLine& rLine = maLines[i]; + const EditLine& rLine = *maLines[i].get(); if ( (bInclEnd && (rLine.GetEnd() >= nChar)) || (rLine.GetEnd() > nChar) ) { @@ -1144,22 +1144,22 @@ sal_Int32 EditLineList::Count() const const EditLine& EditLineList::operator[](sal_Int32 nPos) const { - return maLines[nPos]; + return *maLines[nPos].get(); } EditLine& EditLineList::operator[](sal_Int32 nPos) { - return maLines[nPos]; + return *maLines[nPos].get(); } void EditLineList::Append(EditLine* p) { - maLines.push_back(p); + maLines.push_back(std::unique_ptr(p)); } void EditLineList::Insert(sal_Int32 nPos, EditLine* p) { - maLines.insert(maLines.begin()+nPos, p); + maLines.insert(maLines.begin()+nPos, std::unique_ptr(p)); } EditPaM::EditPaM() : pNode(nullptr), nIndex(0) {} diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 45838d9dcda6..55754f6ebeae 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -560,7 +560,7 @@ public: class EditLineList { - typedef boost::ptr_vector LinesType; + typedef std::vector > LinesType; LinesType maLines; public: -- cgit