From 2be139d76bdb66e77719613d802dc0047c284456 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Wed, 4 Jan 2017 23:58:13 +0100 Subject: tdf#105069, store the VBA module info for new modules as well This was never a problem until we started to export the VBA stream instead of just writing back the imported stream. Change-Id: I4e20e717bebd3dc649efcf1b9c18b6e5053303d9 Reviewed-on: https://gerrit.libreoffice.org/32741 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- basctl/source/basicide/scriptdocument.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'basctl') diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index a99fefafe8a3..135ea2b9659b 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include @@ -669,6 +671,14 @@ namespace basctl if ( _bCreateMain ) _out_rNewModuleCode += "Sub Main\n\nEnd Sub\n" ; + Reference< XVBAModuleInfo > xVBAModuleInfo(xLib, UNO_QUERY); + if (xVBAModuleInfo.is()) + { + css::script::ModuleInfo aModuleInfo; + aModuleInfo.ModuleType = css::script::ModuleType::NORMAL; + xVBAModuleInfo->insertModuleInfo(_rModName, aModuleInfo); + } + // insert module into library xLib->insertByName( _rModName, makeAny( _out_rNewModuleCode ) ); } -- cgit