diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/global.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/global.cxx | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index adf294cdeaba..44b35c003fc1 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -514,7 +514,7 @@ class ScGlobal static std::unique_ptr<SvxBrushItem> xButtonBrushItem; static std::unique_ptr<SvxBrushItem> xEmbeddedBrushItem; - static ScFunctionList* pStarCalcFunctionList; + static std::unique_ptr<ScFunctionList> xStarCalcFunctionList; static std::unique_ptr<ScFunctionMgr> xStarCalcFunctionMgr; static std::atomic<ScUnitConverter*> pUnitConverter; diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 1212ad56fb37..0fc9977ce7f7 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -93,7 +93,7 @@ std::unique_ptr<SvxBrushItem> ScGlobal::xEmptyBrushItem; std::unique_ptr<SvxBrushItem> ScGlobal::xButtonBrushItem; std::unique_ptr<SvxBrushItem> ScGlobal::xEmbeddedBrushItem; -ScFunctionList* ScGlobal::pStarCalcFunctionList = nullptr; +std::unique_ptr<ScFunctionList> ScGlobal::xStarCalcFunctionList; std::unique_ptr<ScFunctionMgr> ScGlobal::xStarCalcFunctionMgr; std::atomic<ScUnitConverter*> ScGlobal::pUnitConverter(nullptr); @@ -534,7 +534,7 @@ void ScGlobal::Clear() delete pLegacyFuncCollection.load(); pLegacyFuncCollection = nullptr; delete pAddInCollection.load(); pAddInCollection = nullptr; DELETEZ(pUserList); - DELETEZ(pStarCalcFunctionList); // Destroy before ResMgr! + xStarCalcFunctionList.reset(); // Destroy before ResMgr! xStarCalcFunctionMgr.reset(); ScParameterClassification::Exit(); ScCompiler::DeInit(); @@ -611,16 +611,16 @@ OUString ScGlobal::GetCharsetString( rtl_TextEncoding eVal ) bool ScGlobal::HasStarCalcFunctionList() { - return ( pStarCalcFunctionList != nullptr ); + return bool(xStarCalcFunctionList); } ScFunctionList* ScGlobal::GetStarCalcFunctionList() { assert(!bThreadedGroupCalcInProgress); - if ( !pStarCalcFunctionList ) - pStarCalcFunctionList = new ScFunctionList; + if ( !xStarCalcFunctionList ) + xStarCalcFunctionList.reset(new ScFunctionList); - return pStarCalcFunctionList; + return xStarCalcFunctionList.get(); } ScFunctionMgr* ScGlobal::GetStarCalcFunctionMgr() @@ -636,7 +636,7 @@ void ScGlobal::ResetFunctionList() { // FunctionMgr has pointers into FunctionList, must also be updated xStarCalcFunctionMgr.reset(); - DELETEZ( pStarCalcFunctionList ); + xStarCalcFunctionList.reset(); } ScUnitConverter* ScGlobal::GetUnitConverter() |