[Libreoffice-commits] core.git: basic/source

Arnaud Versini arnaud.versini at gmail.com
Wed Dec 7 15:52:42 UTC 2016


 basic/source/runtime/runtime.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit b7d9a37acfa1fdbc48b9fecc088d60043623408d
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sun Dec 4 17:37:57 2016 +0100

    basic: small lcl_eraseImpl refactoring
    
    Change-Id: I72dc8bbbd554aec9a8481cc1d9330d2a866a3ba9
    Reviewed-on: https://gerrit.libreoffice.org/31597
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 64a286e..98510c6 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 )


More information about the Libreoffice-commits mailing list