summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-19 13:00:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-19 17:10:51 +0100
commit074e969a23be8bf2f5ef21d6997f7a0522c81369 (patch)
treee68f8efa1445284f653728b22d4b203c1f32db10
parent2db9ef47478fa7faf4fbceb0791edf43a110fb4f (diff)
move VclBuilder::preload so desktop doesn't need to include that header
Change-Id: I72f2b21cb9ac0b39995887afcf41189f2e7ad284 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111219 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--desktop/source/lib/init.cxx3
-rw-r--r--include/vcl/builder.hxx3
-rw-r--r--include/vcl/dialoghelper.hxx2
-rw-r--r--vcl/source/window/builder.cxx7
4 files changed, 9 insertions, 6 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7d8785040964..76f08455e3a7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -151,7 +151,6 @@
#include <unotools/datetime.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/languagetag.hxx>
-#include <vcl/builder.hxx>
#include <vcl/abstdlg.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/uitest/uiobject.hxx>
@@ -6300,7 +6299,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
{ // Force load some modules
comphelper::ProfileZone aInit("preload modules");
- VclBuilder::preload();
+ VclBuilderPreload();
VclAbstractDialogFactory::Create();
}
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index dd75d71b8579..1fe1ef85f243 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -106,9 +106,6 @@ public:
return m_sHelpRoot;
}
- /// Pre-loads all modules containing UI information
- static void preload();
-
static SymbolType mapStockToSymbol(std::u16string_view icon_name);
private:
diff --git a/include/vcl/dialoghelper.hxx b/include/vcl/dialoghelper.hxx
index f8d9ffee83a0..828c21b2af17 100644
--- a/include/vcl/dialoghelper.hxx
+++ b/include/vcl/dialoghelper.hxx
@@ -24,6 +24,8 @@ VCL_DLLPUBLIC void EndAllDialogs(vcl::Window const* pParent);
/* for LibreOffice kit */
VCL_DLLPUBLIC void EnableDialogInput(vcl::Window* pDialog);
VCL_DLLPUBLIC bool CloseDialog(vcl::Window* pDialog);
+/// Pre-loads all modules containing UI information
+VCL_DLLPUBLIC void VclBuilderPreload();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 2717007b0318..470485c05301 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -23,6 +23,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/resmgr.hxx>
#include <vcl/builder.hxx>
+#include <vcl/dialoghelper.hxx>
#include <vcl/toolkit/button.hxx>
#include <vcl/toolkit/dialog.hxx>
#include <vcl/toolkit/edit.hxx>
@@ -1483,7 +1484,9 @@ static std::shared_ptr<NoAutoUnloadModule> g_pMergedLib = std::make_shared<NoAut
#endif
-void VclBuilder::preload()
+namespace vcl {
+
+void VclBuilderPreload()
{
#ifndef DISABLE_DYNLOADING
@@ -1506,6 +1509,8 @@ void VclBuilder::preload()
#endif // DISABLE_DYNLOADING
}
+}
+
#if defined DISABLE_DYNLOADING && !HAVE_FEATURE_DESKTOP
extern "C" VclBuilder::customMakeWidget lo_get_custom_widget_func(const char* name);
#endif