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/ui/app | |
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/ui/app')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index b0131488e148..46321002fbf1 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1260,7 +1260,7 @@ bool ScInputHandler::GetFuncName( OUString& aStart, OUString& aResult ) if ( aStart.isEmpty() ) return false; - aStart = ScGlobal::pCharClass->uppercase( aStart ); + aStart = ScGlobal::getCharClassPtr()->uppercase( aStart ); sal_Int32 nPos = aStart.getLength() - 1; sal_Unicode c = aStart[ nPos ]; // fdo#75264 use maFormulaChar to check if characters are used in function names @@ -1426,7 +1426,7 @@ void ScInputHandler::UseFormulaData() return; if ( aParagraph.getLength() > aSel.nEndPos && - ( ScGlobal::pCharClass->isLetterNumeric( aParagraph, aSel.nEndPos ) || + ( ScGlobal::getCharClassPtr()->isLetterNumeric( aParagraph, aSel.nEndPos ) || aParagraph[ aSel.nEndPos ] == '_' || aParagraph[ aSel.nEndPos ] == '.' || aParagraph[ aSel.nEndPos ] == '$' ) ) @@ -3100,25 +3100,25 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode ) bInsertPreCorrectedString = false; OUString aReplace(pAuto->GetStartDoubleQuote()); if( aReplace.isEmpty() ) - aReplace = ScGlobal::pLocaleData->getDoubleQuotationMarkStart(); + aReplace = ScGlobal::getLocaleDataPtr()->getDoubleQuotationMarkStart(); if( aReplace != "\"" ) aString = aString.replaceAll( aReplace, "\"" ); aReplace = OUString(pAuto->GetEndDoubleQuote()); if( aReplace.isEmpty() ) - aReplace = ScGlobal::pLocaleData->getDoubleQuotationMarkEnd(); + aReplace = ScGlobal::getLocaleDataPtr()->getDoubleQuotationMarkEnd(); if( aReplace != "\"" ) aString = aString.replaceAll( aReplace, "\"" ); aReplace = OUString(pAuto->GetStartSingleQuote()); if( aReplace.isEmpty() ) - aReplace = ScGlobal::pLocaleData->getQuotationMarkStart(); + aReplace = ScGlobal::getLocaleDataPtr()->getQuotationMarkStart(); if( aReplace != "'" ) aString = aString.replaceAll( aReplace, "'" ); aReplace = OUString(pAuto->GetEndSingleQuote()); if( aReplace.isEmpty() ) - aReplace = ScGlobal::pLocaleData->getQuotationMarkEnd(); + aReplace = ScGlobal::getLocaleDataPtr()->getQuotationMarkEnd(); if( aReplace != "'" ) aString = aString.replaceAll( aReplace, "'"); } diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index bf80fc89b07f..cbbc8b2d0cf1 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2329,7 +2329,7 @@ void ScPosWnd::DoEnter() { ScRangeName* pNames = rDoc.GetRangeName(); ScRange aSelection; - if ( pNames && !pNames->findByUpperName(ScGlobal::pCharClass->uppercase(aText)) && + if ( pNames && !pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aText)) && (rViewData.GetSimpleArea( aSelection ) == SC_MARK_SIMPLE) ) { ScRangeName aNewRanges( *pNames ); |