Files
odfstudio/xmloff/source/script
Stephan Bergmann 2f4f578bbf Failure to getBasicLibraries() is normal in --disable-scripting builds
...(like the Emscripten build), see the HAVE_FEATURE_SCRIPTING conditions in
SfxObjectShell::GetBasicContainer (sfx2/source/doc/objxtor.cxx) and
SfxApplication::GetBasicContainer (sfx2/source/appl/appbas.cxx), so in such
builds loading e.g. xmloff/qa/unit/data/MCGR_threeStops.fodt containing

>  <office:scripts>
>   <office:script script:language="ooo:Basic">
>    <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink">
>     <ooo:library-embedded ooo:name="Standard"/>
>    </ooo:libraries>
>   </office:script>
>  </office:scripts>

would fail with

> warn:sax:392777:392777:sax/source/fastparser/fastparser.cxx:645: Unexpected exception from XML parser com.sun.star.xml.sax.SAXException message: "nowhere to import to at xmloff/source/script/xmlbasicscript.cxx:96"
>     wrapped:

and a

> General Error.
> General input/output error.

error box.  But all the code paths using m_xLibContainer appear to first check
it to be non-null, so it seems rather harmless to make a null m_xLibContainer
non-fatal here for such builds at least.

Change-Id: I6f20b15cb4032fc6293aaae6551095125360171e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192076
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-10-09 07:58:55 +02:00
..