editeng/source/accessibility/AccessibleStaticTextBase.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit e9b8d6f651dff18e93f26d9c885a7a735e841021 Author: Stephan Bergmann <sberg...@redhat.com> Date: Sun Jan 28 11:25:10 2018 +0100 Remove useless checks against SAL_MAX_INT32 ...changed from checks against USHRT_MAX in 2af1f5691e8d64afd5246d245d7876b5a2cd5cd8 "resolved fdo#35756 import more than 64k HTML table cells" Change-Id: I32c0e1216d5ba6b1a899540dddade06b17ad0103 Reviewed-on: https://gerrit.libreoffice.org/48772 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 10805ce72564..f22752627da3 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -86,9 +86,9 @@ namespace accessibility ESelection MakeSelection( sal_Int32 nStartPara, sal_Int32 nStartIndex, sal_Int32 nEndPara, sal_Int32 nEndIndex ) { - DBG_ASSERT(nStartPara >= 0 && nStartPara <= SAL_MAX_INT32 && + DBG_ASSERT(nStartPara >= 0 && nStartIndex >= 0 && nStartIndex <= USHRT_MAX && - nEndPara >= 0 && nEndPara <= SAL_MAX_INT32 && + nEndPara >= 0 && nEndIndex >= 0 && nEndIndex <= USHRT_MAX , "AccessibleStaticTextBase_Impl::MakeSelection: index value overflow"); @@ -300,7 +300,7 @@ namespace accessibility if( nCurrIndex >= nFlatIndex ) { // check overflow - DBG_ASSERT(nCurrPara >= 0 && nCurrPara <= SAL_MAX_INT32 && + DBG_ASSERT(nCurrPara >= 0 && nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX , "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"); @@ -312,7 +312,7 @@ namespace accessibility if( bExclusive && nCurrIndex == nFlatIndex ) { // check overflow - DBG_ASSERT(nCurrPara > 0 && nCurrPara <= SAL_MAX_INT32 && + DBG_ASSERT(nCurrPara > 0 && nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX , "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits