diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/global.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/global.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 6d13efab4523..adf294cdeaba 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -515,7 +515,7 @@ class ScGlobal static std::unique_ptr<SvxBrushItem> xEmbeddedBrushItem; static ScFunctionList* pStarCalcFunctionList; - static ScFunctionMgr* pStarCalcFunctionMgr; + 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 8b149300bbe3..1212ad56fb37 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -94,7 +94,7 @@ std::unique_ptr<SvxBrushItem> ScGlobal::xButtonBrushItem; std::unique_ptr<SvxBrushItem> ScGlobal::xEmbeddedBrushItem; ScFunctionList* ScGlobal::pStarCalcFunctionList = nullptr; -ScFunctionMgr* ScGlobal::pStarCalcFunctionMgr = nullptr; +std::unique_ptr<ScFunctionMgr> ScGlobal::xStarCalcFunctionMgr; std::atomic<ScUnitConverter*> ScGlobal::pUnitConverter(nullptr); SvNumberFormatter* ScGlobal::pEnglishFormatter = nullptr; @@ -535,7 +535,7 @@ void ScGlobal::Clear() delete pAddInCollection.load(); pAddInCollection = nullptr; DELETEZ(pUserList); DELETEZ(pStarCalcFunctionList); // Destroy before ResMgr! - DELETEZ(pStarCalcFunctionMgr); + xStarCalcFunctionMgr.reset(); ScParameterClassification::Exit(); ScCompiler::DeInit(); ScInterpreter::GlobalExit(); // Delete static Stack @@ -626,16 +626,16 @@ ScFunctionList* ScGlobal::GetStarCalcFunctionList() ScFunctionMgr* ScGlobal::GetStarCalcFunctionMgr() { assert(!bThreadedGroupCalcInProgress); - if ( !pStarCalcFunctionMgr ) - pStarCalcFunctionMgr = new ScFunctionMgr; + if ( !xStarCalcFunctionMgr ) + xStarCalcFunctionMgr.reset(new ScFunctionMgr); - return pStarCalcFunctionMgr; + return xStarCalcFunctionMgr.get(); } void ScGlobal::ResetFunctionList() { // FunctionMgr has pointers into FunctionList, must also be updated - DELETEZ( pStarCalcFunctionMgr ); + xStarCalcFunctionMgr.reset(); DELETEZ( pStarCalcFunctionList ); } |