diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2018-02-10 17:27:42 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2018-02-11 00:05:57 +0100 |
commit | f215096c24429fe69e7e5ab37898d0f0beeff0ab (patch) | |
tree | df513396a50fc3e6a3282dfba98efd48ed3de270 /sc/source/ui | |
parent | 273d0ee7b7edb24c2c9e15e9f4337f71c175801a (diff) |
lok: allow libraries to pre-init themselves.
Populate static module references before entering a jail
containing no code.
Implement for scfilt, scui, swui, sdui.
Change-Id: I8fec2aa78e67053a7945926c818122bd4290103c
Reviewed-on: https://gerrit.libreoffice.org/49545
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 0f398c5d4170..6f8287cd1b9d 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -106,6 +106,7 @@ #include <dwfunctr.hxx> #include <acredlin.hxx> #include <o3tl/make_unique.hxx> +#include <filter.hxx> #include <scabstdlg.hxx> OUString ScResId(const char* pId) @@ -266,4 +267,14 @@ void ScDLL::Init() // StarOne Services are now handled in the registry } +extern "C" SAL_DLLPUBLIC_EXPORT +void lok_preload_hook() +{ + // scfilt + ScFormatFilter::Get(); + // scui + ScAbstractDialogFactory::Create(); +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 3088c50efe29..cd703cbe9714 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2334,7 +2334,9 @@ ScFormatFilterPlugin &ScFormatFilter::Get() #ifndef DISABLE_DYNLOADING OUString sFilterLib(SVLIBRARY("scfilt")); static ::osl::Module aModule; - bool bLoaded = aModule.loadRelative(&thisModule, sFilterLib); + bool bLoaded = aModule.is(); + if (!bLoaded) + bLoaded = aModule.loadRelative(&thisModule, sFilterLib); if (!bLoaded) bLoaded = aModule.load(sFilterLib); if (bLoaded) |