desktop/source/lib/init.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit b69ad8f8e7a0aa06cac724ffb93ee58cd7e4cb07 Author: Ashod Nakashian <[email protected]> AuthorDate: Sun Jul 24 08:46:38 2022 -0400 Commit: Michael Meeks <[email protected]> CommitDate: Thu Jul 28 12:52:44 2022 +0200 lok: initialize the load-language We need to use the load-language for saving the document. This is to avoid using the language of the view that is issuing the save, which causes all sorts of issues (language-translation related). This logic was implemented in 4b7b449bbdc5 but for some reason the load-language wasn't set. This patch sets the load-language. Signed-off-by: Ashod Nakashian <[email protected]> Change-Id: I0cd1574d48a99e6ee84bacf75fc0d9ebe26e526b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137391 Reviewed-by: Michael Meeks <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137548 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9d88234bdb21..e787252525fb 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2519,6 +2519,14 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, if (!aLanguage.isEmpty() && isValidLangTag) { + static bool isLoading = true; + if (isLoading) + { + // Capture the language used to load the document. + SfxLokHelper::setLoadLanguage(aLanguage); + isLoading = false; + } + SfxLokHelper::setDefaultLanguage(aLanguage); // Set the LOK language tag, used for dialog tunneling. comphelper::LibreOfficeKit::setLanguageTag(LanguageTag(aLanguage));
