diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-02-16 18:37:04 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-02-22 19:56:17 +0100 |
commit | 3ac9f491c20fb56c4544444d876687dd6d8de231 (patch) | |
tree | 93d979296e5493aa2f4fd875fa9556eff700796b /sc/source/core/data/dpobject.cxx | |
parent | 6fbfad6b00e8c35346ee59cd32a0d7ccc0d8c19c (diff) |
ScGlobal - change direct access to a static ptr for a getter
pLocalData and pCharClass static veriables on ScGlobal are always
set from SvtSysLocale on init, probably for "faster" access.
This can just be made simpler with access through a getter,
so this introduces a getter for ScGlobal::getCharClassPtr and
ScGlobal::getLocaleDataPtr, where the access is made directly to
SvtSysLocale instance.
In addition all the usages needed to be fixed, which is all over
the calc module.
Change-Id: Ie047b158094e25bbaa2aba15074d7998d9541787
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89249
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc/source/core/data/dpobject.cxx')
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index b85365146816..785f7e4eee1f 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1316,17 +1316,17 @@ public: { // Layout name takes precedence. const std::optional<OUString> & pLayoutName = pDim->GetLayoutName(); - if (pLayoutName && ScGlobal::pCharClass->uppercase(*pLayoutName) == maName) + if (pLayoutName && ScGlobal::getCharClassPtr()->uppercase(*pLayoutName) == maName) return true; ScGeneralFunction eGenFunc = pDim->GetFunction(); ScSubTotalFunc eFunc = ScDPUtil::toSubTotalFunc(eGenFunc); OUString aSrcName = ScDPUtil::getSourceDimensionName(pDim->GetName()); OUString aFuncName = ScDPUtil::getDisplayedMeasureName(aSrcName, eFunc); - if (maName == ScGlobal::pCharClass->uppercase(aFuncName)) + if (maName == ScGlobal::getCharClassPtr()->uppercase(aFuncName)) return true; - return maName == ScGlobal::pCharClass->uppercase(aSrcName); + return maName == ScGlobal::getCharClassPtr()->uppercase(aSrcName); } }; @@ -1371,7 +1371,7 @@ double ScDPObject::GetPivotData(const OUString& rDataFieldName, std::vector<shee std::vector<const ScDPSaveDimension*>::iterator it = std::find_if( aDataDims.begin(), aDataDims.end(), - FindByName(ScGlobal::pCharClass->uppercase(rDataFieldName))); + FindByName(ScGlobal::getCharClassPtr()->uppercase(rDataFieldName))); if (it == aDataDims.end()) return fRet; |