sc/source/ui/docshell/externalrefmgr.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 329ecb67808767d677383e5fd6089feaab4cd9e4
Author: Eike Rathke <er...@redhat.com>
Date:   Thu Oct 27 00:28:44 2016 +0200

    trust the size ... tdf#79442 follow-up
    
    ... and don't unnecessarily loop over the whole range.
    Actually a max/min typo.
    
    Change-Id: I3dbda3a7388baa337c3922ad992fd3946074c3b7

diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index 7056966..285cbdd 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);
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to