diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-17 11:24:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-17 15:03:09 +0200 |
commit | f9e09ba0513bbd0eaf872a60e6824a5b20229dfa (patch) | |
tree | d61bf8ef69384ef9b4b10e99f70c68d4f4cdec4c /sc | |
parent | ce707fc2d3420be9423bb5e8d0300dbb71a5db6e (diff) |
rather return ref from GetTransliteration
since we never return a nullptr.
Also add a new utility method to simplify the call sites that need to
pick the right collator
Change-Id: I0ecf3ad32a0bf22d9e760620524f41bc18b54fff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122238
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/global.hxx | 5 | ||||
-rw-r--r-- | sc/source/core/data/autonamecache.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 9 | ||||
-rw-r--r-- | sc/source/core/data/dpitemdata.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/global.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/autoform.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/compare.cxx | 9 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/dbdata.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/doubleref.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/userlist.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/dbgui/scuiasciiopt.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 2 |
18 files changed, 53 insertions, 50 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index a8b939114201..5ebd8263eabb 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -546,8 +546,9 @@ public: static CollatorWrapper& GetCollator(bool bCaseSensitive); static css::lang::Locale* GetLocale(); - SC_DLLPUBLIC static ::utl::TransliterationWrapper* GetpTransliteration(); - static ::utl::TransliterationWrapper* GetCaseTransliteration(); + SC_DLLPUBLIC static ::utl::TransliterationWrapper& GetTransliteration(); + static ::utl::TransliterationWrapper& GetCaseTransliteration(); + static ::utl::TransliterationWrapper& GetTransliteration(bool bCaseSensitive); SC_DLLPUBLIC static LanguageType eLnge; static constexpr sal_Unicode cListDelimiter = ','; diff --git a/sc/source/core/data/autonamecache.cxx b/sc/source/core/data/autonamecache.cxx index a2be03c25796..f74219baf706 100644 --- a/sc/source/core/data/autonamecache.cxx +++ b/sc/source/core/data/autonamecache.cxx @@ -77,7 +77,7 @@ const ScAutoNameAddresses& ScAutoNameCache::GetNameOccurrences( const OUString& ; // nothing, prevent compiler warning break; } - if ( ScGlobal::GetpTransliteration()->isEqual( aStr, rName ) ) + if ( ScGlobal::GetTransliteration().isEqual( aStr, rName ) ) { rAddresses.push_back(aIter.GetPos()); } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 3f5d4aefdbb6..10bf90b7d275 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -866,7 +866,7 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool bExternalDoc if (maTabs[i] && (i != nTab)) { OUString aOldName = maTabs[i]->GetName(); - bValid = !ScGlobal::GetpTransliteration()->isEqual( rName, aOldName ); + bValid = !ScGlobal::GetTransliteration().isEqual( rName, aOldName ); } if (bValid) { diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 2867c6616fa5..d544fb884d9c 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -695,8 +695,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const tools::Long nPos = -1; CollatorWrapper& rCollator = ScGlobal::GetCollator(rParam.bCaseSens); - ::utl::TransliterationWrapper* pTransliteration = (rParam.bCaseSens ? - ScGlobal::GetCaseTransliteration() : ScGlobal::GetpTransliteration()); + ::utl::TransliterationWrapper& rTransliteration = ScGlobal::GetTransliteration(rParam.bCaseSens); for (size_t i = 0; i < nEntryCount && rParam.GetEntry(i).bDoQuery; ++i) { @@ -785,7 +784,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const { // TODO: Use shared string for fast equality check. OUString aStr = rEntry.GetQueryItem().maString.getString(); - bOk = pTransliteration->isEqual(aCellStr, aStr); + bOk = rTransliteration.isEqual(aCellStr, aStr); bool bHasStar = false; sal_Int32 nIndex; if (( nIndex = aStr.indexOf('*') ) != -1) @@ -811,9 +810,9 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const OUString aQueryStr = rEntry.GetQueryItem().maString.getString(); css::uno::Sequence< sal_Int32 > xOff; const LanguageType nLang = ScGlobal::oSysLocale->GetLanguageTag().getLanguageType(); - OUString aCell = pTransliteration->transliterate( + OUString aCell = rTransliteration.transliterate( aCellStr, nLang, 0, aCellStr.getLength(), &xOff); - OUString aQuer = pTransliteration->transliterate( + OUString aQuer = rTransliteration.transliterate( aQueryStr, nLang, 0, aQueryStr.getLength(), &xOff); bOk = (aCell.indexOf( aQuer ) != -1); } diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx index 7247d2165541..e4efe75ee935 100644 --- a/sc/source/core/data/dpitemdata.cxx +++ b/sc/source/core/data/dpitemdata.cxx @@ -205,7 +205,7 @@ bool ScDPItemData::IsCaseInsEqual(const ScDPItemData& r) const // Fast equality check for interned strings. return true; - return ScGlobal::GetpTransliteration()->isEqual(GetString(), r.GetString()); + return ScGlobal::GetTransliteration().isEqual(GetString(), r.GetString()); } bool ScDPItemData::operator== (const ScDPItemData& r) const diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index bd80ce3b4765..0e4d583b9391 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1670,7 +1670,7 @@ bool isAtStart( { OUString aDequoted; bool bParsed = extractAtStart( rList, rMatched, bAllowBracket, pFunc, aDequoted); - if ( bParsed && ScGlobal::GetpTransliteration()->isEqual( aDequoted, rSearch ) ) + if ( bParsed && ScGlobal::GetTransliteration().isEqual( aDequoted, rSearch ) ) { nMatchList = rMatched; // match count in the list string, including quotes nMatchSearch = rSearch.getLength(); @@ -1679,7 +1679,7 @@ bool isAtStart( else { // otherwise look for search string at the start of rList - ScGlobal::GetpTransliteration()->equals( + ScGlobal::GetTransliteration().equals( rList, 0, rList.getLength(), nMatchList, rSearch, 0, rSearch.getLength(), nMatchSearch); } @@ -1904,10 +1904,10 @@ bool ScDPObject::ParseFilters( if (bHasQuery) { // First check given value name against both. - bThisItemFound = ScGlobal::GetpTransliteration()->isEqual( + bThisItemFound = ScGlobal::GetTransliteration().isEqual( aQueryValueName, pItemNamesArr[nItem]); if (!bThisItemFound && pItemValuesArr[nItem] != pItemNamesArr[nItem]) - bThisItemFound = ScGlobal::GetpTransliteration()->isEqual( + bThisItemFound = ScGlobal::GetTransliteration().isEqual( aQueryValueName, pItemValuesArr[nItem]); if (!bThisItemFound && aQueryValueName != aQueryValue) { @@ -1915,10 +1915,10 @@ bool ScDPObject::ParseFilters( // against both. /* TODO: or check only value string against * value string, not against the value name? */ - bThisItemFound = ScGlobal::GetpTransliteration()->isEqual( + bThisItemFound = ScGlobal::GetTransliteration().isEqual( aQueryValue, pItemNamesArr[nItem]); if (!bThisItemFound && pItemValuesArr[nItem] != pItemNamesArr[nItem]) - bThisItemFound = ScGlobal::GetpTransliteration()->isEqual( + bThisItemFound = ScGlobal::GetTransliteration().isEqual( aQueryValue, pItemValuesArr[nItem]); } } diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 6166b3f3ec80..b950cfe3003f 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -975,9 +975,9 @@ void ScGlobal::AddLanguage( SfxItemSet& rSet, const SvNumberFormatter& rFormatte rSet.Put( SvxLanguageItem( pHardFormat->GetLanguage(), ATTR_LANGUAGE_FORMAT ) ); } -utl::TransliterationWrapper* ScGlobal::GetpTransliteration() +utl::TransliterationWrapper& ScGlobal::GetTransliteration() { - return comphelper::doubleCheckedInit( pTransliteration, + return *comphelper::doubleCheckedInit( pTransliteration, []() { const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); @@ -987,9 +987,9 @@ utl::TransliterationWrapper* ScGlobal::GetpTransliteration() return p; }); } -::utl::TransliterationWrapper* ScGlobal::GetCaseTransliteration() +::utl::TransliterationWrapper& ScGlobal::GetCaseTransliteration() { - return comphelper::doubleCheckedInit( pCaseTransliteration, + return *comphelper::doubleCheckedInit( pCaseTransliteration, []() { const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); @@ -999,6 +999,10 @@ utl::TransliterationWrapper* ScGlobal::GetpTransliteration() return p; }); } +utl::TransliterationWrapper& ScGlobal::GetTransliteration(bool bCaseSensitive) +{ + return bCaseSensitive ? GetCaseTransliteration() : GetTransliteration(); +} const LocaleDataWrapper& ScGlobal::getLocaleData() { diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index e90adbeb5c42..7e1f05450c99 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2386,7 +2386,7 @@ class QueryEvaluator void setupTransliteratorIfNeeded() { if (!mpTransliteration) - mpTransliteration = mrParam.bCaseSens ? ScGlobal::GetCaseTransliteration() : ScGlobal::GetpTransliteration(); + mpTransliteration = &ScGlobal::GetTransliteration(mrParam.bCaseSens); } void setupCollatorIfNeeded() diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index e4ab89221632..631747e5667c 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -744,11 +744,11 @@ ScAutoFormat::ScAutoFormat() : bool DefaultFirstEntry::operator() (const OUString& left, const OUString& right) const { OUString aStrStandard(ScResId(STR_STYLENAME_STANDARD)); - if (ScGlobal::GetpTransliteration()->isEqual( left, right ) ) + if (ScGlobal::GetTransliteration().isEqual( left, right ) ) return false; - if ( ScGlobal::GetpTransliteration()->isEqual( left, aStrStandard ) ) + if ( ScGlobal::GetTransliteration().isEqual( left, aStrStandard ) ) return true; - if ( ScGlobal::GetpTransliteration()->isEqual( right, aStrStandard ) ) + if ( ScGlobal::GetTransliteration().isEqual( right, aStrStandard ) ) return false; return ScGlobal::GetCollator().compareString( left, right) < 0; } diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx index ac931d2c1982..48bf4642fe05 100644 --- a/sc/source/core/tool/compare.cxx +++ b/sc/source/core/tool/compare.cxx @@ -151,9 +151,8 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions ) } else if (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL) { - ::utl::TransliterationWrapper* pTransliteration = - (rComp.mbIgnoreCase ? ScGlobal::GetpTransliteration() : - ScGlobal::GetCaseTransliteration()); + ::utl::TransliterationWrapper& rTransliteration = + ScGlobal::GetTransliteration(!rComp.mbIgnoreCase); bool bMatch = false; if (pOptions->bMatchWholeCell) { @@ -165,10 +164,10 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions ) else { const LanguageType nLang = ScGlobal::oSysLocale->GetLanguageTag().getLanguageType(); - OUString aCell( pTransliteration->transliterate( + OUString aCell( rTransliteration.transliterate( rCell1.maStr.getString(), nLang, 0, rCell1.maStr.getLength(), nullptr)); - OUString aQuer( pTransliteration->transliterate( + OUString aQuer( rTransliteration.transliterate( rCell2.maStr.getString(), nLang, 0, rCell2.maStr.getLength(), nullptr)); bMatch = (aCell.indexOf( aQuer ) != -1); diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 311993e6ff88..fd9c0ab51fe8 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3707,7 +3707,7 @@ bool ScCompiler::IsColRowName( const OUString& rName ) if (bOk && aIter.hasString()) { OUString aStr = aIter.getString(); - if ( ScGlobal::GetpTransliteration()->isEqual( aStr, aName ) ) + if ( ScGlobal::GetTransliteration().isEqual( aStr, aName ) ) { aRef.InitFlags(); if ( !jRow ) @@ -3815,7 +3815,7 @@ bool ScCompiler::IsColRowName( const OUString& rName ) if (bOk && aIter.hasString()) { OUString aStr = aIter.getString(); - if ( ScGlobal::GetpTransliteration()->isEqual( aStr, aName ) ) + if ( ScGlobal::GetTransliteration().isEqual( aStr, aName ) ) { SCCOL nCol = aIter.GetPos().Col(); SCROW nRow = aIter.GetPos().Row(); @@ -4065,7 +4065,7 @@ bool ScCompiler::IsTableRefColumn( const OUString& rName ) const if (bOk && aIter.hasString()) { OUString aStr = aIter.getString(); - if (ScGlobal::GetpTransliteration()->isEqual( aStr, aName)) + if (ScGlobal::GetTransliteration().isEqual( aStr, aName)) { // If this is successful and the internal column name // lookup was not, it may be worth a warning. diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index a5af4404e47d..f95d1e94b681 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -50,7 +50,7 @@ using ::std::pair; bool ScDBData::less::operator() (const std::unique_ptr<ScDBData>& left, const std::unique_ptr<ScDBData>& right) const { - return ScGlobal::GetpTransliteration()->compareString(left->GetUpperName(), right->GetUpperName()) < 0; + return ScGlobal::GetTransliteration().compareString(left->GetUpperName(), right->GetUpperName()) < 0; } ScDBData::ScDBData( const OUString& rName, @@ -767,7 +767,7 @@ public: bool operator()( const OUString& rName ) const { - return ScGlobal::GetpTransliteration()->isEqual( maSearchName, rName); + return ScGlobal::GetTransliteration().isEqual( maSearchName, rName); } private: diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index db5cda5f4fdb..165f9a228cd3 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -350,7 +350,7 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, FormulaError* pEr if (pErr) *pErr = nErr; lcl_uppercase(aCellStr); - bFound = ScGlobal::GetpTransliteration()->isEqual(aCellStr, aUpper); + bFound = ScGlobal::GetTransliteration().isEqual(aCellStr, aUpper); if (!bFound) aLook.IncCol(); } diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx index fb9dc97e6236..10a4de328f87 100644 --- a/sc/source/core/tool/userlist.cxx +++ b/sc/source/core/tool/userlist.cxx @@ -168,7 +168,7 @@ sal_Int32 ScUserListData::Compare(const OUString& rSubStr1, const OUString& rSub else if (bFound2) return 1; else - return ScGlobal::GetCaseTransliteration()->compareString( rSubStr1, rSubStr2 ); + return ScGlobal::GetCaseTransliteration().compareString( rSubStr1, rSubStr2 ); } sal_Int32 ScUserListData::ICompare(const OUString& rSubStr1, const OUString& rSubStr2) const @@ -194,7 +194,7 @@ sal_Int32 ScUserListData::ICompare(const OUString& rSubStr1, const OUString& rSu else if (bFound2) return 1; else - return ScGlobal::GetpTransliteration()->compareString( rSubStr1, rSubStr2 ); + return ScGlobal::GetTransliteration().compareString( rSubStr1, rSubStr2 ); } ScUserList::ScUserList() diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index c55c97dac444..9779b6e9692a 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -111,7 +111,7 @@ ScTypedCaseStrSet::const_iterator findText( const OUString& rStart, OUString& rResult, bool bBack) { auto lIsMatch = [&rStart](const ScTypedStrData& rData) { - return (rData.GetStringType() != ScTypedStrData::Value) && ScGlobal::GetpTransliteration()->isMatch(rStart, rData.GetString()); }; + return (rData.GetStringType() != ScTypedStrData::Value) && ScGlobal::GetTransliteration().isMatch(rStart, rData.GetString()); }; if (bBack) // Backwards { @@ -155,7 +155,7 @@ OUString getExactMatch(const ScTypedCaseStrSet& rDataSet, const OUString& rStrin auto it = std::find_if(rDataSet.begin(), rDataSet.end(), [&rString](const ScTypedStrData& rData) { return (rData.GetStringType() != ScTypedStrData::Value) - && ScGlobal::GetpTransliteration()->isEqual(rData.GetString(), rString); + && ScGlobal::GetTransliteration().isEqual(rData.GetString(), rString); }); if (it != rDataSet.end()) return it->GetString(); @@ -207,7 +207,7 @@ ScTypedCaseStrSet::const_iterator findTextAll( // skip values continue; - if ( !ScGlobal::GetpTransliteration()->isMatch(rStart, rData.GetString()) ) + if ( !ScGlobal::GetTransliteration().isMatch(rStart, rData.GetString()) ) // not a match continue; @@ -247,7 +247,7 @@ ScTypedCaseStrSet::const_iterator findTextAll( // skip values continue; - if ( !ScGlobal::GetpTransliteration()->isMatch(rStart, rData.GetString()) ) + if ( !ScGlobal::GetTransliteration().isMatch(rStart, rData.GetString()) ) // not a match continue; @@ -1607,7 +1607,7 @@ void completeFunction( EditView* pView, const OUString& rInsert, bool& rParInser for (sal_Int32 n = aAll.getLength(); n >= nMinLen && aMatch.isEmpty(); --n) { const OUString aTest = aAll.copy(aAll.getLength() - n); // n trailing chars - if (ScGlobal::GetpTransliteration()->isMatch(aTest, rInsert)) + if (ScGlobal::GetTransliteration().isMatch(aTest, rInsert)) aMatch = aTest; // Found => break the loop } diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 0a951b928c5d..2daa4af97f0c 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -144,7 +144,7 @@ static sal_Unicode lcl_CharFromCombo(const weld::ComboBox& rCombo, const OUStrin OUString sToken {rList.getToken(0, '\t', nIdx)}; while (nIdx>0) { - if ( ScGlobal::GetpTransliteration()->isEqual( aStr, sToken ) ) + if ( ScGlobal::GetTransliteration().isEqual( aStr, sToken ) ) { sal_Int32 nTmpIdx {nIdx}; c = static_cast<sal_Unicode>(rList.getToken(0, '\t', nTmpIdx).toInt32()); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index fc955975bc70..cff9b7e758ca 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -962,9 +962,9 @@ void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const vector<OUString // If the one and only table name matches exactly, carry on the base // file name for further alias use. If instead the table name matches // the base name, carry on the sheet name as alias. - if (ScGlobal::GetpTransliteration()->isEqual( pDoc->maTableNames[0].maRealName, aSheetName)) + if (ScGlobal::GetTransliteration().isEqual( pDoc->maTableNames[0].maRealName, aSheetName)) pDoc->maSingleTableNameAlias = rBaseName; - else if (ScGlobal::GetpTransliteration()->isEqual( pDoc->maTableNames[0].maRealName, rBaseName)) + else if (ScGlobal::GetTransliteration().isEqual( pDoc->maTableNames[0].maRealName, rBaseName)) pDoc->maSingleTableNameAlias = aSheetName; } @@ -998,12 +998,12 @@ bool ScExternalRefCache::DocItem::getSingleTableNameAlternative( OUString& rTabN { if (maSingleTableNameAlias.isEmpty() || maTableNames.size() != 1) return false; - if (ScGlobal::GetpTransliteration()->isEqual( rTabName, maTableNames[0].maRealName)) + if (ScGlobal::GetTransliteration().isEqual( rTabName, maTableNames[0].maRealName)) { rTabName = maSingleTableNameAlias; return true; } - if (ScGlobal::GetpTransliteration()->isEqual( rTabName, maSingleTableNameAlias)) + if (ScGlobal::GetTransliteration().isEqual( rTabName, maSingleTableNameAlias)) { rTabName = maTableNames[0].maRealName; return true; @@ -1338,9 +1338,9 @@ ScExternalRefCache::TableTypeRef ScExternalRefCache::getCacheTable(sal_uInt16 nF { const OUString aBaseName( INetURLObject( *pExtUrl).GetBase()); const OUString aSheetName( getFirstSheetName()); - if (ScGlobal::GetpTransliteration()->isEqual( rTabName, aSheetName)) + if (ScGlobal::GetTransliteration().isEqual( rTabName, aSheetName)) pDoc->maSingleTableNameAlias = aBaseName; - else if (ScGlobal::GetpTransliteration()->isEqual( rTabName, aBaseName)) + else if (ScGlobal::GetTransliteration().isEqual( rTabName, aBaseName)) pDoc->maSingleTableNameAlias = aSheetName; } } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index ca0fdb98c591..f9d2c3207e39 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -254,7 +254,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, { OUString aName; rDoc.GetName( nTab, aName ); - if ( ScGlobal::GetpTransliteration()->isEqual( + if ( ScGlobal::GetTransliteration().isEqual( ScGlobal::GetDocTabName( aFileName, aTabName ), aName ) ) { rDoc.RenameTab( nTab, |