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

Arnaud Versini arnaud.versini at gmail.com
Sat Jan 16 09:06:55 PST 2016


 basctl/source/basicide/baside2.cxx |    2 +-
 basic/source/basmgr/basmgr.cxx     |   16 ++++++++--------
 basic/source/classes/sb.cxx        |   14 ++------------
 include/basic/sbstar.hxx           |    4 +---
 4 files changed, 12 insertions(+), 24 deletions(-)

New commits:
commit 1ae5ceccb818b46f36433c7820e18039f13e56ac
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Fri Jan 15 23:05:31 2016 +0100

    BASIC : Remove useless methods in StarBasic
    
    Change-Id: I9e8ce92b967ee9c9485b7af15280f6a212ff599d
    Reviewed-on: https://gerrit.libreoffice.org/21498
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 6d4a072..34d037d 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -279,7 +279,7 @@ void ModulWindow::CheckCompileBasic()
 
             bool bWasModified = GetBasic()->IsModified();
 
-            bDone = StarBASIC::Compile( xModule );
+            bDone = xModule->Compile();
             if ( !bWasModified )
                 GetBasic()->SetModified(false);
 
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index c5f2f3e..c4aa170 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -225,10 +225,10 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
             {
                 ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aModuleName );
                 OSL_TRACE("#addLibraryModulesImpl - aMod");
-                pLib->MakeModule32( aModuleName, mInfo, aMod );
+                pLib->MakeModule( aModuleName, mInfo, aMod );
             }
             else
-        pLib->MakeModule32( aModuleName, aMod );
+        pLib->MakeModule( aModuleName, aMod );
         }
 
         pLib->SetModified( false );
@@ -284,10 +284,10 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
                 if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) )
                 {
                     ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aName );
-                    pLib->MakeModule32( aName, mInfo, aMod );
+                    pLib->MakeModule( aName, mInfo, aMod );
                 }
                 else
-                    pLib->MakeModule32( aName, aMod );
+                    pLib->MakeModule( aName, aMod );
                 pLib->SetModified( false );
             }
         }
@@ -315,7 +315,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::Con
         if( pMod )
                 pMod->SetSource32( aMod );
         else
-                pLib->MakeModule32( aName, aMod );
+                pLib->MakeModule( aName, aMod );
 
         pLib->SetModified( false );
     }
@@ -1111,7 +1111,7 @@ void BasicManager::CheckModules( StarBASIC* pLib, bool bReference )
         DBG_ASSERT( pModule, "Module not received!" );
         if ( !pModule->IsCompiled() && !StarBASIC::GetErrorCode() )
         {
-            StarBASIC::Compile( pModule );
+            pModule->Compile();
         }
     }
 
@@ -1879,7 +1879,7 @@ void ModuleContainer_Impl::insertByName( const OUString& aName, const uno::Any&
     }
     uno::Reference< script::XStarBasicModuleInfo > xMod;
     aElement >>= xMod;
-    mpLib->MakeModule32( aName, xMod->getSource() );
+    mpLib->MakeModule( aName, xMod->getSource() );
 }
 
 void ModuleContainer_Impl::removeByName( const OUString& Name )
@@ -2286,7 +2286,7 @@ void SAL_CALL StarBasicAccess_Impl::addModule
     DBG_ASSERT( pLib, "XML Import: Lib for module unknown");
     if( pLib )
     {
-        pLib->MakeModule32( ModuleName, Source );
+        pLib->MakeModule( ModuleName, Source );
     }
 }
 
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 90f4a50..a6118ea 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1043,16 +1043,11 @@ void StarBASIC::implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic )
 
 SbModule* StarBASIC::MakeModule( const OUString& rName, const OUString& rSrc )
 {
-    return MakeModule32( rName, rSrc );
-}
-
-SbModule* StarBASIC::MakeModule32( const OUString& rName, const OUString& rSrc )
-{
     ModuleInfo mInfo;
     mInfo.ModuleType = ModuleType::NORMAL;
-    return MakeModule32(  rName, mInfo, rSrc );
+    return MakeModule(  rName, mInfo, rSrc );
 }
-SbModule* StarBASIC::MakeModule32( const OUString& rName, const ModuleInfo& mInfo, const OUString& rSrc )
+SbModule* StarBASIC::MakeModule( const OUString& rName, const ModuleInfo& mInfo, const OUString& rSrc )
 {
 
     SAL_INFO(
@@ -1120,11 +1115,6 @@ void StarBASIC::Remove( SbxVariable* pVar )
     }
 }
 
-bool StarBASIC::Compile( SbModule* pMod )
-{
-    return pMod && pMod->Compile();
-}
-
 void StarBASIC::Clear()
 {
     pModules.clear();
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 5df1f1f..670e597 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -100,9 +100,7 @@ public:
 
     // Compiler-Interface
     SbModule*       MakeModule( const OUString& rName, const OUString& rSrc );
-    SbModule*       MakeModule32( const OUString& rName, const OUString& rSrc );
-    SbModule*       MakeModule32( const OUString& rName, const css::script::ModuleInfo& mInfo, const OUString& rSrc );
-    static bool     Compile( SbModule* );
+    SbModule*       MakeModule( const OUString& rName, const css::script::ModuleInfo& mInfo, const OUString& rSrc );
     static void     Stop();
     static void     Error( SbError );
     static void     Error( SbError, const OUString& rMsg );


More information about the Libreoffice-commits mailing list