diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-06 14:13:19 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-06 14:13:19 +0100 |
commit | 40fa25aad018cb9c31aa78f7e2c9634f796e0a04 (patch) | |
tree | 03a9a118da04fd171b38e912d63458ec69bac88e /toolkit | |
parent | 671aee616838ee541e2d5bf8a4dde40e6aaa83a6 (diff) |
gridsort: when removing a control due to a model change, ensure the control is disposed (otherwise relicts of it will remain in our VCL counterpart)
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 31c1a9c850dd..f7e2094d01aa 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -1409,7 +1409,18 @@ void UnoDialogControl::ImplRemoveControl( Reference< XControlModel >& rxModel ) Sequence< Reference< XControl > > aControls = getControls(); Reference< XControl > xCtrl = StdTabController::FindControl( aControls, rxModel ); if ( xCtrl.is() ) + { removeControl( xCtrl ); + try + { + Reference< XComponent > const xControlComp( xCtrl, UNO_QUERY_THROW ); + xControlComp->dispose(); + } + catch( Exception const & ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } } void UnoDialogControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) |