From 3ac9f491c20fb56c4544444d876687dd6d8de231 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Sun, 16 Feb 2020 18:37:04 +0100 Subject: ScGlobal - change direct access to a static ptr for a getter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- sc/inc/global.hxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 0fef008448d5..ca8591990e4d 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -537,11 +537,8 @@ class ScGlobal public: static SvtSysLocale* pSysLocale; - // for faster access a pointer to the single instance provided by SvtSysLocale - SC_DLLPUBLIC static const CharClass* pCharClass; - // for faster access a pointer to the single instance provided by SvtSysLocale - SC_DLLPUBLIC static const LocaleDataWrapper* pLocaleData; - SC_DLLPUBLIC static const LocaleDataWrapper* GetpLocaleData(); + SC_DLLPUBLIC static const LocaleDataWrapper* getLocaleDataPtr(); + SC_DLLPUBLIC static const CharClass* getCharClassPtr(); static CalendarWrapper* GetCalendar(); SC_DLLPUBLIC static CollatorWrapper* GetCollator(); -- cgit v1.2.3