summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomoyuki Kubota <himajin100000@gmail.com>2020-04-12 17:27:24 +0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-12 12:32:49 +0200
commit7768889c351e079f4fc59647ccafc37013217040 (patch)
treef61bd491979469a2986c8fb7278b4233c02cd5ae
parentd7a201ee95ffa10416290d8a1e0a2905664fb4ed (diff)
More fixes to loading of basctl with --enable-mergelibs
Change-Id: I3458110f0cd7a5ff9e81d59d864f831038335ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sfx2/source/appl/app.cxx31
1 files changed, 27 insertions, 4 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index c09b415825f6..5bb09cce532b 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -18,6 +18,7 @@
*/
#include <config_feature_desktop.h>
+#include <config_options.h>
#include <sal/log.hxx>
#include <osl/module.hxx>
#include <tools/debug.hxx>
@@ -390,9 +391,20 @@ IMPL_STATIC_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBas
#else
#ifndef DISABLE_DYNLOADING
- // load basctl module
osl::Module aMod;
- aMod.loadRelative(&thisModule, SVLIBRARY("basctl"));
+ // load basctl module
+ if (!aMod.loadRelative(
+ &thisModule,
+#if ENABLE_MERGELIBS
+ SVLIBRARY("merged")
+#else
+ SVLIBRARY("basctl")
+#endif
+ ))
+ {
+ SAL_WARN("sfx.appl", "cannot load basctl");
+ return false;
+ }
// get symbol
basicide_handle_basic_error pSymbol = reinterpret_cast<basicide_handle_basic_error>(aMod.getFunctionSymbol("basicide_handle_basic_error"));
@@ -483,9 +495,20 @@ void SfxApplication::MacroOrganizer(weld::Window* pParent, sal_Int16 nTabId)
#else
#ifndef DISABLE_DYNLOADING
- // load basctl module
osl::Module aMod;
- aMod.loadRelative(&thisModule, SVLIBRARY("basctl"));
+ // load basctl module
+ if (!aMod.loadRelative(
+ &thisModule,
+#if ENABLE_MERGELIBS
+ SVLIBRARY("merged")
+#else
+ SVLIBRARY("basctl")
+#endif
+ ))
+ {
+ SAL_WARN("sfx.appl", "cannot load basctl");
+ return;
+ }
// get symbol
basicide_macro_organizer pSymbol = reinterpret_cast<basicide_macro_organizer>(aMod.getFunctionSymbol("basicide_macro_organizer"));