From 155d62ba24d217427c52a4ba319d8b01a9c22cd2 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 13 Dec 2017 19:17:48 +0100 Subject: lokdialog: Allow switching language of some of the ResMgr's. This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks Tested-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins (cherry picked from commit 101a79cc4d13a1f566c1b97c1329813eb7c61bcf) --- filter/source/pdf/impdialog.cxx | 9 +-------- filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'filter') diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 82aaf012505a..88d0e9687d05 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -42,21 +42,14 @@ #include #include -static std::locale& getPDFFilterResLocale() -{ - static std::locale loc = Translate::Create("flt"); - return loc; -} - OUString PDFFilterResId(const char* pId) { - return Translate::get(pId, getPDFFilterResLocale()); + return Translate::get(pId, Translate::Create("flt")); } using namespace ::com::sun::star; using namespace ::com::sun::star::uno; - /** Tabbed PDF dialog implementation Please note: the default used here are the same as per specification, They should be the same in PDFFilter::implExport and in PDFExport::PDFExport diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index c782149148e8..ac0a7d56a082 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -60,8 +60,7 @@ using ::rtl::Uri; OUString XsltResId(const char* pId) { - static std::locale loc = Translate::Create("flt"); - return Translate::get(pId, loc); + return Translate::get(pId, Translate::Create("flt")); } XMLFilterSettingsDialog::XMLFilterSettingsDialog(vcl::Window* pParent, -- cgit