summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-16 21:01:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-17 08:41:16 +0200
commit8930b1f69e4b1c8c02902eb447c00b1d2b420e81 (patch)
tree5beed021181eddab65e1a206b893155b87609569 /sc
parent7fd3c5e8e5897617f1e89fda26f8cdbd4092071d (diff)
rather return ref from getCharClassPtr
since we never return a nullptr, and rename to reflect that Change-Id: I5b8f0aba6ce387bb0fe1ce6088ba2685d2ade7f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/global.hxx2
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/core/data/dpcache.cxx2
-rw-r--r--sc/source/core/data/dpobject.cxx8
-rw-r--r--sc/source/core/data/dpresfilter.cxx20
-rw-r--r--sc/source/core/data/dpshttab.cxx2
-rw-r--r--sc/source/core/data/global.cxx4
-rw-r--r--sc/source/core/data/stlpool.cxx4
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/data/table3.cxx10
-rw-r--r--sc/source/core/tool/addincol.cxx8
-rw-r--r--sc/source/core/tool/chgviset.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx22
-rw-r--r--sc/source/core/tool/dbdata.cxx4
-rw-r--r--sc/source/core/tool/doubleref.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx16
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/core/tool/parclass.cxx2
-rw-r--r--sc/source/core/tool/queryentry.cxx2
-rw-r--r--sc/source/core/tool/rangenam.cxx6
-rw-r--r--sc/source/core/tool/rangeutl.cxx8
-rw-r--r--sc/source/core/tool/userlist.cxx6
-rw-r--r--sc/source/filter/html/htmlimp.cxx4
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx4
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx8
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx4
-rw-r--r--sc/source/ui/dataprovider/dataprovider.cxx2
-rw-r--r--sc/source/ui/dataprovider/datatransformation.cxx10
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx4
-rw-r--r--sc/source/ui/docshell/arealink.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx10
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/docshell/docsh5.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx26
-rw-r--r--sc/source/ui/docshell/impex.cxx8
-rw-r--r--sc/source/ui/docshell/servobj.cxx2
-rw-r--r--sc/source/ui/miscdlgs/dataproviderdlg.cxx2
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx2
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx8
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx6
-rw-r--r--sc/source/ui/undo/undodat.cxx2
-rw-r--r--sc/source/ui/unoobj/datauno.cxx4
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx2
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx10
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
55 files changed, 144 insertions, 144 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index d66801a9e205..f9a773c39b6f 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -535,7 +535,7 @@ class ScGlobal
public:
static std::unique_ptr<SvtSysLocale> xSysLocale;
SC_DLLPUBLIC static const LocaleDataWrapper* getLocaleDataPtr();
- SC_DLLPUBLIC static const CharClass* getCharClassPtr();
+ SC_DLLPUBLIC static const CharClass& getCharClass();
static CalendarWrapper* GetCalendar();
SC_DLLPUBLIC static CollatorWrapper* GetCollator();
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index d94dbdfb25a9..281b5e975982 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -103,7 +103,7 @@ static ScSheetLimits* CreateSheetLimits()
}
ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
- mpCellStringPool(std::make_shared<svl::SharedStringPool>(*ScGlobal::getCharClassPtr())),
+ mpCellStringPool(std::make_shared<svl::SharedStringPool>(ScGlobal::getCharClass())),
mpDocLinkMgr(new sc::DocumentLinkManager(pDocShell)),
mbFormulaGroupCxtBlockDiscard(false),
maCalcConfig( ScInterpreter::GetGlobalConfig()),
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 87567274e700..3f5d4aefdbb6 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -267,7 +267,7 @@ bool ScDocument::GetTable( const OUString& rName, SCTAB& rTab ) const
{
aCacheName = rName;
// surprisingly slow ...
- aCacheUpperName = ScGlobal::getCharClassPtr()->uppercase(rName);
+ aCacheUpperName = ScGlobal::getCharClass().uppercase(rName);
}
aUpperName = aCacheUpperName;
@@ -376,7 +376,7 @@ bool ScDocument::ValidNewTabName( const OUString& rName ) const
bool bValid = ValidTabName(rName);
if (!bValid)
return false;
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rName);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(rName);
for (const auto& a : maTabs)
{
if (!a)
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index ebe284e928bf..9b572a810b94 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -334,7 +334,7 @@ typedef std::unordered_set<OUString> LabelSet;
void normalizeAddLabel(const OUString& rLabel, std::vector<OUString>& rLabels, LabelSet& rExistingNames)
{
- const OUString aLabelLower = ScGlobal::getCharClassPtr()->lowercase(rLabel);
+ const OUString aLabelLower = ScGlobal::getCharClass().lowercase(rLabel);
sal_Int32 nSuffix = 1;
OUString aNewLabel = rLabel;
OUString aNewLabelLower = aLabelLower;
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index c64c7c465aa4..bd80ce3b4765 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1315,17 +1315,17 @@ public:
{
// Layout name takes precedence.
const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
- if (pLayoutName && ScGlobal::getCharClassPtr()->uppercase(*pLayoutName) == maName)
+ if (pLayoutName && ScGlobal::getCharClass().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::getCharClassPtr()->uppercase(aFuncName))
+ if (maName == ScGlobal::getCharClass().uppercase(aFuncName))
return true;
- return maName == ScGlobal::getCharClassPtr()->uppercase(aSrcName);
+ return maName == ScGlobal::getCharClass().uppercase(aSrcName);
}
};
@@ -1368,7 +1368,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::getCharClassPtr()->uppercase(rDataFieldName)));
+ FindByName(ScGlobal::getCharClass().uppercase(rDataFieldName)));
if (it == aDataDims.end())
return std::numeric_limits<double>::quiet_NaN();
diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx
index 529abae7dd2e..0080f1931809 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -99,7 +99,7 @@ void ScDPResultTree::add(
// See if this dimension exists.
auto& rDims = pMemNode->maChildDimensions;
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(filter.maDimName);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(filter.maDimName);
auto itDim = rDims.find(aUpperName);
if (itDim == rDims.end())
{
@@ -114,7 +114,7 @@ void ScDPResultTree::add(
// Now, see if this dimension member exists.
DimensionNode& rDim = itDim->second;
MembersType& rMembersValueNames = rDim.maChildMembersValueNames;
- aUpperName = ScGlobal::getCharClassPtr()->uppercase(filter.maValueName);
+ aUpperName = ScGlobal::getCharClass().uppercase(filter.maValueName);
MembersType::iterator itMem = rMembersValueNames.find(aUpperName);
if (itMem == rMembersValueNames.end())
{
@@ -134,7 +134,7 @@ void ScDPResultTree::add(
if (!filter.maValue.isEmpty() && filter.maValue != filter.maValueName)
{
MembersType& rMembersValues = rDim.maChildMembersValues;
- aUpperName = ScGlobal::getCharClassPtr()->uppercase(filter.maValue);
+ aUpperName = ScGlobal::getCharClass().uppercase(filter.maValue);
MembersType::iterator itMemVal = rMembersValues.find(aUpperName);
if (itMemVal == rMembersValues.end())
{
@@ -154,8 +154,8 @@ void ScDPResultTree::add(
if (pDimName && pMemName)
{
NamePairType aNames(
- ScGlobal::getCharClassPtr()->uppercase(*pDimName),
- ScGlobal::getCharClassPtr()->uppercase(*pMemName));
+ ScGlobal::getCharClass().uppercase(*pDimName),
+ ScGlobal::getCharClass().uppercase(*pMemName));
LeafValuesType::iterator it = maLeafValues.find(aNames);
if (it == maLeafValues.end())
@@ -198,7 +198,7 @@ const ScDPResultTree::ValuesType* ScDPResultTree::getResults(
for (const sheet::DataPilotFieldFilter& rFilter : rFilters)
{
auto itDim = pMember->maChildDimensions.find(
- ScGlobal::getCharClassPtr()->uppercase(rFilter.FieldName));
+ ScGlobal::getCharClass().uppercase(rFilter.FieldName));
if (itDim == pMember->maChildDimensions.end())
// Specified dimension not found.
@@ -206,12 +206,12 @@ const ScDPResultTree::ValuesType* ScDPResultTree::getResults(
const DimensionNode& rDim = itDim->second;
MembersType::const_iterator itMem( rDim.maChildMembersValueNames.find(
- ScGlobal::getCharClassPtr()->uppercase( rFilter.MatchValueName)));
+ ScGlobal::getCharClass().uppercase( rFilter.MatchValueName)));
if (itMem == rDim.maChildMembersValueNames.end())
{
// Specified member name not found, try locale independent value.
- itMem = rDim.maChildMembersValues.find( ScGlobal::getCharClassPtr()->uppercase( rFilter.MatchValue));
+ itMem = rDim.maChildMembersValues.find( ScGlobal::getCharClass().uppercase( rFilter.MatchValue));
if (itMem == rDim.maChildMembersValues.end())
// Specified member not found.
@@ -245,8 +245,8 @@ const ScDPResultTree::ValuesType* ScDPResultTree::getResults(
double ScDPResultTree::getLeafResult(const css::sheet::DataPilotFieldFilter& rFilter) const
{
NamePairType aPair(
- ScGlobal::getCharClassPtr()->uppercase(rFilter.FieldName),
- ScGlobal::getCharClassPtr()->uppercase(rFilter.MatchValueName));
+ ScGlobal::getCharClass().uppercase(rFilter.FieldName),
+ ScGlobal::getCharClass().uppercase(rFilter.MatchValueName));
LeafValuesType::const_iterator it = maLeafValues.find(aPair);
if (it != maLeafValues.end())
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index bda05c4c03ca..dba57fde08da 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -239,7 +239,7 @@ const ScRange& ScSheetSourceDesc::GetSourceRange() const
if (!pRangeName)
break;
- OUString aUpper = ScGlobal::getCharClassPtr()->uppercase(maRangeName);
+ OUString aUpper = ScGlobal::getCharClass().uppercase(maRangeName);
const ScRangeData* pData = pRangeName->findByUpperName(aUpper);
if (!pData)
break;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 4f55f36a2c7a..3b3db8292df2 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -1009,13 +1009,13 @@ const LocaleDataWrapper* ScGlobal::getLocaleDataPtr()
return &xSysLocale->GetLocaleData();
}
-const CharClass* ScGlobal::getCharClassPtr()
+const CharClass& ScGlobal::getCharClass()
{
OSL_ENSURE(
xSysLocale,
"ScGlobal::getCharClassPtr() called before ScGlobal::Init()");
- return &xSysLocale->GetCharClass();
+ return xSysLocale->GetCharClass();
}
CalendarWrapper* ScGlobal::GetCalendar()
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 9bb62cdb2bf6..5c0a5b313c18 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -381,7 +381,7 @@ namespace {
struct CaseInsensitiveNamePredicate : svl::StyleSheetPredicate
{
CaseInsensitiveNamePredicate(const OUString& rName, SfxStyleFamily eFam)
- : mUppercaseName(ScGlobal::getCharClassPtr()->uppercase(rName)), mFamily(eFam)
+ : mUppercaseName(ScGlobal::getCharClass().uppercase(rName)), mFamily(eFam)
{
}
@@ -390,7 +390,7 @@ struct CaseInsensitiveNamePredicate : svl::StyleSheetPredicate
{
if (rStyleSheet.GetFamily() == mFamily)
{
- OUString aUpName = ScGlobal::getCharClassPtr()->uppercase(rStyleSheet.GetName());
+ OUString aUpName = ScGlobal::getCharClass().uppercase(rStyleSheet.GetName());
if (mUppercaseName == aUpName)
{
return true;
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 91cffab2f640..3974ad7f5a9e 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -359,7 +359,7 @@ void ScTable::SetName( const OUString& rNewName )
const OUString& ScTable::GetUpperName() const
{
if (aUpperName.isEmpty() && !aName.isEmpty())
- aUpperName = ScGlobal::getCharClassPtr()->uppercase(aName);
+ aUpperName = ScGlobal::getCharClass().uppercase(aName);
return aUpperName;
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 726c1017cb3d..04d7a8092e4e 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -4048,7 +4048,7 @@ bool ScTable::RefVisible(const ScFormulaCell* pCell)
void ScTable::GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr)
{
GetInputString(nCol, nRow, rStr);
- rStr = ScGlobal::getCharClassPtr()->uppercase(rStr.trim());
+ rStr = ScGlobal::getCharClass().uppercase(rStr.trim());
}
// Calculate the size of the sheet and set the size on DrawPage
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 6356c7a2fe05..4dfe006b4bc5 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -113,7 +113,7 @@ static bool SplitString( const OUString &sWhole,
sal_Int32 nPos = 0;
while (nPos < sWhole.getLength())
{
- const sal_uInt16 nType = ScGlobal::getCharClassPtr()->getCharacterType( sWhole, nPos);
+ const sal_uInt16 nType = ScGlobal::getCharClass().getCharacterType( sWhole, nPos);
if (nType & KCharacterType::DIGIT)
break;
sWhole.iterateCodePoints( &nPos );
@@ -125,7 +125,7 @@ static bool SplitString( const OUString &sWhole,
// Get numeral element
const OUString& sUser = ScGlobal::getLocaleDataPtr()->getNumDecimalSep();
- ParseResult aPRNum = ScGlobal::getCharClassPtr()->parsePredefinedToken(
+ ParseResult aPRNum = ScGlobal::getCharClass().parsePredefinedToken(
KParseType::ANY_NUMBER, sWhole, nPos,
KParseTokens::ANY_NUMBER, "", KParseTokens::ANY_NUMBER, sUser );
@@ -2120,7 +2120,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
GetString( nGroupCol[i], nStartRow, aSubString );
if ( bIgnoreCase )
- aCompString[i] = ScGlobal::getCharClassPtr()->uppercase( aSubString );
+ aCompString[i] = ScGlobal::getCharClass().uppercase( aSubString );
else
aCompString[i] = aSubString;
} // aSubString stays on the last
@@ -2140,7 +2140,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
GetString( nGroupCol[i], nRow, aString );
if (bIgnoreCase)
- aString = ScGlobal::getCharClassPtr()->uppercase(aString);
+ aString = ScGlobal::getCharClass().uppercase(aString);
// when sorting, blanks are separate group
// otherwise blank cells are allowed below
bChanged = ( ( !aString.isEmpty() || rParam.bDoSort ) &&
@@ -2200,7 +2200,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
GetString( nGroupCol[i], nRow, aSubString );
if ( bIgnoreCase )
- aCompString[i] = ScGlobal::getCharClassPtr()->uppercase( aSubString );
+ aCompString[i] = ScGlobal::getCharClass().uppercase( aSubString );
else
aCompString[i] = aSubString;
}
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 986acb4aeb92..3774d8d06790 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -91,8 +91,8 @@ ScUnoAddInFuncData::ScUnoAddInFuncData( const OUString& rNam, const OUString& rL
pArgDescs[i] = pAD[i];
}
- aUpperName = ScGlobal::getCharClassPtr()->uppercase(aUpperName);
- aUpperLocal = ScGlobal::getCharClassPtr()->uppercase(aUpperLocal);
+ aUpperName = ScGlobal::getCharClass().uppercase(aUpperName);
+ aUpperLocal = ScGlobal::getCharClass().uppercase(aUpperLocal);
}
ScUnoAddInFuncData::~ScUnoAddInFuncData()
@@ -569,7 +569,7 @@ bool ScUnoAddInCollection::GetCalcName( const OUString& rExcelName, OUString& rR
if (!bInitialized)
Initialize();
- OUString aUpperCmp = ScGlobal::getCharClassPtr()->uppercase(rExcelName);
+ OUString aUpperCmp = ScGlobal::getCharClass().uppercase(rExcelName);
for (tools::Long i=0; i<nFuncCount; i++)
{
@@ -579,7 +579,7 @@ bool ScUnoAddInCollection::GetCalcName( const OUString& rExcelName, OUString& rR
const ::std::vector<ScUnoAddInFuncData::LocalizedName>& rNames = pFuncData->GetCompNames();
auto bFound = std::any_of(rNames.begin(), rNames.end(),
[&aUpperCmp](const ScUnoAddInFuncData::LocalizedName& rName) {
- return ScGlobal::getCharClassPtr()->uppercase( rName.maName ) == aUpperCmp; });
+ return ScGlobal::getCharClass().uppercase( rName.maName ) == aUpperCmp; });
if (bFound)
{
//TODO: store upper case for comparing?
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index 0baf60a334a2..0a394cc86900 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -98,7 +98,7 @@ void ScChangeViewSettings::SetTheComment(const OUString& rString)
utl::SearchParam aSearchParam( rString,
utl::SearchParam::SearchType::Regexp,false );
- pCommentSearcher.reset( new utl::TextSearch( aSearchParam, *ScGlobal::getCharClassPtr() ) );
+ pCommentSearcher.reset( new utl::TextSearch( aSearchParam, ScGlobal::getCharClass() ) );
}
}
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 006c1555ad9f..d2627be3dfdf 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -297,7 +297,7 @@ void ScCompiler::SetFormulaLanguage( const ScCompiler::OpCodeMapPtr & xMap )
// though even de-DE and de-CH may differ in ß/SS handling..
// At least don't care if both are English.
// The current locale is more likely to not be "en" so check first.
- const LanguageTag& rLT1 = ScGlobal::getCharClassPtr()->getLanguageTag();
+ const LanguageTag& rLT1 = ScGlobal::getCharClass().getLanguageTag();
const LanguageTag& rLT2 = pCharClass->getLanguageTag();
mbCharClassesDiffer = (rLT1 != rLT2 && (rLT1.getLanguage() != "en" || rLT2.getLanguage() != "en"));
@@ -1835,7 +1835,7 @@ ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos,
mpInterpreterContext(pContext),
mnCurrentSheetTab(-1),
mnCurrentSheetEndPos(0),
- pCharClass(ScGlobal::getCharClassPtr()),
+ pCharClass(&ScGlobal::getCharClass()),
mbCharClassesDiffer(false),
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
@@ -1860,7 +1860,7 @@ ScCompiler::ScCompiler( ScDocument& rDocument, const ScAddress& rPos, ScTokenArr
mnCurrentSheetTab(-1),
mnCurrentSheetEndPos(0),
nSrcPos(0),
- pCharClass( ScGlobal::getCharClassPtr() ),
+ pCharClass( &ScGlobal::getCharClass() ),
mbCharClassesDiffer(false),
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
@@ -1884,7 +1884,7 @@ ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos,
mpInterpreterContext(pContext),
mnCurrentSheetTab(-1),
mnCurrentSheetEndPos(0),
- pCharClass(ScGlobal::getCharClassPtr()),
+ pCharClass(&ScGlobal::getCharClass()),
mbCharClassesDiffer(false),
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
@@ -1909,7 +1909,7 @@ ScCompiler::ScCompiler( ScDocument& rDocument, const ScAddress& rPos,
mnCurrentSheetTab(-1),
mnCurrentSheetEndPos(0),
nSrcPos(0),
- pCharClass( ScGlobal::getCharClassPtr() ),
+ pCharClass( &ScGlobal::getCharClass() ),
mbCharClassesDiffer(false),
mnPredetectedReference(0),
mnRangeOpPosInSymbol(-1),
@@ -1933,7 +1933,7 @@ void ScCompiler::CheckTabQuotes( OUString& rString,
{
sal_Int32 nStartFlags = KParseTokens::ANY_LETTER_OR_NUMBER | KParseTokens::ASC_UNDERSCORE;
sal_Int32 nContFlags = nStartFlags;
- ParseResult aRes = ScGlobal::getCharClassPtr()->parsePredefinedToken(
+ ParseResult aRes = ScGlobal::getCharClass().parsePredefinedToken(
KParseType::IDENTNAME, rString, 0, nStartFlags, EMPTY_OUSTRING, nContFlags, EMPTY_OUSTRING);
bool bNeedsQuote = !((aRes.TokenType & KParseType::IDENTNAME) && aRes.EndPos == rString.getLength());
@@ -2787,8 +2787,8 @@ Label_MaskStateMachine:
cGroupSep != cSheetPrefix && cGroupSep != cSheetSep);
// If a numeric context triggered bi18n then use the default locale's
// CharClass, this may accept group separator as well.
- const CharClass* pMyCharClass = (ScGlobal::getCharClassPtr()->isDigit( OUString(pStart[nSrcPos]), 0) ?
- ScGlobal::getCharClassPtr() : pCharClass);
+ const CharClass* pMyCharClass = (ScGlobal::getCharClass().isDigit( OUString(pStart[nSrcPos]), 0) ?
+ &ScGlobal::getCharClass() : pCharClass);
OUStringBuffer aSymbol;
mnRangeOpPosInSymbol = -1;
FormulaError nErr = FormulaError::NONE;
@@ -4520,7 +4520,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
// more likely in that localized language than in the formula
// language. This in corner cases needs to continue to work for
// existing documents and environments.
- aUpper = ScGlobal::getCharClassPtr()->uppercase( aOrg );
+ aUpper = ScGlobal::getCharClass().uppercase( aOrg );
}
if (IsNamedRange( aUpper ))
@@ -5162,7 +5162,7 @@ bool ScCompiler::IsCharFlagAllConventions(
return true;
}
else
- return ScGlobal::getCharClassPtr()->isLetterNumeric( rStr, nPos );
+ return ScGlobal::getCharClass().isLetterNumeric( rStr, nPos );
}
void ScCompiler::CreateStringFromExternal( OUStringBuffer& rBuffer, const FormulaToken* pTokenP ) const
@@ -5440,7 +5440,7 @@ void ScCompiler::LocalizeString( OUString& rName ) const
// quote characters contained within are escaped by '\\'.
bool ScCompiler::EnQuote( OUString& rStr )
{
- sal_Int32 nType = ScGlobal::getCharClassPtr()->getStringType( rStr, 0, rStr.getLength() );
+ sal_Int32 nType = ScGlobal::getCharClass().getStringType( rStr, 0, rStr.getLength() );
if ( !CharClass::isNumericType( nType )
&& CharClass::isAlphaNumericType( nType ) )
return false;
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 4e38b2aaa676..a5af4404e47d 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -84,7 +84,7 @@ ScDBData::ScDBData( const OUString& rName,
mbTableColumnNamesDirty(true),
nFilteredRowCount(SCSIZE_MAX)
{
- aUpper = ScGlobal::getCharClassPtr()->uppercase(aUpper);
+ aUpper = ScGlobal::getCharClass().uppercase(aUpper);
}
ScDBData::ScDBData( const ScDBData& rData ) :
@@ -153,7 +153,7 @@ ScDBData::ScDBData( const OUString& rName, const ScDBData& rData ) :
mbTableColumnNamesDirty (rData.mbTableColumnNamesDirty),
nFilteredRowCount (rData.nFilteredRowCount)
{
- aUpper = ScGlobal::getCharClassPtr()->uppercase(aUpper);
+ aUpper = ScGlobal::getCharClass().uppercase(aUpper);
}
ScDBData& ScDBData::operator= (const ScDBData& rData)
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index a6c439c1c934..db5cda5f4fdb 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -41,7 +41,7 @@ namespace {
void lcl_uppercase(OUString& rStr)
{
- rStr = ScGlobal::getCharClassPtr()->uppercase(rStr.trim());
+ rStr = ScGlobal::getCharClass().uppercase(rStr.trim());
}
bool lcl_createStarQuery(
@@ -189,7 +189,7 @@ bool lcl_createExcelQuery(
while (nCol < nCols)
{
aCellStr = pQueryRef->getString(nCol, nRow);
- aCellStr = ScGlobal::getCharClassPtr()->uppercase( aCellStr );
+ aCellStr = ScGlobal::getCharClass().uppercase( aCellStr );
if (!aCellStr.isEmpty())
{
if (nIndex < nNewEntries)
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d3b7b8055084..8d2d81fe850a 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3149,7 +3149,7 @@ void ScInterpreter::ScTrim()
void ScInterpreter::ScUpper()
{
- OUString aString = ScGlobal::getCharClassPtr()->uppercase(GetString().getString());
+ OUString aString = ScGlobal::getCharClass().uppercase(GetString().getString());
PushString(aString);
}
@@ -3160,14 +3160,14 @@ void ScInterpreter::ScProper()
const sal_Int32 nLen = aStr.getLength();
if ( nLen > 0 )
{
- OUString aUpr(ScGlobal::getCharClassPtr()->uppercase(aStr.toString()));
- OUString aLwr(ScGlobal::getCharClassPtr()->lowercase(aStr.toString()));
+ OUString aUpr(ScGlobal::getCharClass().uppercase(aStr.toString()));
+ OUString aLwr(ScGlobal::getCharClass().lowercase(aStr.toString()));
aStr[0] = aUpr[0];
sal_Int32 nPos = 1;
while( nPos < nLen )
{
OUString aTmpStr( aStr[nPos-1] );
- if ( !ScGlobal::getCharClassPtr()->isLetter( aTmpStr, 0 ) )
+ if ( !ScGlobal::getCharClass().isLetter( aTmpStr, 0 ) )
aStr[nPos] = aUpr[nPos];
else
aStr[nPos] = aLwr[nPos];
@@ -3179,7 +3179,7 @@ void ScInterpreter::ScProper()
void ScInterpreter::ScLower()
{
- OUString aString = ScGlobal::getCharClassPtr()->lowercase(GetString().getString());
+ OUString aString = ScGlobal::getCharClass().lowercase(GetString().getString());
PushString(aString);
}
@@ -8134,7 +8134,7 @@ void ScInterpreter::ScIndirect()
do
{
- OUString aName( ScGlobal::getCharClassPtr()->uppercase( sRefStr));
+ OUString aName( ScGlobal::getCharClass().uppercase( sRefStr));
ScDBCollection::NamedDBs& rDBs = mrDoc.GetDBCollection()->getNamedDBs();
const ScDBData* pData = rDBs.findByUpperName( aName);
if (!pData)
@@ -9264,7 +9264,7 @@ void ScInterpreter::ScSearchB()
sal_Int32 nEndPos = aSubStr.getLength();
utl::SearchParam::SearchType eSearchType = DetectSearchType( asStr, mrDoc );
utl::SearchParam sPar( asStr, eSearchType, false, '~', false );
- utl::TextSearch sT( sPar, *ScGlobal::getCharClassPtr() );
+ utl::TextSearch sT( sPar, ScGlobal::getCharClass() );
if ( !sT.SearchForward( aSubStr, &nPos, &nEndPos ) )
PushNoValue();
else
@@ -9340,7 +9340,7 @@ void ScInterpreter::ScSearch()
{
utl::SearchParam::SearchType eSearchType = DetectSearchType( SearchStr, mrDoc );
utl::SearchParam sPar(SearchStr, eSearchType, false, '~', false);
- utl::TextSearch sT( sPar, *ScGlobal::getCharClassPtr() );
+ utl::TextSearch sT( sPar, ScGlobal::getCharClass() );
bool bBool = sT.SearchForward(sStr, &nPos, &nEndPos);
if (!bBool)
PushNoValue();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index d47c0d3a1e65..93fb46657fb4 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -2506,7 +2506,7 @@ void ScInterpreter::ScExternal()
{
sal_uInt8 nParamCount = GetByte();
OUString aUnoName;
- OUString aFuncName( ScGlobal::getCharClassPtr()->uppercase( pCur->GetExternal() ) );
+ OUString aFuncName( ScGlobal::getCharClass().uppercase( pCur->GetExternal() ) );
LegacyFuncData* pLegacyFuncData = ScGlobal::GetLegacyFuncCollection()->findByName(aFuncName);
if (pLegacyFuncData)
{
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index eca9d204855a..81c6df1b0b39 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -407,7 +407,7 @@ formula::ParamClass ScParameterClassification::GetExternalParameterType( const f
return eRet;
// similar to ScInterpreter::ScExternal()
- OUString aFuncName = ScGlobal::getCharClassPtr()->uppercase( pToken->GetExternal());
+ OUString aFuncName = ScGlobal::getCharClass().uppercase( pToken->GetExternal());
{
const LegacyFuncData* pLegacyFuncData = ScGlobal::GetLegacyFuncCollection()->findByName(aFuncName);
if (pLegacyFuncData)
diff --git a/sc/source/core/tool/queryentry.cxx b/sc/source/core/tool/queryentry.cxx
index 121c257e0cf6..c94c6225f625 100644
--- a/sc/source/core/tool/queryentry.cxx
+++ b/sc/source/core/tool/queryentry.cxx
@@ -198,7 +198,7 @@ utl::TextSearch* ScQueryEntry::GetSearchTextPtr( utl::SearchParam::SearchType eS
OUString aStr = maQueryItems[0].maString.getString();
pSearchParam.reset(new utl::SearchParam(
aStr, eSearchType, bCaseSens, '~', bWildMatchSel));
- pSearchText.reset(new utl::TextSearch( *pSearchParam, *ScGlobal::getCharClassPtr() ));
+ pSearchText.reset(new utl::TextSearch( *pSearchParam, ScGlobal::getCharClass() ));
}
return pSearchText.get();
}
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 5465a289d240..debd75c30d44 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -48,7 +48,7 @@ ScRangeData::ScRangeData( ScDocument& rDok,
Type nType,
const FormulaGrammar::Grammar eGrammar ) :
aName ( rName ),
- aUpperName ( ScGlobal::getCharClassPtr()->uppercase( rName ) ),
+ aUpperName ( ScGlobal::getCharClass().uppercase( rName ) ),
aPos ( rAddress ),
eType ( nType ),
rDoc ( rDok ),
@@ -82,7 +82,7 @@ ScRangeData::ScRangeData( ScDocument& rDok,
const ScAddress& rAddress,
Type nType ) :
aName ( rName ),
- aUpperName ( ScGlobal::getCharClassPtr()->uppercase( rName ) ),
+ aUpperName ( ScGlobal::getCharClass().uppercase( rName ) ),
pCode ( new ScTokenArray( rArr ) ),
aPos ( rAddress ),
eType ( nType ),
@@ -99,7 +99,7 @@ ScRangeData::ScRangeData( ScDocument& rDok,
const OUString& rName,
const ScAddress& rTarget ) :
aName ( rName ),
- aUpperName ( ScGlobal::getCharClassPtr()->uppercase( rName ) ),
+ aUpperName ( ScGlobal::getCharClass().uppercase( rName ) ),
pCode ( new ScTokenArray(rDok) ),
aPos ( rTarget ),
eType ( Type::Name ),
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index a80db03c56f1..34541e590f09 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -275,7 +275,7 @@ bool ScRangeUtil::MakeRangeFromName (
}
}
- aName = ScGlobal::getCharClassPtr()->uppercase(aName);
+ aName = ScGlobal::getCharClass().uppercase(aName);
ScRangeData* pData = nullptr;
if (eScope != RUTL_NAMES_GLOBAL)
{
@@ -324,7 +324,7 @@ bool ScRangeUtil::MakeRangeFromName (
else if( eScope==RUTL_DBASE )
{
ScDBCollection::NamedDBs& rDbNames = rDoc.GetDBCollection()->getNamedDBs();
- ScDBData* pData = rDbNames.findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rName));
+ ScDBData* pData = rDbNames.findByUpperName(ScGlobal::getCharClass().uppercase(rName));
if (pData)
{
pData->GetArea(nTab, nColStart, nRowStart, nColEnd, nRowEnd);
@@ -945,12 +945,12 @@ ScRangeData* ScRangeStringConverter::GetRangeDataFromString( const OUString& rSt
return nullptr;
const OUString aName( rString.copy( nIndex+1));
- return pLocalRangeName->findByUpperName( ScGlobal::getCharClassPtr()->uppercase( aName));
+ return pLocalRangeName->findByUpperName( ScGlobal::getCharClass().uppercase( aName));
}
ScRangeName* pLocalRangeName = rDoc.GetRangeName(nTab);
ScRangeData* pData = nullptr;
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rString);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(rString);
if(pLocalRangeName)
{
pData = pLocalRangeName->findByUpperName(aUpperName);
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index 01815baacce2..5887a7257cb9 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -69,7 +69,7 @@ void ScUserListData::InitTokens()
if (nLen)
{
OUString aSub(p0, nLen);
- OUString aUpStr = ScGlobal::getCharClassPtr()->uppercase(aSub);
+ OUString aUpStr = ScGlobal::getCharClass().uppercase(aSub);
maSubStrings.emplace_back(aSub, aUpStr);
}
bFirst = true;
@@ -79,7 +79,7 @@ void ScUserListData::InitTokens()
if (nLen)
{
OUString aSub(p0, nLen);
- OUString aUpStr = ScGlobal::getCharClassPtr()->uppercase(aSub);
+ OUString aUpStr = ScGlobal::getCharClass().uppercase(aSub);
maSubStrings.emplace_back(aSub, aUpStr);
}
}
@@ -124,7 +124,7 @@ bool ScUserListData::GetSubIndex(const OUString& rSubStr, sal_uInt16& rIndex, bo
}
// When that fails, do a case insensitive search.
- OUString aUpStr = ScGlobal::getCharClassPtr()->uppercase(rSubStr);
+ OUString aUpStr = ScGlobal::getCharClass().uppercase(rSubStr);
itr = ::std::find_if(
maSubStrings.begin(), maSubStrings.end(), FindByName(aUpStr, true));
if (itr != maSubStrings.end())
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index f1004ba0fe73..575b67ff7001 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -189,7 +189,7 @@ void ScHTMLImport::WriteToDocument(
if (!pTable->GetTableCaption().isEmpty())
aName.append(" - " + pTable->GetTableCaption());
if (!mpDoc->GetRangeName()->findByUpperName(
- ScGlobal::getCharClassPtr()->uppercase(aName.toString())))
+ ScGlobal::getCharClass().uppercase(aName.toString())))
InsertRangeName(*mpDoc, aName.toString(), aNewRange);
}
@@ -218,7 +218,7 @@ OUString ScHTMLImport::GetHTMLRangeNameList( const ScDocument& rDoc, const OUStr
for(;;)
{
aToken = ScfTools::GetNameFromHTMLIndex( nIndex++ );
- const ScRangeData* pRangeData = pRangeNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aToken));
+ const ScRangeData* pRangeData = pRangeNames->findByUpperName(ScGlobal::getCharClass().uppercase(aToken));
if (!pRangeData)
break;
ScRange aRange;
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index fe66af90b95f..322986e9ba25 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -383,7 +383,7 @@ OUString findUnusedName( const ScRangeName* pRangeName, const OUString& rSuggest
{
OUString aNewName = rSuggestedName;
sal_Int32 nIndex = 0;
- while(pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aNewName)))
+ while(pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(aNewName)))
aNewName = rSuggestedName + OUStringChar('_') + OUString::number( nIndex++ );
return aNewName;
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index e06435de3697..59b491d26c57 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -414,7 +414,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
bHasGraphics |= GraphicSize( nCol, nRow, pE );
if ( pE->pName )
{ // Anchor Name => RangeName
- if (!pRangeNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(*pE->pName)))
+ if (!pRangeNames->findByUpperName(ScGlobal::getCharClass().uppercase(*pE->pName)))
{
ScRangeData* pData = new ScRangeData( *mpDoc, *pE->pName,
ScAddress( nCol, nRow, nTab ) );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 504747c8ee28..4c052ab7b1fa 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1308,7 +1308,7 @@ bool ScInputHandler::GetFuncName( OUString& aStart, OUString& aResult )
if ( aStart.isEmpty() )
return false;
- aStart = ScGlobal::getCharClassPtr()->uppercase( aStart );
+ aStart = ScGlobal::getCharClass().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
@@ -1485,7 +1485,7 @@ void ScInputHandler::UseFormulaData()
return;
if ( aParagraph.getLength() > aSel.nEndPos &&
- ( ScGlobal::getCharClassPtr()->isLetterNumeric( aParagraph, aSel.nEndPos ) ||
+ ( ScGlobal::getCharClass().isLetterNumeric( aParagraph, aSel.nEndPos ) ||
aParagraph[ aSel.nEndPos ] == '_' ||
aParagraph[ aSel.nEndPos ] == '.' ||
aParagraph[ aSel.nEndPos ] == '$' ) )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index bee2461fa85d..37dab304f3c9 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2534,7 +2534,7 @@ void ScPosWnd::DoEnter()
{
ScRangeName* pNames = rDoc.GetRangeName();
ScRange aSelection;
- if ( pNames && !pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aText)) &&
+ if ( pNames && !pNames->findByUpperName(ScGlobal::getCharClass().uppercase(aText)) &&
(rViewData.GetSimpleArea( aSelection ) == SC_MARK_SIMPLE) )
{
ScRangeName aNewRanges( *pNames );
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index c6ef7d8bf9b6..d092a5f60848 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -699,7 +699,7 @@ namespace
IMPL_LINK_NOARG(ScCheckListMenuControl, EdModifyHdl, weld::Entry&, void)
{
OUString aSearchText = mxEdSearch->get_text();
- aSearchText = ScGlobal::getCharClassPtr()->lowercase( aSearchText );
+ aSearchText = ScGlobal::getCharClass().lowercase( aSearchText );
bool bSearchTextEmpty = aSearchText.isEmpty();
size_t n = maMembers.size();
size_t nSelCount = 0;
@@ -724,9 +724,9 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, EdModifyHdl, weld::Entry&, void)
if ( !bSearchTextEmpty )
{
if ( !bIsDate )
- bPartialMatch = ( ScGlobal::getCharClassPtr()->lowercase( aLabelDisp ).indexOf( aSearchText ) != -1 );
+ bPartialMatch = ( ScGlobal::getCharClass().lowercase( aLabelDisp ).indexOf( aSearchText ) != -1 );
else if ( maMembers[i].meDatePartType == ScCheckListMember::DAY ) // Match with both numerical and text version of month
- bPartialMatch = (ScGlobal::getCharClassPtr()->lowercase( OUString(
+ bPartialMatch = (ScGlobal::getCharClass().lowercase( OUString(
maMembers[i].maRealName + maMembers[i].maDateParts[1] )).indexOf( aSearchText ) != -1);
else
continue;
@@ -795,7 +795,7 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, EdModifyHdl, weld::Entry&, void)
if ( aLabelDisp.isEmpty() )
aLabelDisp = ScResId( STR_EMPTYDATA );
- bool bPartialMatch = ScGlobal::getCharClassPtr()->lowercase( aLabelDisp ).indexOf( aSearchText ) != -1;
+ bool bPartialMatch = ScGlobal::getCharClass().lowercase( aLabelDisp ).indexOf( aSearchText ) != -1;
if (!bPartialMatch)
continue;
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index af01abcaa316..319ca367b204 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -452,14 +452,14 @@ void StyleSelect(weld::Window* pDialogParent, weld::ComboBox& rLbStyle, const Sc
{
for( sal_Int32 i = 1, n = rLbStyle.get_count(); i <= n && !bFound; ++i)
{
- OUString aStyleName = ScGlobal::getCharClassPtr()->uppercase(rLbStyle.get_text(i));
+ OUString aStyleName = ScGlobal::getCharClass().uppercase(rLbStyle.get_text(i));
if( i == n )
{
rLbStyle.append_text(aName);
rLbStyle.set_active_text(aName);
bFound = true;
}
- else if( aStyleName > ScGlobal::getCharClassPtr()->uppercase(aName) )
+ else if( aStyleName > ScGlobal::getCharClass().uppercase(aName) )
{
rLbStyle.insert_text(i, aName);
rLbStyle.set_active_text(aName);
diff --git a/sc/source/ui/dataprovider/dataprovider.cxx b/sc/source/ui/dataprovider/dataprovider.cxx
index 1d1efc9d77d0..ff0ee8626fef 100644
--- a/sc/source/ui/dataprovider/dataprovider.cxx
+++ b/sc/source/ui/dataprovider/dataprovider.cxx
@@ -262,7 +262,7 @@ void ScDBDataManager::SetDatabase(const OUString& rDBName)
ScDBData* ScDBDataManager::getDBData()
{
- ScDBData* pDBData = mpDoc->GetDBCollection()->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(maDBName));
+ ScDBData* pDBData = mpDoc->GetDBCollection()->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(maDBName));
return pDBData;
}
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index 004c82a3c024..4039f336be80 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -214,7 +214,7 @@ void TextTransformation::Transform(ScDocument& rDoc) const
if (eType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(rCol, nRow, 0);
- rDoc.SetString(rCol, nRow, 0, ScGlobal::getCharClassPtr()->lowercase(aStr));
+ rDoc.SetString(rCol, nRow, 0, ScGlobal::getCharClass().lowercase(aStr));
}
}
}
@@ -228,7 +228,7 @@ void TextTransformation::Transform(ScDocument& rDoc) const
if (eType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(rCol, nRow, 0);
- rDoc.SetString(rCol, nRow, 0, ScGlobal::getCharClassPtr()->uppercase(aStr));
+ rDoc.SetString(rCol, nRow, 0, ScGlobal::getCharClass().uppercase(aStr));
}
}
}
@@ -246,16 +246,16 @@ void TextTransformation::Transform(ScDocument& rDoc) const
sal_Int32 length = aStr.getLength();
if(length != 0)
- aStr = aStr.replaceAt(0, 1, ScGlobal::getCharClassPtr()->uppercase(OUString(aStr[0])));
+ aStr = aStr.replaceAt(0, 1, ScGlobal::getCharClass().uppercase(OUString(aStr[0])));
for (sal_Int32 i = 1; i < length; i++){
if (aStr[i-1] == sal_Unicode(U' '))
{
- aStr = aStr.replaceAt(i, 1, ScGlobal::getCharClassPtr()->uppercase(OUString(aStr[i])));
+ aStr = aStr.replaceAt(i, 1, ScGlobal::getCharClass().uppercase(OUString(aStr[i])));
}
else
{
- aStr = aStr.replaceAt(i, 1, ScGlobal::getCharClassPtr()->lowercase(OUString(aStr[i])));
+ aStr = aStr.replaceAt(i, 1, ScGlobal::getCharClass().lowercase(OUString(aStr[i])));
}
}
rDoc.SetString(rCol, nRow, 0, aStr);
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 1043e899af6d..48f9d9b0a16f 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -338,7 +338,7 @@ void ScDbNameDlg::UpdateNames()
void ScDbNameDlg::UpdateDBData( const OUString& rStrName )
{
- const ScDBData* pData = aLocalDbCol.getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rStrName));
+ const ScDBData* pData = aLocalDbCol.getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(rStrName));
if ( pData )
{
@@ -416,7 +416,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl, weld::Button&, void)
ScAddress aStart = theCurArea.aStart;
ScAddress aEnd = theCurArea.aEnd;
- ScDBData* pOldEntry = aLocalDbCol.getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aNewName));
+ ScDBData* pOldEntry = aLocalDbCol.getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(aNewName));
if (pOldEntry)
{
// modify area
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index e44e364c461a..c3eab91125db 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -182,7 +182,7 @@ bool ScAreaLink::IsEqual( std::u16string_view rFile, std::u16string_view rFilter
bool ScAreaLink::FindExtRange( ScRange& rRange, const ScDocument& rSrcDoc, const OUString& rAreaName )
{
bool bFound = false;
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rAreaName);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(rAreaName);
ScRangeName* pNames = rSrcDoc.GetRangeName();
if (pNames) // named ranges
{
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 9f7530b6bbf4..db9337c7d86b 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -123,7 +123,7 @@ bool ScDBDocFunc::DeleteDBRange(const OUString& rName)
bool bUndo = rDoc.IsUndoEnabled();
ScDBCollection::NamedDBs& rDBs = pDocColl->getNamedDBs();
- auto const iter = rDBs.findByUpperName2(ScGlobal::getCharClassPtr()->uppercase(rName));
+ auto const iter = rDBs.findByUpperName2(ScGlobal::getCharClass().uppercase(rName));
if (iter != rDBs.end())
{
ScDocShellModificator aModificator( rDocShell );
@@ -158,8 +158,8 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew )
ScDBCollection* pDocColl = rDoc.GetDBCollection();
bool bUndo = rDoc.IsUndoEnabled();
ScDBCollection::NamedDBs& rDBs = pDocColl->getNamedDBs();
- auto const iterOld = rDBs.findByUpperName2(ScGlobal::getCharClassPtr()->uppercase(rOld));
- const ScDBData* pNew = rDBs.findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rNew));
+ auto const iterOld = rDBs.findByUpperName2(ScGlobal::getCharClass().uppercase(rOld));
+ const ScDBData* pNew = rDBs.findByUpperName(ScGlobal::getCharClass().uppercase(rNew));
if (iterOld != rDBs.end() && !pNew)
{
ScDocShellModificator aModificator( rDocShell );
@@ -298,7 +298,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed,
{
ScDBCollection* pColl = rDoc.GetDBCollection();
if (pColl)
- pDBData = pColl->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rDBName));
+ pDBData = pColl->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(rDBName));
}
if ( pDBData )
@@ -1730,7 +1730,7 @@ void ScDBDocFunc::UpdateImport( const OUString& rTarget, const svx::ODataAccessD
ScDocument& rDoc = rDocShell.GetDocument();
ScDBCollection& rDBColl = *rDoc.GetDBCollection();
- const ScDBData* pData = rDBColl.getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rTarget));
+ const ScDBData* pData = rDBColl.getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(rTarget));
if (!pData)
{
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(ScDocShell::GetActiveDialogParent(),
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 1972c9f364bd..a598f07708cb 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5222,7 +5222,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
rDoc, ScRefFlags::RANGE_ABS_3D, ScAddress::Details( rDoc.GetAddressConvention(), nPosY, nPosX)));
bool bInsert = false;
- ScRangeData* pOld = rList.findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName));
+ ScRangeData* pOld = rList.findByUpperName(ScGlobal::getCharClass().uppercase(aName));
if (pOld)
{
OUString aOldStr;
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index cba881387d26..3730cc10ae15 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -286,7 +286,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (bIsNewArea)
{
ScDBCollection* pDBColl = m_aDocument.GetDBCollection();
- if ( !pDBColl || !pDBColl->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(sTarget)) )
+ if ( !pDBColl || !pDBColl->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(sTarget)) )
{
ScAddress aPos;
if ( aPos.Parse( sTarget, m_aDocument, m_aDocument.GetAddressConvention() ) & ScRefFlags::VALID )
@@ -2480,7 +2480,7 @@ bool ScDocShell::DdeSetData( const OUString& rItem,
ScRangeName* pRange = m_aDocument.GetRangeName();
if( pRange )
{
- const ScRangeData* pData = pRange->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aPos));
+ const ScRangeData* pData = pRange->findByUpperName(ScGlobal::getCharClass().uppercase(aPos));
if (pData)
{
if( pData->HasType( ScRangeData::Type::RefArea )
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 3afc8c5b4fa5..275bb6ff9dc1 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -302,7 +302,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
{
++nCount;
aNewName = aImport + OUString::number( nCount );
- pDummy = rDBs.findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aNewName));
+ pDummy = rDBs.findByUpperName(ScGlobal::getCharClass().uppercase(aNewName));
}
while (pDummy);
pNoNameData = new ScDBData( aNewName, nTab,
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index ef39156c0c11..fc955975bc70 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -84,7 +84,7 @@ class TabNameSearchPredicate
{
public:
explicit TabNameSearchPredicate(const OUString& rSearchName) :
- maSearchName(ScGlobal::getCharClassPtr()->uppercase(rSearchName))
+ maSearchName(ScGlobal::getCharClass().uppercase(rSearchName))
{
}
@@ -498,7 +498,7 @@ const OUString* ScExternalRefCache::getRealRangeName(sal_uInt16 nFileId, const O
const DocItem& rDoc = itrDoc->second;
NamePairMap::const_iterator itr = rDoc.maRealRangeNameMap.find(
- ScGlobal::getCharClassPtr()->uppercase(rRangeName));
+ ScGlobal::getCharClass().uppercase(rRangeName));
if (itr == rDoc.maRealRangeNameMap.end())
// range name not found.
return nullptr;
@@ -717,7 +717,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getRangeNameTokens(sal_uIn
RangeNameMap& rMap = pDoc->maRangeNames;
RangeNameMap::const_iterator itr = rMap.find(
- ScGlobal::getCharClassPtr()->uppercase(rName));
+ ScGlobal::getCharClass().uppercase(rName));
if (itr == rMap.end())
return TokenArrayRef();
@@ -732,7 +732,7 @@ void ScExternalRefCache::setRangeNameTokens(sal_uInt16 nFileId, const OUString&
if (!pDoc)
return;
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rName);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(rName);
RangeNameMap& rMap = pDoc->maRangeNames;
rMap.emplace(aUpperName, pArray);
pDoc->maRealRangeNameMap.emplace(aUpperName, rName);
@@ -758,7 +758,7 @@ void ScExternalRefCache::setRangeName(sal_uInt16 nFileId, const OUString& rName)
if (!pDoc)
return;
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rName);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(rName);
pDoc->maRealRangeNameMap.emplace(aUpperName, rName);
}
@@ -929,7 +929,7 @@ void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const vector<OUString
aNewTabNames.reserve(n);
for (const auto& rTabName : rTabNames)
{
- TableName aNameItem(ScGlobal::getCharClassPtr()->uppercase(rTabName), rTabName);
+ TableName aNameItem(ScGlobal::getCharClass().uppercase(rTabName), rTabName);
aNewTabNames.push_back(aNameItem);
}
pDoc->maTableNames.swap(aNewTabNames);
@@ -974,7 +974,7 @@ void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const vector<OUString
ScExternalRefCache::TableNameIndexMap::const_iterator ScExternalRefCache::DocItem::findTableNameIndex(
const OUString& rTabName ) const
{
- const OUString aTabNameUpper = ScGlobal::getCharClassPtr()->uppercase( rTabName);
+ const OUString aTabNameUpper = ScGlobal::getCharClass().uppercase( rTabName);
TableNameIndexMap::const_iterator itrTabName = maTableNameIndex.find( aTabNameUpper);
if (itrTabName != maTableNameIndex.end())
return itrTabName;
@@ -988,7 +988,7 @@ ScExternalRefCache::TableNameIndexMap::const_iterator ScExternalRefCache::DocIte
// maSingleTableNameAlias has been set up only if the original file loaded
// had exactly one sheet and internal sheet name was Sheet1 or localized or
// customized equivalent, or base name.
- if (aTabNameUpper == ScGlobal::getCharClassPtr()->uppercase( maSingleTableNameAlias))
+ if (aTabNameUpper == ScGlobal::getCharClass().uppercase( maSingleTableNameAlias))
return maTableNameIndex.begin();
return itrTabName;
@@ -1350,7 +1350,7 @@ ScExternalRefCache::TableTypeRef ScExternalRefCache::getCacheTable(sal_uInt16 nF
}
// Specified table doesn't exist yet. Create one.
- OUString aTabNameUpper = ScGlobal::getCharClassPtr()->uppercase(rTabName);
+ OUString aTabNameUpper = ScGlobal::getCharClass().uppercase(rTabName);
nIndex = rDoc.maTables.size();
if( pnIndex ) *pnIndex = nIndex;
TableTypeRef pTab = std::make_shared<Table>();
@@ -2065,7 +2065,7 @@ namespace {
bool hasRangeName(const ScDocument& rDoc, const OUString& rName)
{
ScRangeName* pExtNames = rDoc.GetRangeName();
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rName);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(rName);
const ScRangeData* pRangeData = pExtNames->findByUpperName(aUpperName);
return pRangeData != nullptr;
}
@@ -2261,7 +2261,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokensFromSr
vector<ScExternalRefCache::SingleRangeData> aCacheData;
aCacheData.reserve(nTabSpan+1);
aCacheData.emplace_back();
- aCacheData.back().maTableName = ScGlobal::getCharClassPtr()->uppercase(rTabName);
+ aCacheData.back().maTableName = ScGlobal::getCharClass().uppercase(rTabName);
for (SCTAB i = 1; i < nTabSpan + 1; ++i)
{
@@ -2271,7 +2271,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokensFromSr
break;
aCacheData.emplace_back();
- aCacheData.back().maTableName = ScGlobal::getCharClassPtr()->uppercase(aTabName);
+ aCacheData.back().maTableName = ScGlobal::getCharClass().uppercase(aTabName);
}
aRange.aStart.SetTab(nTab1);
@@ -2287,7 +2287,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getRangeNameTokensFromSr
sal_uInt16 nFileId, const ScDocument& rSrcDoc, OUString& rName)
{
ScRangeName* pExtNames = rSrcDoc.GetRangeName();
- OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rName);
+ OUString aUpperName = ScGlobal::getCharClass().uppercase(rName);
const ScRangeData* pRangeData = pExtNames->findByUpperName(aUpperName);
if (!pRangeData)
return ScExternalRefCache::TokenArrayRef();
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 59e266bcbdc0..7b9559169bb2 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -170,7 +170,7 @@ ScImportExport::ScImportExport( ScDocument& r, const OUString& rPos )
ScRangeName* pRange = rDoc.GetRangeName();
if (pRange)
{
- const ScRangeData* pData = pRange->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aPos));
+ const ScRangeData* pData = pRange->findByUpperName(ScGlobal::getCharClass().uppercase(aPos));
if (pData)
{
if( pData->HasType( ScRangeData::Type::RefArea )
@@ -1114,8 +1114,8 @@ static bool lcl_PutString(
nPos <= nStart[nFound]+2 && rStr[nPos] == 'T')
bInNum = false; // ISO-8601: YYYY-MM-DDThh:mm...
else if ((((!bInNum && nFound==nMP) || (bInNum && nFound==nMP+1))
- && ScGlobal::getCharClassPtr()->isLetterNumeric( rStr, nPos))
- || ScGlobal::getCharClassPtr()->isDigit( rStr, nPos))
+ && ScGlobal::getCharClass().isLetterNumeric( rStr, nPos))
+ || ScGlobal::getCharClass().isDigit( rStr, nPos))
{
if (!bInNum)
{
@@ -1137,7 +1137,7 @@ static bool lcl_PutString(
sal_Int32 nDateLen = nEnd[0] + 1 - nDateStart;
if ( nDateLen >= 5 && nDateLen <= 8 &&
- ScGlobal::getCharClassPtr()->isNumeric( rStr.copy( nDateStart, nDateLen ) ) )
+ ScGlobal::getCharClass().isNumeric( rStr.copy( nDateStart, nDateLen ) ) )
{
// 6 digits: 2 each for day, month, year
// 8 digits: 4 for year, 2 each for day and month
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index abec7bf8eb15..4367c7140cc9 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -40,7 +40,7 @@ static bool lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const OU
ScRangeName* pNames = rDoc.GetRangeName();
if (pNames)
{
- const ScRangeData* pData = pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rName));
+ const ScRangeData* pData = pNames->findByUpperName(ScGlobal::getCharClass().uppercase(rName));
if (pData)
{
if ( pData->IsValidReference( rRange ) )
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index 5bef01c62180..4671cf78e192 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -997,7 +997,7 @@ namespace {
bool hasDBName(const OUString& rName, ScDBCollection* pDBCollection)
{
- if (pDBCollection->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rName)))
+ if (pDBCollection->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(rName)))
return true;
return false;
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 658026652c6b..b38059af2d41 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -151,7 +151,7 @@ bool ScNameDefDlg::IsNameValid()
}
bIsNameValid = false;
}
- else if (pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName)))
+ else if (pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(aName)))
{
aHelpText = maErrNameInUse;
bIsNameValid = false;
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 5be421e44607..05094b81069d 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -253,7 +253,7 @@ bool ScNameDlg::IsNameValid()
m_xFtInfo->set_label(maErrInvalidNameStr);
return false;
}
- else if (pRangeName && pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName)))
+ else if (pRangeName && pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(aName)))
{
m_xFtInfo->set_label_type(weld::LabelType::Error);
m_xFtInfo->set_label(maErrNameInUse);
@@ -289,7 +289,7 @@ ScRangeName* ScNameDlg::GetRangeName(const OUString& rScope)
void ScNameDlg::ShowOptions(const ScRangeNameLine& rLine)
{
ScRangeName* pRangeName = GetRangeName(rLine.aScope);
- ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rLine.aName));
+ ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(rLine.aName));
if (pData)
{
UpdateChecks(pData);
@@ -322,7 +322,7 @@ void ScNameDlg::RemovePushed()
for (const auto& rEntry : aEntries)
{
ScRangeName* pRangeName = GetRangeName(rEntry.aScope);
- ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rEntry.aName));
+ ScRangeData* pData = pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(rEntry.aName));
OSL_ENSURE(pData, "table and model should be in sync");
// be safe and check for possible problems
if (pData)
@@ -365,7 +365,7 @@ void ScNameDlg::NameModified()
OUString aNewScope = m_xLbScope->get_active_text();
ScRangeName* pOldRangeName = GetRangeName( aOldScope );
- ScRangeData* pData = pOldRangeName->findByUpperName( ScGlobal::getCharClassPtr()->uppercase(aOldName) );
+ ScRangeData* pData = pOldRangeName->findByUpperName( ScGlobal::getCharClass().uppercase(aOldName) );
ScRangeName* pNewRangeName = GetRangeName( aNewScope );
OSL_ENSURE(pData, "model and table should be in sync");
// be safe and check for range data
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 2082204da1bd..0309931b7cf3 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -87,7 +87,7 @@ const ScRangeData* ScRangeManagerTable::findRangeData(const ScRangeNameLine& rLi
else
pRangeName = m_RangeMap.find(rLine.aScope)->second.get();
- return pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rLine.aName));
+ return pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(rLine.aName));
}
void ScRangeManagerTable::CheckForFormulaString()
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index fe7c7f04f3e9..d8b1ece7b257 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -304,7 +304,7 @@ static OUString lcl_GetDBAreaRange( const ScDocument* pDoc, const OUString& rDBN
if (pDoc)
{
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- const ScDBData* pData = pDbNames->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rDBName));
+ const ScDBData* pData = pDbNames->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(rDBName));
if (pData)
{
ScRange aRange;
@@ -1073,7 +1073,7 @@ static bool lcl_GetRange( const ScDocument& rDoc, ScContentId nType, const OUStr
ScRangeName* pList = rDoc.GetRangeName();
if (pList)
{
- const ScRangeData* p = pList->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rName));
+ const ScRangeData* p = pList->findByUpperName(ScGlobal::getCharClass().uppercase(rName));
if (p && p->IsValidReference(rRange))
bFound = true;
}
@@ -1083,7 +1083,7 @@ static bool lcl_GetRange( const ScDocument& rDoc, ScContentId nType, const OUStr
ScDBCollection* pList = rDoc.GetDBCollection();
if (pList)
{
- const ScDBData* p = pList->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rName));
+ const ScDBData* p = pList->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(rName));
if (p)
{
SCTAB nTab;
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 5f6578f71ff1..5fdf3917aa6b 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -927,7 +927,7 @@ void ScUndoAutoFilter::DoChange( bool bUndo )
else
{
ScDBCollection* pColl = rDoc.GetDBCollection();
- pDBData = pColl->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aDBName));
+ pDBData = pColl->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(aDBName));
}
if ( !pDBData )
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index fcc2ba5814e6..e493a6b175c9 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -1625,7 +1625,7 @@ ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const
ScDBCollection* pNames = pDocShell->GetDocument().GetDBCollection();
if (pNames)
{
- ScDBData* p = pNames->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName));
+ ScDBData* p = pNames->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(aName));
if (p)
pRet = p;
}
@@ -2308,7 +2308,7 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const OUString& aName )
{
ScDBCollection* pNames = pDocShell->GetDocument().GetDBCollection();
if (pNames)
- return pNames->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName)) != nullptr;
+ return pNames->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(aName)) != nullptr;
}
return false;
}
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index e9b57ddb3e63..4c0dacb079ab 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -276,7 +276,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFunctionAccess )
static bool lcl_AddFunctionToken( ScTokenArray& rArray, const OUString& rName,const ScCompiler& rCompiler )
{
// function names are always case-insensitive
- OUString aUpper = ScGlobal::getCharClassPtr()->uppercase(rName);
+ OUString aUpper = ScGlobal::getCharClass().uppercase(rName);
// same options as in ScCompiler::IsOpCode:
// 1. built-in function name
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index b327ef6bab0a..6d2bd3cff5ae 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -122,7 +122,7 @@ ScRangeData* ScNamedRangeObj::GetRangeData_Impl()
pNames = pDocShell->GetDocument().GetRangeName();
if (pNames)
{
- pRet = pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName));
+ pRet = pNames->findByUpperName(ScGlobal::getCharClass().uppercase(aName));
if (pRet)
pRet->ValidateTabRefs(); // adjust relative tab refs to valid tables
}
@@ -166,7 +166,7 @@ void ScNamedRangeObj::Modify_Impl( const OUString* pNewName, const ScTokenArray*
if (!pNames)
return;
- const ScRangeData* pOld = pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName));
+ const ScRangeData* pOld = pNames->findByUpperName(ScGlobal::getCharClass().uppercase(aName));
if (!pOld)
return;
@@ -495,7 +495,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const OUString& aName,
case ScRangeData::IsNameValidType::NAME_VALID:
if (ScRangeName* pNames = GetRangeName_Impl();
pNames
- && !pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName)))
+ && !pNames->findByUpperName(ScGlobal::getCharClass().uppercase(aName)))
{
std::unique_ptr<ScRangeName> pNewRanges(new ScRangeName( *pNames ));
// GRAM_API for API compatibility.
@@ -551,7 +551,7 @@ void SAL_CALL ScNamedRangesObj::removeByName( const OUString& aName )
ScRangeName* pNames = GetRangeName_Impl();
if (pNames)
{
- const ScRangeData* pData = pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName));
+ const ScRangeData* pData = pNames->findByUpperName(ScGlobal::getCharClass().uppercase(aName));
if (pData && lcl_UserVisibleName(*pData))
{
std::unique_ptr<ScRangeName> pNewRanges(new ScRangeName(*pNames));
@@ -693,7 +693,7 @@ sal_Bool SAL_CALL ScNamedRangesObj::hasByName( const OUString& aName )
ScRangeName* pNames = GetRangeName_Impl();
if (pNames)
{
- const ScRangeData* pData = pNames->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(aName));
+ const ScRangeData* pData = pNames->findByUpperName(ScGlobal::getCharClass().uppercase(aName));
if (pData && lcl_UserVisibleName(*pData))
return true;
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 1ad91d3b811c..be5b87ddcdac 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1193,7 +1193,7 @@ bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, const
if (pRangeName)
{
// TODO: Handle local names correctly:
- // bool bLocalName = pRangeName->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(sAddress)) != nullptr;
+ // bool bLocalName = pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(sAddress)) != nullptr;
}
}
char aChar = 0;
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 82fb4f7f64a2..6cca326c45d3 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -55,7 +55,7 @@ void ScDBFunc::GotoDBArea( const OUString& rDBName )
{
ScDocument& rDoc = GetViewData().GetDocument();
ScDBCollection* pDBCol = rDoc.GetDBCollection();
- ScDBData* pData = pDBCol->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rDBName));
+ ScDBData* pData = pDBCol->getNamedDBs().findByUpperName(ScGlobal::getCharClass().uppercase(rDBName));
if (!pData)
return;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 6ed0b3f3aa4a..e2dd92f10e47 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1414,7 +1414,7 @@ bool beginsWithRTLCharacter(const OUString& rStr)
if (rStr.isEmpty())
return false;
- switch (ScGlobal::getCharClassPtr()->getCharacterDirection(rStr, 0))
+ switch (ScGlobal::getCharClass().getCharacterDirection(rStr, 0))
{
case i18n::DirectionProperty_RIGHT_TO_LEFT:
case i18n::DirectionProperty_RIGHT_TO_LEFT_ARABIC:
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 9e091eeed8cc..17b28bbf9248 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2878,7 +2878,7 @@ bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
rDoc.PreprocessRangeNameUpdate();
// input available yet? Then remove beforehand (=change)
- ScRangeData* pData = pList->findByUpperName(ScGlobal::getCharClassPtr()->uppercase(rName));
+ ScRangeData* pData = pList->findByUpperName(ScGlobal::getCharClass().uppercase(rName));
if (pData)
{ // take old Index
pNewEntry->SetIndex(pData->GetIndex());