loplugin:useuniqueptr in ScCellFieldsObj
Change-Id: I894abfcfd9b2710a1aa81cca94158dbe4a7d9eeb Reviewed-on: https://gerrit.libreoffice.org/56620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -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
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user