[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source framework/source

Michael Meeks michael.meeks at collabora.com
Wed Dec 13 19:28:46 UTC 2017


 desktop/source/lib/init.cxx                                      |   17 ++++++++++
 framework/source/accelerators/globalacceleratorconfiguration.cxx |    3 +
 2 files changed, 20 insertions(+)

New commits:
commit d83b5a462412acbad86ecb31685159015374ffbb
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Dec 1 21:56:55 2017 +0000

    Initialize more for sharing during pre-init.
    
    Change-Id: I12b90504ec9161318683ebad8f8e4dd1e614da89
    Reviewed-on: https://gerrit.libreoffice.org/46120
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e169c768e430..3cd8e1220753 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -54,6 +54,7 @@
 #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
 #include <com/sun/star/text/TextContentAnchorType.hpp>
 #include <com/sun/star/document/XRedlinesSupplier.hpp>
+#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
 
 #include <com/sun/star/linguistic2/LinguServiceManager.hpp>
 #include <com/sun/star/linguistic2/XSpellChecker.hpp>
@@ -83,6 +84,7 @@
 #include <vcl/ptrstyle.hxx>
 #include <vcl/sysdata.hxx>
 #include <vcl/virdev.hxx>
+#include <vcl/ImageTree.hxx>
 #include <vcl/ITiledRenderable.hxx>
 #include <vcl/IDialogRenderable.hxx>
 #include <unicode/uchar.h>
@@ -94,6 +96,7 @@
 #include <sfx2/sfxbasemodel.hxx>
 #include <svl/undo.hxx>
 #include <unotools/datetime.hxx>
+#include <i18nlangtag/languagetag.hxx>
 
 #include <app.hxx>
 
@@ -3546,6 +3549,20 @@ static void preloadData()
         xSpellChecker->isValid("forcefed", it, aNone);
     }
     std::cerr << "\n";
+
+    css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg;
+    xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
+        comphelper::getProcessComponentContext());
+    xGlobalCfg->getAllKeyEvents();
+
+    std::cerr << "Preload icons\n";
+    ImageTree &images = ImageTree::get();
+    images.getImageUrl("forcefed.png", "style", "FO_oo");
+
+    std::cerr << "Preload languages\n";
+    // force load language singleton
+    SvtLanguageTable::HasLanguageType(LANGUAGE_SYSTEM);
+    LanguageTag::isValidBcp47("foo");
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char* pUserProfileUrl)
diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx
index 5104c242c791..6db06f656edf 100644
--- a/framework/source/accelerators/globalacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx
@@ -19,6 +19,7 @@
 
 #include <accelerators/acceleratorconfiguration.hxx>
 #include <accelerators/presethandler.hxx>
+#include <accelerators/keymapping.hxx>
 #include <helper/mischelper.hxx>
 
 #include <acceleratorconst.h>
@@ -90,6 +91,8 @@ private:
 GlobalAcceleratorConfiguration::GlobalAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
     : GlobalAcceleratorConfiguration_BASE(xContext)
 {
+    // force keyboard string registration.
+    KeyMapping::get();
 }
 
 void GlobalAcceleratorConfiguration::fillCache()


More information about the Libreoffice-commits mailing list