summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRashesh <rashesh.padia@collabora.com>2024-12-17 13:48:12 +0530
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-12-17 14:03:49 +0100
commit89d86b64c93f2f47d7cfdefb928812e4de64fe3b (patch)
tree1274022a380dbe721658374b96fb330cf18e7a85
parent8bf2e3f60fd6efff435137a798d25c58168bd69c (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/+/178646 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--desktop/source/lib/init.cxx19
1 files changed, 11 insertions, 8 deletions
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({});
- }
}
}