[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Wed Jan 24 20:25:01 UTC 2018
sw/source/core/unocore/unotbl.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ea91dedef71a0c476dc168f39654c1212c46f824
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 23 23:03:12 2018 +0100
USHRT_MAX -> SAL_MAX_UINT16
The checks against USHRT_MAX were like that already in
84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import", while the casts to
sal_uInt16 were later introduced with a7762676e1326ffdefbd6020b667db323640d03f
"#83294# SwXTextTable/Cell::get/setData with a sequence of rows instead of a
sequence of columns".
Change-Id: Iab6f658f91edcec9e8e6fe6fbf0da730b3ad4581
Reviewed-on: https://gerrit.libreoffice.org/48468
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 96cea290242c..68d9863910f0 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2038,7 +2038,7 @@ SwFrameFormat* SwXTextTable::GetFrameFormat()
void SwXTextTable::initialize(sal_Int32 nR, sal_Int32 nC)
{
- if (!m_pImpl->IsDescriptor() || nR <= 0 || nC <= 0 || nR >= USHRT_MAX || nC >= USHRT_MAX)
+ if (!m_pImpl->IsDescriptor() || nR <= 0 || nC <= 0 || nR >= SAL_MAX_UINT16 || nC >= SAL_MAX_UINT16)
throw uno::RuntimeException();
m_pImpl->m_nRows = static_cast<sal_uInt16>(nR);
m_pImpl->m_nColumns = static_cast<sal_uInt16>(nC);
More information about the Libreoffice-commits
mailing list