[Libreoffice-commits] core.git: editeng/source

Stephan Bergmann sbergman at redhat.com
Mon Jan 29 07:47:55 UTC 2018


 editeng/source/accessibility/AccessibleStaticTextBase.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7d9590897526e26a3c0a7a90504741d4c21070f1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Jan 28 11:32:13 2018 +0100

    Values need not be bounded by sal_uInt16, it appears
    
    since ESelection's nStart/EndPos have been changed to sal_Int32 with
    3cbfcee36dd16e451d76c561eaaaee0ff29b01a5 "xub_StrLen and tools/string.hxx final
    straw".
    
    Change-Id: Icc96355ff71d07cac5d6037c81b2523156384077
    Reviewed-on: https://gerrit.libreoffice.org/48773
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index f22752627da3..f44d1482bb6d 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -87,9 +87,9 @@ namespace accessibility
                               sal_Int32 nEndPara, sal_Int32 nEndIndex )
     {
         DBG_ASSERT(nStartPara >= 0 &&
-                   nStartIndex >= 0 && nStartIndex <= USHRT_MAX &&
+                   nStartIndex >= 0 &&
                    nEndPara >= 0 &&
-                   nEndIndex >= 0 && nEndIndex <= USHRT_MAX ,
+                   nEndIndex >= 0,
                    "AccessibleStaticTextBase_Impl::MakeSelection: index value overflow");
 
         return ESelection(nStartPara, nStartIndex, nEndPara, nEndIndex);
@@ -301,7 +301,7 @@ namespace accessibility
             {
                 // check overflow
                 DBG_ASSERT(nCurrPara >= 0 &&
-                           nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX ,
+                           nFlatIndex - nCurrIndex + nCurrCount >= 0,
                            "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow");
 
                 return EPosition(nCurrPara, nFlatIndex - nCurrIndex + nCurrCount);
@@ -313,7 +313,7 @@ namespace accessibility
         {
             // check overflow
             DBG_ASSERT(nCurrPara > 0 &&
-                       nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX ,
+                       nFlatIndex - nCurrIndex + nCurrCount >= 0,
                        "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow");
 
             return EPosition(nCurrPara-1, nFlatIndex - nCurrIndex + nCurrCount);


More information about the Libreoffice-commits mailing list