Kaydet (Commit) 329ecb67 authored tarafından Eike Rathke's avatar Eike Rathke

trust the size ... tdf#79442 follow-up

... and don't unnecessarily loop over the whole range.
Actually a max/min typo.

Change-Id: I3dbda3a7388baa337c3922ad992fd3946074c3b7
üst effb2732
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment