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

Stephan Bergmann sbergman at redhat.com
Tue Jan 23 06:59:19 UTC 2018


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

New commits:
commit d93813d8e448395ff9b6ac7b755d8fad68ec61b6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 22 22:42:25 2018 +0100

    OutputDevice::GetCaretPositions takes sal_Int32 nIndex parameter
    
    ...since 16b446937e026ff5edd097e99b8d9be6ba314562 "Use OUString / sal_Int32 in
    vcl(outdev3.cxx,textlayout.cxx)"
    
    Change-Id: I9e77bf801c6d79e1993ac6ddecf740b3362aeafe
    Reviewed-on: https://gerrit.libreoffice.org/48364
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx
index af55049458f0..64ea287dc9ff 100644
--- a/editeng/source/accessibility/AccessibleStringWrap.cxx
+++ b/editeng/source/accessibility/AccessibleStringWrap.cxx
@@ -38,7 +38,7 @@ AccessibleStringWrap::AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont,
 
 void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, tools::Rectangle& rRect )
 {
-    DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX,
+    DBG_ASSERT(nIndex >= 0,
                "SvxAccessibleStringWrap::GetCharacterBounds: index value overflow");
 
     mrFont.SetPhysFont( &mrDev );
@@ -55,7 +55,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, tools::Rectangl
     else
     {
         long aXArray[2];
-        mrDev.GetCaretPositions( maText, aXArray, static_cast< sal_uInt16 >(nIndex), 1 );
+        mrDev.GetCaretPositions( maText, aXArray, nIndex, 1 );
         rRect.Left() = 0;
         rRect.Top() = 0;
         rRect.SetSize( Size(mrDev.GetTextHeight(), labs(aXArray[0] - aXArray[1])) );


More information about the Libreoffice-commits mailing list