sfx2/source/appl/appserv.cxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
New commits: commit 2d64651e889e55f63c90ded24e63e17eaf52102f Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Apr 9 12:38:50 2020 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Apr 9 14:35:11 2020 +0200 Fix loading of basctl with --enable-mergelibs ...after 40fe721462df5bedacddc8829cefc3d739cf940f "add some more libs to libmerged". (Found when UITest_writer_tests4 failed with > ERROR: test_tdf113252_macro_dialog (tdf113252.tdf113252) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:/lo/core/sw/qa/uitest/writer_tests4/tdf113252.py", line 24, in test_tdf113252_macro_dialog > self.ui_test.execute_dialog_through_command(".uno:MacroDialog") > File "C:\lo\core\uitest\uitest\test.py", line 83, in execute_dialog_through_command > raise DialogNotExecutedException(command) > uitest.test.DialogNotExecutedException: Dialog not executed for: .uno:MacroDialog in an --enable-mergelibs build on Windows.) (And while at it, explicitly handle a failed osl::Module::loadRelative call, instead of relying on the following osl::Module::getFunctionSymbol call to fail.) Change-Id: Iaef9da527ed36913596a43ff577e065b03a73612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91961 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 459d482cbf68..77896317eb5a 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -18,7 +18,7 @@ */ #include <config_features.h> - +#include <config_options.h> #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/drawing/ModuleDispatcher.hpp> #include <com/sun/star/frame/Desktop.hpp> @@ -1220,7 +1220,18 @@ static OUString ChooseMacro(weld::Window* pParent, const Reference<XModel>& rxLi osl::Module aMod; // load basctl module - aMod.loadRelative(&thisModule, SVLIBRARY("basctl")); + if (!aMod.loadRelative( + &thisModule, +#if ENABLE_MERGELIBS + SVLIBRARY("merged") +#else + SVLIBRARY("basctl") +#endif + )) + { + SAL_WARN("sfx.appl", "cannot load basctl"); + return ""; + } // get symbol basicide_choose_macro pSymbol = reinterpret_cast<basicide_choose_macro>(aMod.getFunctionSymbol("basicide_choose_macro")); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits