[Libreoffice-commits] .: sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Jun 8 03:23:29 PDT 2011


 sc/source/core/data/documen2.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 532e51c6a387803f98080479db20e02eda8f9f37
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 8 11:23:19 2011 +0100

    WaE: these pStarBasic thingies don't seem to be needed

diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index e6376cf..e82887e 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1095,13 +1095,10 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
         SfxObjectShell* pSrcShell = pSrcDoc ? pSrcDoc->GetDocumentShell() : NULL;
         if ( pSrcShell )
         {
-            StarBASIC* pStarBASIC = pSrcShell->GetBasic();
-            String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
-            if ( pSrcShell->GetBasicManager()->GetName().Len() > 0 )
-            {
+            String aLibName(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+            const BasicManager *pBasicManager = pSrcShell->GetBasicManager();
+            if (pBasicManager && pBasicManager->GetName().Len() > 0)
                 aLibName = pSrcShell->GetBasicManager()->GetName();
-                pStarBASIC = pSrcShell->GetBasicManager()->GetLib( aLibName );
-            }
 
             String sCodeName;
             String sSource;
@@ -1109,7 +1106,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
             uno::Reference< container::XNameContainer > xLib;
             if( xLibContainer.is() )
             {
-                uno::Any aLibAny = xLibContainer->getByName( aLibName );
+                uno::Any aLibAny = xLibContainer->getByName(aLibName);
                 aLibAny >>= xLib;
             }
 


More information about the Libreoffice-commits mailing list