summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-04-09 12:38:50 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-04-09 14:35:11 +0200
commit2d64651e889e55f63c90ded24e63e17eaf52102f (patch)
treeb6686cfc8ccbcede3529ad9442e904a744a2dab3
parent1bc3f2660d1df6aedb0560f5ff8cff2624ce9fe6 (diff)
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 <sbergman@redhat.com>
-rw-r--r--sfx2/source/appl/appserv.cxx15
1 files changed, 13 insertions, 2 deletions
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"));