summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen2.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-02-16 18:37:04 +0100
committerTomaž Vajngerl <quikee@gmail.com>2020-02-22 19:56:17 +0100
commit3ac9f491c20fb56c4544444d876687dd6d8de231 (patch)
tree93d979296e5493aa2f4fd875fa9556eff700796b /sc/source/core/data/documen2.cxx
parent6fbfad6b00e8c35346ee59cd32a0d7ccc0d8c19c (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/documen2.cxx')
-rw-r--r--sc/source/core/data/documen2.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 36b4d2d0556a..cc45c83c30d4 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -92,7 +92,7 @@ using namespace com::sun::star;
const sal_uInt16 ScDocument::nSrcVer = SC_CURRENT_VERSION;
ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
- mpCellStringPool(std::make_shared<svl::SharedStringPool>(*ScGlobal::pCharClass)),
+ mpCellStringPool(std::make_shared<svl::SharedStringPool>(*ScGlobal::getCharClassPtr())),
mpDocLinkMgr(new sc::DocumentLinkManager(pDocShell)),
mbFormulaGroupCxtBlockDiscard(false),
maCalcConfig( ScInterpreter::GetGlobalConfig()),
@@ -1326,9 +1326,9 @@ void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aT
DateTime aDT = pFound->GetDateTime();
aTrackText = pFound->GetUser();
aTrackText += ", ";
- aTrackText += ScGlobal::pLocaleData->getDate(aDT);
+ aTrackText += ScGlobal::getLocaleDataPtr()->getDate(aDT);
aTrackText += " ";
- aTrackText += ScGlobal::pLocaleData->getTime(aDT);
+ aTrackText += ScGlobal::getLocaleDataPtr()->getTime(aDT);
aTrackText += ":\n";
OUString aComStr = pFound->GetComment();
if(!aComStr.isEmpty())