diff options
author | Eike Rathke <erack@redhat.com> | 2016-10-27 00:28:44 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-27 00:38:48 +0200 |
commit | 329ecb67808767d677383e5fd6089feaab4cd9e4 (patch) | |
tree | a5128cddc43140e6ddffc034da15ba5d245fb072 /sc/source/ui/docshell/externalrefmgr.cxx | |
parent | effb27326746945763bda70e2c375c86a40a05fc (diff) |
trust the size ... tdf#79442 follow-up
... and don't unnecessarily loop over the whole range.
Actually a max/min typo.
Change-Id: I3dbda3a7388baa337c3922ad992fd3946074c3b7
Diffstat (limited to 'sc/source/ui/docshell/externalrefmgr.cxx')
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 70569667b4cc..285cbddbd169 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2653,7 +2653,7 @@ void ScExternalRefManager::addFilesToLinkManager() SAL_WARN_IF( maSrcFiles.size() >= SAL_MAX_UINT16, "sc.ui", "ScExternalRefManager::addFilesToLinkManager: files overflow"); - const sal_uInt16 nSize = static_cast<sal_uInt16>( std::max<size_t>( maSrcFiles.size(), SAL_MAX_UINT16)); + const sal_uInt16 nSize = static_cast<sal_uInt16>( std::min<size_t>( maSrcFiles.size(), SAL_MAX_UINT16)); for (sal_uInt16 nFileId = 0; nFileId < nSize; ++nFileId) maybeLinkExternalFile( nFileId); } |