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

Caolán McNamara caolanm at redhat.com
Sun Apr 12 13:07:54 PDT 2015


 svx/source/accessibility/ChildrenManagerImpl.cxx |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

New commits:
commit a025af8f1713a826067a4a351d47d29d1342693f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 26 11:04:52 2015 +0000

    survive 'enable jre' dialog interrupting CreateAccessibilityObjects
    
    Change-Id: I4395160780fc055d14554ad62c6ec757ec8dbbe1
    (cherry picked from commit f2fcf221a42a87a4604cecd1b6b29d4c20986ec0)
    Reviewed-on: https://gerrit.libreoffice.org/15093
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 12e4054..869c5dd 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -276,13 +276,23 @@ void ChildrenManagerImpl::Update (bool bCreateNewObjectsOnDemand)
 
     // 6. If children have to be created immediately and not on demand then
     // create the missing accessible objects now.
-    if ( ! bCreateNewObjectsOnDemand)
-        CreateAccessibilityObjects (maVisibleChildren);
+    if (!bCreateNewObjectsOnDemand)
+    {
+        //operate on a copy of the list and restore it afterwards to guard
+        //against the pathological case where maVisibleChildren gets modified
+        //by other calls to this object while CreateAccessibilityObjects
+        //executes which can happen when java is disabled and the "enable-java"
+        //dialog appears during the instantiation of the linguistic components
+        //triggered by the creation of shapes belonging to the a11y objects
+        //
+        //i.e. launch start-center, launch impress with java disabled and
+        //a java-using linguistic component installed
+        maVisibleChildren.swap(aChildList);
+        CreateAccessibilityObjects(aChildList);
+        maVisibleChildren.swap(aChildList);
+    }
 }
 
-
-
-
 void ChildrenManagerImpl::CreateListOfVisibleShapes (
     ChildDescriptorListType& raDescriptorList)
 {


More information about the Libreoffice-commits mailing list