sc/inc/fielduno.hxx | 2 +- sc/source/ui/unoobj/fielduno.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit f7355a9e7c91098052e22b45ab80caa64edf7871 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu Jun 28 10:44:34 2018 +0200 loplugin:useuniqueptr in ScCellFieldsObj Change-Id: I894abfcfd9b2710a1aa81cca94158dbe4a7d9eeb Reviewed-on: https://gerrit.libreoffice.org/56620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index e176ac862de9..8664e2b673a8 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -61,7 +61,7 @@ private: css::uno::Reference<css::text::XTextRange> mxContent; ScDocShell* pDocShell; ScAddress aCellPos; - ScEditSource* mpEditSource; + std::unique_ptr<ScEditSource> mpEditSource; /// List of refresh listeners. comphelper::OInterfaceContainerHelper2* mpRefreshListeners; /// mutex to lock the InterfaceContainerHelper diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 4b33ea74f000..0316b832cc75 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -278,7 +278,7 @@ ScCellFieldsObj::ScCellFieldsObj( { pDocShell->GetDocument().AddUnoObject(*this); - mpEditSource = new ScCellEditSource( pDocShell, aCellPos ); + mpEditSource.reset( new ScCellEditSource( pDocShell, aCellPos ) ); } ScCellFieldsObj::~ScCellFieldsObj() @@ -288,7 +288,7 @@ ScCellFieldsObj::~ScCellFieldsObj() if (pDocShell) pDocShell->GetDocument().RemoveUnoObject(*this); - delete mpEditSource; + mpEditSource.reset(); // increment refcount to prevent double call off dtor osl_atomic_increment( &m_refCount ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits