summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-10 15:12:17 +0200
committerNoel Grandin <noel@peralex.com>2015-11-10 15:30:03 +0200
commit5f86c1f3792a5161e2d661276c529ce05e53d44b (patch)
tree924e8f82acfed45e4165e35cf274931e678d2522 /editeng
parent5a7a4325eca58c253270d4e9d327042a9ee2c5f0 (diff)
editeng: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Iee1e64d22e799653bc58d6a72c57c55787e45d84
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editundo.cxx10
-rw-r--r--editeng/source/editeng/editundo.hxx5
-rw-r--r--editeng/source/editeng/impedit.hxx2
3 files changed, 9 insertions, 8 deletions
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index f1ff034d4d58..63ced0a9457a 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -501,14 +501,14 @@ EditUndoSetAttribs::EditUndoSetAttribs(EditEngine* pEE, const ESelection& rESel,
namespace {
-struct RemoveAttribsFromPool : std::unary_function<ContentAttribsInfo, void>
+struct RemoveAttribsFromPool : std::unary_function<std::unique_ptr<ContentAttribsInfo>, void>
{
SfxItemPool& mrPool;
public:
explicit RemoveAttribsFromPool(SfxItemPool& rPool) : mrPool(rPool) {}
- void operator() (ContentAttribsInfo& rInfo)
+ void operator() (std::unique_ptr<ContentAttribsInfo>& rInfo)
{
- rInfo.RemoveAllCharAttribsFromPool(mrPool);
+ rInfo->RemoveAllCharAttribsFromPool(mrPool);
}
};
@@ -528,7 +528,7 @@ void EditUndoSetAttribs::Undo()
bool bFields = false;
for ( sal_Int32 nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ )
{
- const ContentAttribsInfo& rInf = aPrevAttribs[nPara-aESel.nStartPara];
+ const ContentAttribsInfo& rInf = *aPrevAttribs[nPara-aESel.nStartPara].get();
// first the paragraph attributes ...
pEE->SetParaAttribsOnly(nPara, rInf.GetPrevParaAttribs());
@@ -568,7 +568,7 @@ void EditUndoSetAttribs::Redo()
void EditUndoSetAttribs::AppendContentInfo(ContentAttribsInfo* pNew)
{
- aPrevAttribs.push_back(pNew);
+ aPrevAttribs.push_back(std::unique_ptr<ContentAttribsInfo>(pNew));
}
void EditUndoSetAttribs::ImpSetSelection( EditView* /*pView*/ )
diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx
index 411633c216e6..4af7d38607be 100644
--- a/editeng/source/editeng/editundo.hxx
+++ b/editeng/source/editeng/editundo.hxx
@@ -23,7 +23,8 @@
#include <editdoc.hxx>
#include <editeng/editund2.hxx>
#include <editeng/editdata.hxx>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
+#include <memory>
class EditEngine;
class EditView;
@@ -212,7 +213,7 @@ public:
class EditUndoSetAttribs: public EditUndo
{
private:
- typedef boost::ptr_vector<ContentAttribsInfo> InfoArrayType;
+ typedef std::vector<std::unique_ptr<ContentAttribsInfo> > InfoArrayType;
ESelection aESel;
SfxItemSet aNewAttribs;
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index ecfd01b5ffff..815e7ae4d546 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -59,7 +59,7 @@
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
#include <boost/noncopyable.hpp>
-
+#include <boost/ptr_container/ptr_vector.hpp>
#define DEL_LEFT 1
#define DEL_RIGHT 2