diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-16 21:02:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-16 23:02:10 +0200 |
commit | e7d99ed15a33de67e436f23096fd2de2ab2e400f (patch) | |
tree | 4dd78415a41910c3cd4bc77ad99534a565286cc8 /sc | |
parent | 68314bdba8d91a7e30c0c061fd3e31847c6a8187 (diff) |
cid#1492880 make Improper use of negative value explicit
Change-Id: Ie55748f2037a320812fdf6288dd1671a39fe018b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123706
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 0da26f43b63f..f715da330b78 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1768,7 +1768,8 @@ void ScExternalRefManager::storeRangeNameTokens(sal_uInt16 nFileId, const OUStri case svSingleRef: { const ScSingleRefData& rRef = *pToken->GetSingleRef(); - OUString aTabName = maRefCache.getTableName(nFileId, rRef.Tab()); + size_t nCacheId = rRef.Tab(); + OUString aTabName = maRefCache.getTableName(nFileId, nCacheId); ScExternalSingleRefToken aNewToken(nFileId, svl::SharedString(aTabName), // string not interned *pToken->GetSingleRef()); pNewArray->AddToken(aNewToken); @@ -1778,7 +1779,8 @@ void ScExternalRefManager::storeRangeNameTokens(sal_uInt16 nFileId, const OUStri case svDoubleRef: { const ScSingleRefData& rRef = *pToken->GetSingleRef(); - OUString aTabName = maRefCache.getTableName(nFileId, rRef.Tab()); + size_t nCacheId = rRef.Tab(); + OUString aTabName = maRefCache.getTableName(nFileId, nCacheId); ScExternalDoubleRefToken aNewToken(nFileId, svl::SharedString(aTabName), // string not interned *pToken->GetDoubleRef()); pNewArray->AddToken(aNewToken); |