summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-22 10:35:48 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-22 15:46:32 +0100
commit2de99501b7d7b32867d23d4089197e132c6a0526 (patch)
tree4c98a0a45913bdfa54aca63ad511c4d59d021940
parent7ead98eec843e68dcec6c4d5c97a577be7adec4c (diff)
Revert "cache FormulaError::NoRef error string (tdf#144249)"
A more generic fix coming. This reverts commit b4c1bb2f91e9ae47820c289e2c08f640a958cf05. Change-Id: Ia7821f1c8585506556708f1bf8526e7f509aafd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125659 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--sc/inc/global.hxx1
-rw-r--r--sc/source/core/data/global.cxx6
2 files changed, 2 insertions, 5 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 3eab2e36d8e2..dad30b02e7a8 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -496,7 +496,6 @@ class ScGlobal
static std::atomic<ScUnoAddInCollection*> pAddInCollection;
static std::unique_ptr<ScUserList> xUserList;
static OUString aStrClipDocName;
- static OUString aStrErrorStringNoRef;
static std::unique_ptr<SvxBrushItem> xEmptyBrushItem;
static std::unique_ptr<SvxBrushItem> xButtonBrushItem;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 60c0afb1ecf2..e29fccf5c1b2 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -88,7 +88,6 @@ std::atomic<::utl::TransliterationWrapper*> ScGlobal::pTransliteration(nullptr);
std::atomic<::utl::TransliterationWrapper*> ScGlobal::pCaseTransliteration(nullptr);
css::uno::Reference< css::i18n::XOrdinalSuffix> ScGlobal::xOrdinalSuffix;
OUString ScGlobal::aStrClipDocName;
-OUString ScGlobal::aStrErrorStringNoRef;
std::unique_ptr<SvxBrushItem> ScGlobal::xEmptyBrushItem;
std::unique_ptr<SvxBrushItem> ScGlobal::xButtonBrushItem;
@@ -305,8 +304,8 @@ OUString ScGlobal::GetErrorString(FormulaError nErr)
switch (nErr)
{
case FormulaError::NoRef:
- // tdf#144249 This may get called very extensively, so cached.
- return aStrErrorStringNoRef;
+ pErrNumber = STR_NO_REF_TABLE;
+ break;
case FormulaError::NoAddin:
pErrNumber = STR_NO_ADDIN;
break;
@@ -452,7 +451,6 @@ void ScGlobal::Init()
InitAddIns();
aStrClipDocName = ScResId( SCSTR_NONAME ) + "1";
- aStrErrorStringNoRef = ScResId( STR_NO_REF_TABLE );
// ScDocumentPool::InitVersionMaps() has been called earlier already
}