diff options
Diffstat (limited to 'basic/source/basmgr/basmgr.cxx')
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index b2e0f58c05..ba0085fbef 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1139,6 +1139,25 @@ void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager ) _rpManager = NULL; } + +bool BasicManager::HasExeCode( const String& sLib ) +{ + StarBASIC* pLib = GetLib(sLib); + if ( pLib ) + { + SbxArray* pMods = pLib->GetModules(); + USHORT nMods = pMods ? pMods->Count() : 0; + for( USHORT i = 0; i < nMods; i++ ) + { + SbModule* p = (SbModule*) pMods->Get( i ); + if ( p ) + if ( p->HasExeCode() ) + return true; + } + } + return false; +} + void BasicManager::Init() { DBG_CHKTHIS( BasicManager, 0 ); |