summaryrefslogtreecommitdiff
path: root/basic/source/basmgr/basmgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/basmgr/basmgr.cxx')
-rw-r--r--basic/source/basmgr/basmgr.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 84763468e64c..a297600ceaea 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 );