desktop/source/lib/init.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 14ae46251d44282feba222e3c24815f6d24e78ca Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Apr 15 16:10:54 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Apr 16 18:34:35 2024 +0200 preload BreakIterator for LOK Change-Id: I22bea46d224f4020bb18d2826f23985fc2d8e492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166129 Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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 << " "; + 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();