diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2016-12-04 17:37:57 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-07 15:52:13 +0000 |
commit | b7d9a37acfa1fdbc48b9fecc088d60043623408d (patch) | |
tree | e608460d3d68831fe081c8cc2709460637a2c4ea | |
parent | 4d5e5908b41308152698cfd769173c69cb3569d4 (diff) |
basic: small lcl_eraseImpl refactoring
Change-Id: I72dc8bbbd554aec9a8481cc1d9330d2a866a3ba9
Reviewed-on: https://gerrit.libreoffice.org/31597
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | basic/source/runtime/runtime.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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<SbxDimArray*>( 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<SbxArray*>( pElemObj ); if ( pArray ) |