summaryrefslogtreecommitdiff
path: root/vcl/source/window/abstdlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-02-23 13:05:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-02-25 14:45:55 +0100
commit47bfbbdb73380335196887b36c4d14530c0461ec (patch)
tree50c80c230bc3ed8026814454137ee230c92753af /vcl/source/window/abstdlg.cxx
parentff197bf1a9a8a6cd73fe0e1cc03c4424d9e1dc2e (diff)
Create an UNO service to do the cui symbol lookup in vcl
which means I can remove one usage of gb_Library_set_plugin_for, which is blocking linking the cui module into --enable-mergelibs=more Change-Id: Ic6cd48377627f94747037c7247a1cd398738b390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window/abstdlg.cxx')
-rw-r--r--vcl/source/window/abstdlg.cxx33
1 files changed, 5 insertions, 28 deletions
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 5bacc91b3751..1cc5325c7200 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -17,41 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <osl/module.hxx>
#include <vcl/abstdlg.hxx>
#include <vcl/bitmapex.hxx>
+#include <com/sun/star/cui/GetCreateDialogFactoryService.hpp>
+#include <comphelper/processfactory.hxx>
typedef VclAbstractDialogFactory*(SAL_CALL* FuncPtrCreateDialogFactory)();
-#ifndef DISABLE_DYNLOADING
-extern "C" {
-static void thisModule() {}
-}
-#else
-extern "C" VclAbstractDialogFactory* CreateDialogFactory();
-#endif
-
VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
{
- static auto fp = []() -> FuncPtrCreateDialogFactory {
-#ifndef DISABLE_DYNLOADING
- ::osl::Module aDialogLibrary;
- if (aDialogLibrary.loadRelative(&thisModule, CUI_DLL_NAME,
- SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY))
- {
- auto const p = reinterpret_cast<FuncPtrCreateDialogFactory>(
- aDialogLibrary.getFunctionSymbol("CreateDialogFactory"));
- aDialogLibrary.release();
- return p;
- }
- return nullptr;
-#else
- return CreateDialogFactory;
-#endif
- }();
- if (fp)
- return fp();
- return nullptr;
+ auto xService
+ = css::cui::GetCreateDialogFactoryService::create(comphelper::getProcessComponentContext());
+ return reinterpret_cast<VclAbstractDialogFactory*>(xService->getSomething({}));
}
VclAbstractDialog::~VclAbstractDialog() {}