diff options
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbaeventshelperbase.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx index 1f92e449a156..dbd345c9bac7 100644 --- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx +++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx @@ -320,6 +320,23 @@ void VbaEventsHelperBase::ensureVBALibrary() } } +bool VbaEventsHelperBase::hasModule(const OUString& rModuleName) +{ + if (rModuleName.isEmpty()) + return false; + + bool bRet = false; + try + { + ensureVBALibrary(); + bRet = mxModuleInfos->hasModuleInfo(rModuleName); + } + catch (uno::Exception&) + {} + + return bRet; +} + sal_Int32 VbaEventsHelperBase::getModuleType( const OUString& rModuleName ) { // make sure the VBA library exists |