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

Values need not be bounded by sal_uInt16, it appears

since ESelection's nStart/EndPos have been changed to sal_Int32 with
3cbfcee3 "xub_StrLen and tools/string.hxx final
straw".

Change-Id: Icc96355ff71d07cac5d6037c81b2523156384077
Reviewed-on: https://gerrit.libreoffice.org/48773Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f1e910c5
......@@ -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);
......
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