diff options
author | tagezi <lera.goncharuk@gmail.com> | 2017-11-20 10:02:30 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-11-20 15:42:02 +0100 |
commit | 9abd653129986d5aa8a07b8f8bb92b2d4254126e (patch) | |
tree | 15547dc1eb382239e4c2c95b3fbb64f5194e2832 /basctl | |
parent | SwDBManager: move implementation details from interface (diff) | |
download | core-9abd653129986d5aa8a07b8f8bb92b2d4254126e.tar.gz core-9abd653129986d5aa8a07b8f8bb92b2d4254126e.zip |
tdf#108872 Also remove VBA module info on module removal
If this information is left, then css.container.ElementExistException
is thrown on following creation of a module with the same name in
XVBAModuleInfo::insertModuleInfo called from
ScriptDocument::Impl::createModule
(see commit 2be139d76bdb66e77719613d802dc0047c284456)
Change-Id: I6750819ce36c112c146d7800a6bab4cc207e0062
Reviewed-on: https://gerrit.libreoffice.org/44940
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/scriptdocument.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 733cebdbb679..a7b16505d1a5 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -527,6 +527,9 @@ namespace basctl if ( xLib.is() ) { xLib->removeByName( _rModuleName ); + Reference< XVBAModuleInfo > xVBAModuleInfo(xLib, UNO_QUERY); + if(xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo(_rModuleName)) + xVBAModuleInfo->removeModuleInfo(_rModuleName); return true; } } |