summaryrefslogtreecommitdiff
path: root/desktop/source/lib/init.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-01-10 15:27:48 +0200
committerAndras Timar <andras.timar@collabora.com>2022-02-14 12:09:29 +0100
commit9be4651c097e39dffd31a294eff8a803d4ef1577 (patch)
tree9c23df48b75b13a80b147b770cff1cf771dc0e9b /desktop/source/lib/init.cxx
parent3341bdf24373633ff1232119c69179f427b78a67 (diff)
preload configmgr data for COOL
touch all the config data we need during LOK pre-init. This means that most of the keys we need should become cached by ConfigurationWrapper in comphelper. Which means that the child processes we fork should be able to use the shared pages and not allocate their own. Change-Id: Iea8b1c4beaba67b6310b20cc161061ccf9a0db89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128247 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r--desktop/source/lib/init.cxx47
1 files changed, 47 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a79e69e1b85b..45042b8a9da1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -179,6 +179,23 @@
#include "lokclipboard.hxx"
#include <officecfg/Office/Common.hxx>
#include <officecfg/Office/Impress.hxx>
+#include <unotools/optionsdlg.hxx>
+#include <svl/ctloptions.hxx>
+#include <svtools/accessibilityoptions.hxx>
+#include <svtools/colorcfg.hxx>
+#include <svtools/miscopt.hxx>
+#include <svtools/slidesorterbaropt.hxx>
+#include <unotools/cmdoptions.hxx>
+#include <unotools/compatibility.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <unotools/lingucfg.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/searchopt.hxx>
+#include <unotools/syslocaleoptions.hxx>
+#include <unotools/useroptions.hxx>
+#include <unotools/viewoptions.hxx>
+#include <vcl/settings.hxx>
using namespace css;
using namespace vcl;
@@ -6422,6 +6439,36 @@ static void preloadData()
OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, GetDefaultFontFlags::OnlyOne);
}
+ std::cerr << "Preload config\n";
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#endif
+ static SvtOptionsDialogOptions aDialogOptions;
+ static SvtCTLOptions aSvtCTLOptions;
+ static SvtAccessibilityOptions aSvtAccessibilityOptions;
+ static svtools::ColorConfig aColorConfig;
+ static SvtMiscOptions aSvtMiscOptions;
+ static SvtSlideSorterBarOptions aSvtSlideSorterBarOptions;
+ static SvtCommandOptions aSvtCommandOptions;
+ static SvtCompatibilityOptions aSvtCompatibilityOptions;
+ static SvtFilterOptions aSvtFilterOptions;
+ static SvtLinguConfig aSvtLinguConfig;
+ static SvtModuleOptions aSvtModuleOptions;
+ static SvtPathOptions aSvtPathOptions;
+ static SvtSearchOptions aSvtSearchOptions;
+ static SvtSysLocaleOptions aSvtSysLocaleOptions;
+ static SvtUserOptions aSvtUserOptions;
+ //static SvtViewOptions aSvtViewOptions;
+ static MouseSettings aMouseSettings;
+ static StyleSettings aStyleSettings;
+ static MiscSettings aMiscSettings;
+ static HelpSettings aHelpSettings;
+ static AllSettings aAllSettings;
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
// Set user profile's path back to the original one
rtl::Bootstrap::set("UserInstallation", sUserPath);
}