Kaydet (Commit) 1ae5cecc authored tarafından Arnaud Versini's avatar Arnaud Versini Kaydeden (comit) Noel Grandin

BASIC : Remove useless methods in StarBasic

Change-Id: I9e8ce92b967ee9c9485b7af15280f6a212ff599d
Reviewed-on: https://gerrit.libreoffice.org/21498Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 9bc2f3de
......@@ -279,7 +279,7 @@ void ModulWindow::CheckCompileBasic()
bool bWasModified = GetBasic()->IsModified();
bDone = StarBASIC::Compile( xModule );
bDone = xModule->Compile();
if ( !bWasModified )
GetBasic()->SetModified(false);
......
......@@ -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 );
}
}
......
......@@ -1042,17 +1042,12 @@ 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();
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment