diff options
author | Andre Fischer <af@openoffice.org> | 2002-06-13 15:57:27 +0000 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2002-06-13 15:57:27 +0000 |
commit | d4576b1c01417e84273593b16279fc85deddc8c2 (patch) | |
tree | 54e8c8195080ba97ded575de8f60ffcbafb50278 /svx/source/accessibility/ChildrenManagerImpl.cxx | |
parent | 2493fa75aed7bca20c4666dd632fd0efe01f5fea (diff) |
#100299# All accessible children are now disposed when the shape list is cleared.
Diffstat (limited to 'svx/source/accessibility/ChildrenManagerImpl.cxx')
-rw-r--r-- | svx/source/accessibility/ChildrenManagerImpl.cxx | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index bc2152c9d969..19ccaca49b52 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ChildrenManagerImpl.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: af $ $Date: 2002-06-12 12:56:26 $ + * last change: $Author: af $ $Date: 2002-06-13 16:57:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -455,10 +455,10 @@ void ChildrenManagerImpl::AddAccessibleShape (std::auto_ptr<AccessibleShape> pSh void ChildrenManagerImpl::ClearAccessibleShapeList (void) { // Clear the list of visible accessible objects. Objects not created on - // demand for XShapes are disposed later. + // demand for XShapes are treated below. ChildDescriptorListType::iterator I; for (I=maVisibleChildren.begin(); I!=maVisibleChildren.end(); I++) - if (I->mxAccessibleShape.is() && ! I->mxShape.is()) + if (I->mxAccessibleShape.is() && I->mxShape.is()) { uno::Any aShape; aShape <<= I->mxAccessibleShape; @@ -467,15 +467,12 @@ void ChildrenManagerImpl::ClearAccessibleShapeList (void) uno::Any(), aShape); - // Dispose the object if there is a cooresponding UNO shape. - // Otherwise it will be disposed below. - if (I->mxShape.is()) - { - Reference<lang::XComponent> xComponent ( - I->mxAccessibleShape, uno::UNO_QUERY); - if (xComponent.is()) - xComponent->dispose (); - } + // Dispose the object. + Reference<lang::XComponent> xComponent ( + I->mxAccessibleShape, uno::UNO_QUERY); + if (xComponent.is()) + xComponent->dispose (); + // Reset the reference to the accessible object in any case. If // it has not been disposed above it will be soon. I->mxAccessibleShape = NULL; |