summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-10 14:28:26 +0200
committerNoel Grandin <noel@peralex.com>2015-11-10 15:30:03 +0200
commited381a77fc846ec5d42d2f19c6470f4dbb7bb0bf (patch)
tree30480f91cf247d08d583a8abe1cb18c557f08a3f /editeng/source
parentd489e76a514dc9cd5c9a432e51e6c8ff986b91ee (diff)
editeng: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I8fc80274e7eb33c81062f8514f63e6d0682d1b8f
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/editdoc.cxx10
-rw-r--r--editeng/source/editeng/editdoc.hxx2
2 files changed, 6 insertions, 6 deletions
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<EditLine>(p));
}
void EditLineList::Insert(sal_Int32 nPos, EditLine* p)
{
- maLines.insert(maLines.begin()+nPos, p);
+ maLines.insert(maLines.begin()+nPos, std::unique_ptr<EditLine>(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<EditLine> LinesType;
+ typedef std::vector<std::unique_ptr<EditLine> > LinesType;
LinesType maLines;
public: