summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-17 15:32:23 +0200
committerNoel Grandin <noel@peralex.com>2015-11-18 08:35:34 +0200
commit2e9277c05034c157d640c289d59499be9d1ca382 (patch)
treea5cc868d73bf7a2afddd21b3fed86eea75d7a858
parent032dae364b4853635186b7541e40c71588f9050a (diff)
use unique_ptr for pImpl in editeng/
Change-Id: I43ae9f706db15594b3a0c5cba41436d009588393
-rw-r--r--editeng/source/editeng/editobj.cxx1
-rw-r--r--editeng/source/editeng/fieldupdater.cxx1
-rw-r--r--editeng/source/items/frmitems.cxx1
-rw-r--r--editeng/source/misc/svxacorr.cxx1
-rw-r--r--editeng/source/uno/unofield.cxx1
-rw-r--r--include/editeng/brushitem.hxx3
-rw-r--r--include/editeng/editobj.hxx3
-rw-r--r--include/editeng/fieldupdater.hxx3
-rw-r--r--include/editeng/svxacorr.hxx2
-rw-r--r--include/editeng/unofield.hxx3
10 files changed, 9 insertions, 10 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 52f1c95c17b1..290afd940b27 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -244,7 +244,6 @@ EditTextObject::EditTextObject( const EditTextObject& r ) :
EditTextObject::~EditTextObject()
{
- delete mpImpl;
}
sal_Int32 EditTextObject::GetParagraphCount() const
diff --git a/editeng/source/editeng/fieldupdater.cxx b/editeng/source/editeng/fieldupdater.cxx
index 5373b0998ac2..a5db406e112b 100644
--- a/editeng/source/editeng/fieldupdater.cxx
+++ b/editeng/source/editeng/fieldupdater.cxx
@@ -61,7 +61,6 @@ FieldUpdater::FieldUpdater(const FieldUpdater& r) : mpImpl(new FieldUpdaterImpl(
FieldUpdater::~FieldUpdater()
{
- delete mpImpl;
}
void FieldUpdater::updateTableFields(int nTab)
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 7de23be1b6d7..5bb17666b627 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3546,7 +3546,6 @@ SvxBrushItem::SvxBrushItem( const SvxBrushItem& rItem ) :
SvxBrushItem::~SvxBrushItem()
{
delete pImpl->pGraphicObject;
- delete pImpl;
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 8ca501939d4d..7c459f46b818 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2661,7 +2661,6 @@ SvxAutocorrWordList::SvxAutocorrWordList() : mpImpl(new Impl) {}
SvxAutocorrWordList::~SvxAutocorrWordList()
{
mpImpl->DeleteAndDestroyAll();
- delete mpImpl;
}
void SvxAutocorrWordList::DeleteAndDestroyAll()
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 2f8f4e2ed0d0..300530ef5483 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -377,7 +377,6 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co
SvxUnoTextField::~SvxUnoTextField() throw()
{
- delete mpImpl;
}
SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 85ca68af1f56..d219c1f6ef50 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -23,6 +23,7 @@
#include <vcl/wall.hxx>
#include <tools/link.hxx>
#include <editeng/editengdllapi.h>
+#include <memory>
// class SvxBrushItem ----------------------------------------------------
@@ -46,7 +47,7 @@ class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem
{
Color aColor;
sal_Int32 nShadingValue;
- SvxBrushItem_Impl* pImpl;
+ std::unique_ptr<SvxBrushItem_Impl> pImpl;
OUString maStrLink;
OUString maStrFilter;
SvxGraphicPosition eGraphicPos;
diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx
index 6a0eac90b886..495571a319b8 100644
--- a/include/editeng/editobj.hxx
+++ b/include/editeng/editobj.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/text/textfield/Type.hpp>
#include <vector>
+#include <memory>
class SfxItemPool;
class SfxStyleSheetPool;
@@ -62,7 +63,7 @@ class EDITENG_DLLPUBLIC EditTextObject : public SfxItemPoolUser
friend class editeng::FieldUpdaterImpl;
friend class ImpEditEngine;
- EditTextObjectImpl* mpImpl;
+ std::unique_ptr<EditTextObjectImpl> mpImpl;
EditTextObject& operator=( const EditTextObject& ) = delete;
diff --git a/include/editeng/fieldupdater.hxx b/include/editeng/fieldupdater.hxx
index 2fd7c4cb089f..4f87ac338f0b 100644
--- a/include/editeng/fieldupdater.hxx
+++ b/include/editeng/fieldupdater.hxx
@@ -11,6 +11,7 @@
#define INCLUDED_EDITENG_FIELDUPDATER_HXX
#include <editeng/editengdllapi.h>
+#include <memory>
class EditTextObject;
@@ -24,7 +25,7 @@ class FieldUpdaterImpl;
*/
class EDITENG_DLLPUBLIC FieldUpdater
{
- FieldUpdaterImpl* mpImpl;
+ std::unique_ptr<FieldUpdaterImpl> mpImpl;
FieldUpdater(); // disabled
public:
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 9b0f05fe69c6..a839e2208f0c 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -133,7 +133,7 @@ public:
class EDITENG_DLLPUBLIC SvxAutocorrWordList
{
struct Impl;
- Impl* mpImpl;
+ std::unique_ptr<Impl> mpImpl;
SvxAutocorrWordList( const SvxAutocorrWordList& ) = delete;
const SvxAutocorrWordList& operator= ( const SvxAutocorrWordList& ) = delete;
diff --git a/include/editeng/unofield.hxx b/include/editeng/unofield.hxx
index be46bc54f3c8..3bfd691ac53d 100644
--- a/include/editeng/unofield.hxx
+++ b/include/editeng/unofield.hxx
@@ -32,6 +32,7 @@
#include <comphelper/servicehelper.hxx>
#include <editeng/mutxhelp.hxx>
+#include <memory>
class SvxUnoFieldData_Impl;
class SfxItemPropertySet;
@@ -51,7 +52,7 @@ private:
css::uno::Reference< css::text::XTextRange > mxAnchor;
const SfxItemPropertySet* mpPropSet;
sal_Int32 mnServiceId;
- SvxUnoFieldData_Impl* mpImpl;
+ std::unique_ptr<SvxUnoFieldData_Impl> mpImpl;
protected:
css::uno::Sequence< css::uno::Type > maTypeSequence;