summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-02 11:02:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-03 08:16:51 +0200
commit0df31898281a771821d62ad419c7343da72cfb51 (patch)
treeb6f72ca4d14da7b740cf07ceded7381448b19617 /sc
parent6118675b1f6bd37589d88d5893dffd41501cf624 (diff)
loplugin:useuniqueptr in ScFunctionAccess
Change-Id: I678bfbc54a1c35540bb7f2b76f4f7e5c7c62b23c Reviewed-on: https://gerrit.libreoffice.org/56826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/funcuno.hxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx
index d93cc41c6a2f..df65d249c212 100644
--- a/sc/inc/funcuno.hxx
+++ b/sc/inc/funcuno.hxx
@@ -61,7 +61,7 @@ class ScFunctionAccess : public cppu::WeakImplHelper<
{
private:
ScTempDocCache aDocCache;
- ScDocOptions* pOptions;
+ std::unique_ptr<ScDocOptions> pOptions;
SfxItemPropertyMap aPropertyMap;
bool mbArray;
bool mbValid;
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 68cf909663f4..59de6fc42165 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -176,7 +176,7 @@ ScFunctionAccess::ScFunctionAccess() :
ScFunctionAccess::~ScFunctionAccess()
{
- delete pOptions;
+ pOptions.reset();
{
// SfxBroadcaster::RemoveListener checks DBG_TESTSOLARMUTEX():
SolarMutexGuard g;
@@ -241,7 +241,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
else
{
if ( !pOptions )
- pOptions = new ScDocOptions();
+ pOptions.reset( new ScDocOptions() );
// options aren't initialized from configuration - always get the same default behaviour
@@ -259,7 +259,7 @@ uno::Any SAL_CALL ScFunctionAccess::getPropertyValue( const OUString& aPropertyN
return uno::Any( mbArray );
if ( !pOptions )
- pOptions = new ScDocOptions();
+ pOptions.reset( new ScDocOptions() );
// options aren't initialized from configuration - always get the same default behaviour