Kaydet (Commit) ea91dede authored tarafından Stephan Bergmann's avatar Stephan Bergmann

USHRT_MAX -> SAL_MAX_UINT16

The checks against USHRT_MAX were like that already in
84a3db80 "initial import", while the casts to
sal_uInt16 were later introduced with a7762676
"#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/48468Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 0b55b36a
...@@ -2038,7 +2038,7 @@ SwFrameFormat* SwXTextTable::GetFrameFormat() ...@@ -2038,7 +2038,7 @@ SwFrameFormat* SwXTextTable::GetFrameFormat()
void SwXTextTable::initialize(sal_Int32 nR, sal_Int32 nC) 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(); throw uno::RuntimeException();
m_pImpl->m_nRows = static_cast<sal_uInt16>(nR); m_pImpl->m_nRows = static_cast<sal_uInt16>(nR);
m_pImpl->m_nColumns = static_cast<sal_uInt16>(nC); m_pImpl->m_nColumns = static_cast<sal_uInt16>(nC);
......
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