summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-23 22:39:20 +0100
committerMichael Stahl <mstahl@redhat.com>2018-01-24 10:50:22 +0100
commit1438c84a86e2101bd048adede737079ea37c53d0 (patch)
treed4772f3aea6bd5aec2167f369bd6179e6a2092e7
parentf50e94a36bf21f9f1cef52be980a6bf92faf4f03 (diff)
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 <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/core/unocore/unocoll.cxx2
1 files changed, 1 insertions, 1 deletions
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)));