don't create the BasicManager to warn about Basic on HTML export
Check the library indexes for modules instead, which needs no library to be loaded. Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: I49c7de85cc5f473bc69d3077fdf4ba6a77466adf Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13648 Reviewed-by: Noel Grandin <noel.grandin@collabora.com> Tested-by: Jenkins CPCI <releng@collaboraoffice.com> (cherry picked from commit 0bb0a36eb420ff7aafcf0851ff7028b7377407a1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211627 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
447298ce46
commit
b1cbe94512
@@ -37,6 +37,7 @@
|
||||
#include <sfx2/bindings.hxx>
|
||||
#include <sfx2/docfile.hxx>
|
||||
#include <sfx2/docfilt.hxx>
|
||||
#include <sfx2/docmacromode.hxx>
|
||||
#include <sfx2/notebookbar/SfxNotebookBar.hxx>
|
||||
#include <sfx2/printer.hxx>
|
||||
#include <sfx2/linkmgr.hxx>
|
||||
@@ -637,25 +638,9 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
|
||||
#if HAVE_FEATURE_SCRIPTING
|
||||
if( !officecfg::Office::Common::Filter::HTML::Export::Basic::get()
|
||||
&& officecfg::Office::Common::Filter::HTML::Export::Warning::get()
|
||||
&& HasBasic() )
|
||||
&& sfx2::DocumentMacroMode::containerHasBasicMacros( GetBasicContainer() ) )
|
||||
{
|
||||
uno::Reference< XLibraryContainer > xLibCont = GetBasicContainer();
|
||||
uno::Reference< XNameAccess > xLib;
|
||||
const Sequence<OUString> aNames = xLibCont->getElementNames();
|
||||
for(const OUString& rName : aNames)
|
||||
{
|
||||
Any aLib = xLibCont->getByName(rName);
|
||||
aLib >>= xLib;
|
||||
if(xLib.is())
|
||||
{
|
||||
Sequence<OUString> aModNames = xLib->getElementNames();
|
||||
if(aModNames.hasElements())
|
||||
{
|
||||
SetError(WARN_SWG_HTML_NO_MACROS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
SetError(WARN_SWG_HTML_NO_MACROS);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user