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

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 29 18:02:12 UTC 2019


 svx/source/accessibility/ChildrenManagerImpl.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 1df9a89ba0a1dda648e3600ef26d7f38a39f746d
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Sep 29 16:30:46 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Sep 29 20:01:31 2019 +0200

    tdf#127857: fix assertion when enabling/disabling design in forms
    
    See bt:
    https://bugs.documentfoundation.org/attachment.cgi?id=154634
    
    When replacing first remove the AccessibleShape (if exists)
    then create the new one to replace it
    
    Change-Id: Ia7b0818ab153d710617c0cc60fc06bc07922cebf
    Reviewed-on: https://gerrit.libreoffice.org/79813
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 935c5bb2ea37..b69b14af5e7e 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -723,15 +723,6 @@ bool ChildrenManagerImpl::ReplaceChild (
     const long /*_nIndex*/,
     const AccessibleShapeTreeInfo& _rShapeTreeInfo)
 {
-    AccessibleShapeInfo aShapeInfo( _rxShape, pCurrentChild->getAccessibleParent(), this );
-    // create the new child
-    rtl::Reference<AccessibleShape> pNewChild(ShapeTypeHandler::Instance().CreateAccessibleObject (
-        aShapeInfo,
-        _rShapeTreeInfo
-    ));
-    if ( pNewChild.is() )
-        pNewChild->Init();
-
     // Iterate over the visible children.  If one of them has an already
     // created accessible object that matches pCurrentChild then replace
     // it.  Otherwise the child to replace is either not in the list or has
@@ -751,6 +742,15 @@ bool ChildrenManagerImpl::ReplaceChild (
 
         // Replace with replacement and send an event about existence
         // of the new child.
+        AccessibleShapeInfo aShapeInfo( _rxShape, pCurrentChild->getAccessibleParent(), this );
+        // create the new child
+        rtl::Reference<AccessibleShape> pNewChild(ShapeTypeHandler::Instance().CreateAccessibleObject (
+            aShapeInfo,
+            _rShapeTreeInfo
+        ));
+        if ( pNewChild.is() )
+            pNewChild->Init();
+
         I->mxAccessibleShape = pNewChild.get();
         mrContext.CommitChange (
             AccessibleEventId::CHILD,


More information about the Libreoffice-commits mailing list