summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/runtime/runtime.cxx6
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 )