diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-04-15 16:10:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-04-16 18:34:35 +0200 |
commit | 14ae46251d44282feba222e3c24815f6d24e78ca (patch) | |
tree | cdee9065331939cb7adbe56467b01ba30cb073e0 /desktop | |
parent | 0fa363faaba5dc9c57cf7fd1d4aa0dd300310682 (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>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f1ca1291aed0..c3afbf741a37 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> @@ -127,6 +128,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/view/XSelectionSupplier.hpp> @@ -7582,6 +7584,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(); |