desktop/source/lib/init.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
New commits: commit 89d86b64c93f2f47d7cfdefb928812e4de64fe3b Author: Rashesh <rashesh.pa...@collabora.com> AuthorDate: Tue Dec 17 13:48:12 2024 +0530 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Dec 17 14:03:49 2024 +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/+/178646 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 37de7a257e8f..edc7e6a82632 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5301,6 +5301,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({}); + } + } } } @@ -8355,14 +8366,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({}); - } } }