Kaydet (Commit) dfb3be7e authored tarafından Noel Grandin's avatar Noel Grandin

use unique_ptr for pImpl in vcl,vbahelper,uui

Change-Id: Icb7573c24c681a8fc0570d61b6a30dab91378eb8
üst b4bd157d
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <ooo/vba/XApplicationBase.hpp> #include <ooo/vba/XApplicationBase.hpp>
#include <vbahelper/vbahelperinterface.hxx> #include <vbahelper/vbahelperinterface.hxx>
#include <sfx2/objsh.hxx> #include <sfx2/objsh.hxx>
#include <memory>
typedef InheritedHelperInterfaceWeakImpl< ov::XApplicationBase > ApplicationBase_BASE; typedef InheritedHelperInterfaceWeakImpl< ov::XApplicationBase > ApplicationBase_BASE;
...@@ -30,7 +31,7 @@ struct VbaApplicationBase_Impl; ...@@ -30,7 +31,7 @@ struct VbaApplicationBase_Impl;
class VBAHELPER_DLLPUBLIC VbaApplicationBase : public ApplicationBase_BASE class VBAHELPER_DLLPUBLIC VbaApplicationBase : public ApplicationBase_BASE
{ {
VbaApplicationBase_Impl* m_pImpl; std::unique_ptr<VbaApplicationBase_Impl> m_pImpl;
protected: protected:
VbaApplicationBase( const css::uno::Reference< css::uno::XComponentContext >& xContext ); VbaApplicationBase( const css::uno::Reference< css::uno::XComponentContext >& xContext );
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <vcl/dndhelp.hxx> #include <vcl/dndhelp.hxx>
#include <vcl/textdata.hxx> #include <vcl/textdata.hxx>
#include <vcl/window.hxx> #include <vcl/window.hxx>
#include <memory>
class TextEngine; class TextEngine;
class OutputDevice; class OutputDevice;
...@@ -53,10 +54,10 @@ class VCL_DLLPUBLIC TextView : public vcl::unohelper::DragAndDropClient ...@@ -53,10 +54,10 @@ class VCL_DLLPUBLIC TextView : public vcl::unohelper::DragAndDropClient
friend class ExtTextView; friend class ExtTextView;
private: private:
ImpTextView* mpImpl; std::unique_ptr<ImpTextView> mpImpl;
TextView( const TextView& ) : vcl::unohelper::DragAndDropClient() {} TextView( const TextView& ) = delete;
TextView& operator=( const TextView& ) { return *this; } TextView& operator=( const TextView& ) = delete;
protected: protected:
void ShowSelection(); void ShowSelection();
......
...@@ -33,7 +33,6 @@ UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver( ...@@ -33,7 +33,6 @@ UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver(
UUIInteractionRequestStringResolver::~UUIInteractionRequestStringResolver() UUIInteractionRequestStringResolver::~UUIInteractionRequestStringResolver()
{ {
delete m_pImpl;
} }
OUString SAL_CALL OUString SAL_CALL
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <com/sun/star/task/XInteractionRequestStringResolver.hpp> #include <com/sun/star/task/XInteractionRequestStringResolver.hpp>
#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <memory>
class UUIInteractionHelper; class UUIInteractionHelper;
...@@ -47,7 +48,7 @@ public: ...@@ -47,7 +48,7 @@ public:
rServiceFactory); rServiceFactory);
private: private:
UUIInteractionHelper * m_pImpl; std::unique_ptr<UUIInteractionHelper> m_pImpl;
UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver &) = delete; UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver &) = delete;
void operator =(UUIInteractionRequestStringResolver&) = delete; void operator =(UUIInteractionRequestStringResolver&) = delete;
......
...@@ -175,7 +175,6 @@ VbaApplicationBase::VbaApplicationBase( const uno::Reference< uno::XComponentCon ...@@ -175,7 +175,6 @@ VbaApplicationBase::VbaApplicationBase( const uno::Reference< uno::XComponentCon
VbaApplicationBase::~VbaApplicationBase() VbaApplicationBase::~VbaApplicationBase()
{ {
delete m_pImpl;
} }
sal_Bool SAL_CALL sal_Bool SAL_CALL
......
...@@ -243,7 +243,6 @@ TextView::~TextView() ...@@ -243,7 +243,6 @@ TextView::~TextView()
mpImpl->mpWindow->SetCursor( nullptr ); mpImpl->mpWindow->SetCursor( nullptr );
delete mpImpl->mpCursor; delete mpImpl->mpCursor;
delete mpImpl->mpDDInfo; delete mpImpl->mpDDInfo;
delete mpImpl;
} }
void TextView::Invalidate() void TextView::Invalidate()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment