sw/source/core/unocore/unocoll.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 1438c84a86e2101bd048adede737079ea37c53d0 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Jan 23 22:39:20 2018 +0100 This presumably always wanted to check for SAL_MAX_UINT16, not USHRT_MAX ...ever since 84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import", where the code read + if( nIndex < USHRT_MAX) + { + const SwFmtRefMark* pMark = GetDoc()->GetRefMark( (sal_uInt16) nIndex ); + if(pMark) + { + xRef = SwXReferenceMarks::GetObject( GetDoc(), pMark ); + aRet.setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0)); + } + } and already contained the cast to sal_uInt16 in the call to GetRefMark Change-Id: Ifd4c3ca0bd89a521c3eecda22435705396f61e16 Reviewed-on: https://gerrit.libreoffice.org/48464 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index a74c3710b1e4..c1d8e417eb40 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1872,7 +1872,7 @@ uno::Any SwXReferenceMarks::getByIndex(sal_Int32 nIndex) if(!IsValid()) throw uno::RuntimeException(); uno::Reference< XTextContent > xRef; - if(0 <= nIndex && nIndex < USHRT_MAX) + if(0 <= nIndex && nIndex < SAL_MAX_UINT16) { SwFormatRefMark *const pMark = const_cast<SwFormatRefMark*>( GetDoc()->GetRefMark(static_cast<sal_uInt16>(nIndex))); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits