diff options
author | Rashesh <rashesh.padia@collabora.com> | 2024-12-17 13:48:12 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2025-02-05 15:24:39 +0100 |
commit | 80c61e88e507a9b4bb93d563f87cf8acd0f656c3 (patch) | |
tree | 02704249ee36c766cda26a67dcbb4bad0e049b14 | |
parent | 7daf54c93dbcdfb74a84e2e8e0b7725c67bf0941 (diff) |
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 <vmiklos@collabora.com>
-rw-r--r-- | desktop/source/lib/init.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
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({}); - } } } |