forms/source/richtext/richtextvclcontrol.cxx | 4 ++-- forms/source/richtext/richtextvclcontrol.hxx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit 221a1766e7726fe2a3b1257e61c42a3d8d83a335 Author: Arnold Dumas <[email protected]> Date: Sat Aug 20 17:05:21 2016 +0200 tdf#89329: use unique_ptr for pImpl in richtextvclcontrol Change-Id: Icaa9b8bed2ae6efc8d87b44b5f104c4a4b272f70 Reviewed-on: https://gerrit.libreoffice.org/28263 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Noel Grandin <[email protected]> diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 53076ee..d072bad 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 7c4cdec..9d9ce3b 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( _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
