From b7d9a37acfa1fdbc48b9fecc088d60043623408d Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Sun, 4 Dec 2016 17:37:57 +0100 Subject: basic: small lcl_eraseImpl refactoring Change-Id: I72dc8bbbd554aec9a8481cc1d9330d2a866a3ba9 Reviewed-on: https://gerrit.libreoffice.org/31597 Tested-by: Jenkins Reviewed-by: Michael Stahl --- basic/source/runtime/runtime.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'basic') diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 64a286eb3d3e..98510c629d28 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -2287,21 +2287,19 @@ static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled ) { SbxBase* pElemObj = refVar->GetObject(); SbxDimArray* pDimArray = dynamic_cast( pElemObj ); - bool bClearValues = true; if( pDimArray ) { if ( pDimArray->hasFixedSize() ) { // Clear all Value(s) pDimArray->SbxArray::Clear(); - bClearValues = false; } else { - pDimArray->Clear(); // clear Dims + pDimArray->Clear(); // clear dims and values } } - if ( bClearValues ) + else { SbxArray* pArray = dynamic_cast( pElemObj ); if ( pArray ) -- cgit