summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/global.hxx4
-rw-r--r--sc/source/core/data/global.cxx10
2 files changed, 3 insertions, 11 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 75d4ef24ca91..989671621484 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -509,7 +509,7 @@ class ScGlobal
static ScUserList* pUserList;
static std::map<const char*, OUString>* pRscString;
static OUString* pStrScDoc;
- static OUString* pEmptyOUString;
+ static SC_DLLPUBLIC const OUString aEmptyOUString;
static OUString* pStrClipDocName;
static SvxBrushItem* pEmptyBrushItem;
static SvxBrushItem* pButtonBrushItem;
@@ -592,7 +592,7 @@ public:
static void InitTextHeight(const SfxItemPool* pPool);
static SvxBrushItem* GetEmptyBrushItem() { return pEmptyBrushItem; }
static SvxBrushItem* GetButtonBrushItem();
- SC_DLLPUBLIC static const OUString& GetEmptyOUString();
+ static const OUString& GetEmptyOUString() { return aEmptyOUString; }
static bool HasStarCalcFunctionList();
static ScFunctionList* GetStarCalcFunctionList();
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 22b96ec9b45c..bb784e589cbd 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -83,7 +83,7 @@ std::atomic<CollatorWrapper*> ScGlobal::pCaseCollator(nullptr);
std::atomic<::utl::TransliterationWrapper*> ScGlobal::pTransliteration(nullptr);
std::atomic<::utl::TransliterationWrapper*> ScGlobal::pCaseTransliteration(nullptr);
css::uno::Reference< css::i18n::XOrdinalSuffix> ScGlobal::xOrdinalSuffix;
-OUString* ScGlobal::pEmptyOUString = nullptr;
+const OUString ScGlobal::aEmptyOUString;
OUString* ScGlobal::pStrClipDocName = nullptr;
SvxBrushItem* ScGlobal::pEmptyBrushItem = nullptr;
@@ -431,15 +431,8 @@ SvxBrushItem* ScGlobal::GetButtonBrushItem()
return pButtonBrushItem;
}
-const OUString& ScGlobal::GetEmptyOUString()
-{
- return *pEmptyOUString;
-}
-
void ScGlobal::Init()
{
- pEmptyOUString = new OUString;
-
// The default language for number formats (ScGlobal::eLnge) must
// always be LANGUAGE_SYSTEM
// FIXME: So remove this variable?
@@ -567,7 +560,6 @@ void ScGlobal::Clear()
delete pUnitConverter.load(); pUnitConverter = nullptr;
DELETEZ(pFieldEditEngine);
- DELETEZ(pEmptyOUString);
xDrawClipDocShellRef.clear();
}