diff options
Diffstat (limited to 'toolkit/source/controls/unocontrolcontainer.cxx')
-rw-r--r-- | toolkit/source/controls/unocontrolcontainer.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index 68b8a960d12a..f5d3527fdc06 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -423,14 +423,12 @@ void UnoControlContainer::dispose( ) uno::Sequence< uno::Reference< awt::XControl > > aCtrls = getControls(); - uno::Reference< awt::XControl >* pCtrls = aCtrls.getArray(); - uno::Reference< awt::XControl >* pCtrlsEnd = pCtrls + aCtrls.getLength(); - for( ; pCtrls < pCtrlsEnd; ++pCtrls ) + for( uno::Reference< awt::XControl > const & control : aCtrls ) { - removingControl( *pCtrls ); + removingControl( control ); // Delete control - (*pCtrls)->dispose(); + control->dispose(); } |