summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorArnold Dumas <arnold@dumas.at>2016-08-20 17:05:21 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-21 19:24:14 +0000
commit221a1766e7726fe2a3b1257e61c42a3d8d83a335 (patch)
tree848e244ebbf7f906cce2e37644796b9ac2368ed3 /forms
parentfb21736979fea823b6141eafba64d2b44935bc57 (diff)
tdf#89329: use unique_ptr for pImpl in richtextvclcontrol
Change-Id: Icaa9b8bed2ae6efc8d87b44b5f104c4a4b272f70 Reviewed-on: https://gerrit.libreoffice.org/28263 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx4
-rw-r--r--forms/source/richtext/richtextvclcontrol.hxx3
2 files changed, 4 insertions, 3 deletions
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index 53076eebd1cc..d072bad88927 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -52,7 +52,7 @@ namespace frm
void RichTextControl::implInit( RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener )
{
- m_pImpl = new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener );
+ m_pImpl.reset( new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener ) );
SetCompoundControl( true );
}
@@ -64,7 +64,7 @@ namespace frm
void RichTextControl::dispose()
{
- delete m_pImpl;
+ m_pImpl.reset();
Control::dispose();
}
diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx
index 7c4cdec1a310..9d9ce3bdbb05 100644
--- a/forms/source/richtext/richtextvclcontrol.hxx
+++ b/forms/source/richtext/richtextvclcontrol.hxx
@@ -26,6 +26,7 @@
#include <com/sun/star/awt/FontDescriptor.hpp>
#include "rtattributes.hxx"
#include "textattributelistener.hxx"
+#include <memory>
class EditView;
class EditEngine;
@@ -40,7 +41,7 @@ namespace frm
class RichTextControl : public Control, public IMultiAttributeDispatcher
{
private:
- RichTextControlImpl* m_pImpl;
+ std::unique_ptr<RichTextControlImpl> m_pImpl;
public:
RichTextControl(