[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source

Caolán McNamara caolanm at redhat.com
Fri Jul 3 03:36:02 PDT 2015


 sc/source/ui/Accessibility/AccessibleDocument.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 338f47cf52f6eed3c05021d4272604438f0f550d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 2 16:40:21 2015 +0100

    fix a11y crash seen on moving chart wizard dialog
    
    Change-Id: Ic3ba292e28fe12d7dcc2c2e67aeea48a4c8aaac2
    (cherry picked from commit b161552bd9f7d6b6de9752e4f0e7d6f65bbcf42e)
    (cherry picked from commit ea228fdffd17b87e398216625213a691fcb34825)
    Reviewed-on: https://gerrit.libreoffice.org/16714
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index ea2688e..b2ff325 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -813,8 +813,9 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC
         std::vector < uno::Reference < drawing::XShape > > aShapes;
         FillShapes(aShapes);
 
-        if(aShapes.size()<=0)
+        if (nSelectedChildIndex < 0 || static_cast<size_t>(nSelectedChildIndex) >= aShapes.size())
             return xAccessible;
+
         SortedShapes::iterator aItr;
         if (FindShape(aShapes[nSelectedChildIndex], aItr))
             xAccessible = Get(aItr - maZOrderedShapes.begin());


More information about the Libreoffice-commits mailing list