summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-04-15 16:10:54 +0200
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-16 20:53:03 +0200
commit83c5571bc6991749aa80aa87127dd56f53f9dee9 (patch)
treed39d5afe62bb841a90e20bf19c8886519bd9904b /desktop
parent95f1f2143ae53469417fcebc9b2020c34b53ff30 (diff)
preload BreakIterator for LOK
Change-Id: I22bea46d224f4020bb18d2826f23985fc2d8e492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166129 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 42e175060c28ef339e3c96b51baa9a8d84ef2c82) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166095 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 04c46306f12e..fdf25b4cfeac 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -15,6 +15,7 @@
#include <config_buildconfig.h>
#include <config_cairo_rgba.h>
#include <config_features.h>
+#include <editeng/unolingu.hxx>
#include <stdio.h>
#include <string.h>
@@ -134,6 +135,7 @@
#include <com/sun/star/linguistic2/XProofreader.hpp>
#include <com/sun/star/i18n/LocaleCalendar2.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
+#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
@@ -7633,6 +7635,12 @@ static void preloadData()
}
std::cerr << "\n";
+ std::cerr << "Preloading breakiterator: ";
+ css::uno::Reference< css::i18n::XBreakIterator > xBreakIterator = css::i18n::BreakIterator::create(xContext);
+ css::i18n::LineBreakUserOptions aUserOptions;
+ css::i18n::LineBreakHyphenationOptions aHyphOptions( LinguMgr::GetHyphenator(), css::uno::Sequence<beans::PropertyValue>(), 1 );
+ xBreakIterator->getLineBreak("", /*nMaxBreakPos*/0, aLocales[0], /*nMinBreakPos*/0, aHyphOptions, aUserOptions);
+
css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
comphelper::getProcessComponentContext());
xGlobalCfg->getAllKeyEvents();