diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-09-29 16:30:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-29 20:01:31 +0200 |
commit | 1df9a89ba0a1dda648e3600ef26d7f38a39f746d (patch) | |
tree | b7766fdfa9c2ae1dc4ac5e9f4537ce3ab1237625 /svx/source/accessibility | |
parent | 725b51044b955946c6528ca08a8a36dc44f09cd8 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'svx/source/accessibility')
-rw-r--r-- | svx/source/accessibility/ChildrenManagerImpl.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
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, |