diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2022-05-01 16:52:30 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2022-06-10 14:09:54 +0200 |
commit | 4b7b449bbdc51557f62131a3b467b34ad39e8547 (patch) | |
tree | e9853ef6cad018f6dc807112217dcfccabe1a135 /include | |
parent | cea6679e11b8c18e4641f317831859c159cb8455 (diff) |
sw: restore UI language to en while saving
Because the XML writer used in sw invokes the
translation logic, which uses the UI language,
saving can fail in case there are multiple
views with different langauges. This restores
the language used for loading before saving
to avoid such issues.
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I6675204bb68ea33b1395c779a64ab3e9b339d73e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135482
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/lokhelper.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index 4ac50a19cc69..2a40344cd70a 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -73,6 +73,10 @@ public: static void setViewLanguage(int nId, const OUString& rBcp47LanguageTag); /// Set the default language for views. static void setDefaultLanguage(const OUString& rBcp47LanguageTag); + /// Get the language used by the loading view (used for all save operations). + static const LanguageTag & getLoadLanguage(); + /// Set the language used by the loading view (used for all save operations). + static void setLoadLanguage(const OUString& rBcp47LanguageTag); /// Set the locale for the given view. static void setViewLocale(int nId, const OUString& rBcp47LanguageTag); /// Get the device form factor that should be used for a new view. |