diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-16 21:01:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-17 08:41:16 +0200 |
commit | 8930b1f69e4b1c8c02902eb447c00b1d2b420e81 (patch) | |
tree | 5beed021181eddab65e1a206b893155b87609569 /sc/source/ui/unoobj | |
parent | 7fd3c5e8e5897617f1e89fda26f8cdbd4092071d (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/source/ui/unoobj')
-rw-r--r-- | sc/source/ui/unoobj/datauno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/funcuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/nameuno.cxx | 10 |
3 files changed, 8 insertions, 8 deletions
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; } |