desktop/source/lib/init.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
New commits: commit 80c61e88e507a9b4bb93d563f87cf8acd0f656c3 Author: Rashesh <rashesh.pa...@collabora.com> AuthorDate: Tue Dec 17 13:48:12 2024 +0530 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Feb 5 15:24:39 2025 +0100 lokit: move re-initialization of wordbook to addconfig option - previously we used to re-initialize it in lo_init because we wanted regonize newly added dictionaries but then we again had to re-initailize the XDictionary if new dicionary are added after ForKit is created and when new LoKit is initialized - this patch now does it on "addconfig" setOption which after kit is initialized Change-Id: I115e8ef23e0b3184f35169f6421fe461239c856a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178665 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9e21b2372ee4..b143e8b104b3 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5271,6 +5271,17 @@ static void updateConfig(const OUString& rConfigPath) auto xUpdate(css::configuration::Update::get(comphelper::getProcessComponentContext())); xUpdate->insertModificationXcuFile(aXcuPath, { u"/"_ustr }, {}); } + else if (sFileName == "wordbook") + { + uno::Reference<css::linguistic2::XSearchableDictionaryList> xDicList + = LinguMgr::GetDictionaryList(); + if (xDicList.is()) + { + uno::Reference<lang::XInitialization> xReInitDictionaryList(xDicList, + uno::UNO_QUERY_THROW); + xReInitDictionaryList->initialize({}); + } + } } } @@ -8337,14 +8348,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char uno::Reference<lang::XInitialization> xReInitSettings(xPathSettings, uno::UNO_QUERY_THROW); xReInitSettings->initialize({}); - uno::Reference<css::linguistic2::XSearchableDictionaryList> xDicList - = LinguMgr::GetDictionaryList(); - if (xDicList.is()) - { - uno::Reference<lang::XInitialization> xReInitDictionaryList(xDicList, - uno::UNO_QUERY_THROW); - xReInitDictionaryList->initialize({}); - } } }