summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/helper/accresmgr.cxx3
-rw-r--r--avmedia/Library_avmedia.mk1
-rw-r--r--avmedia/source/framework/mediamisc.cxx33
-rw-r--r--avmedia/source/inc/mediamisc.hxx7
-rw-r--r--basic/source/sbx/sbxscan.cxx5
-rw-r--r--chart2/Library_chartcore.mk1
-rw-r--r--chart2/source/inc/ResourceManager.hxx38
-rw-r--r--chart2/source/tools/ResId.cxx3
-rw-r--r--chart2/source/tools/ResourceManager.cxx34
-rw-r--r--cui/source/factory/cuiresmgr.cxx3
-rw-r--r--dbaccess/source/core/resource/core_resource.cxx3
-rw-r--r--editeng/source/editeng/eerdll.cxx8
-rw-r--r--extensions/source/inc/componentmodule.cxx3
-rw-r--r--extensions/source/propctrlr/modulepcr.cxx3
-rw-r--r--extensions/source/scanner/sanedlg.cxx3
-rw-r--r--filter/source/pdf/impdialog.cxx9
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx3
-rw-r--r--forms/source/resource/frm_resource.cxx3
-rw-r--r--formula/source/core/resource/core_resource.cxx3
-rw-r--r--fpicker/inc/fpsofficeResMgr.hxx3
-rw-r--r--framework/source/fwe/classes/fwkresid.cxx3
-rw-r--r--include/basic/sbdef.hxx2
-rw-r--r--include/editeng/eerdll.hxx1
-rw-r--r--include/svtools/svtresid.hxx2
-rw-r--r--include/svx/dialmgr.hxx2
-rw-r--r--reportdesign/source/core/resource/core_resource.cxx3
-rw-r--r--sccomp/source/solver/SolverComponent.cxx3
-rw-r--r--sccomp/source/solver/SwarmSolver.cxx3
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx4
-rw-r--r--svl/source/misc/getstringresource.cxx3
-rw-r--r--svtools/source/misc/svtresid.cxx5
-rw-r--r--svx/source/dialog/dialmgr.cxx5
-rw-r--r--vcl/source/app/settings.cxx6
-rw-r--r--writerperfect/Library_writerperfect.mk1
-rw-r--r--writerperfect/inc/WPFTResMgr.hxx7
-rw-r--r--writerperfect/source/common/WPFTResMgr.cxx11
-rw-r--r--xmlsecurity/inc/resourcemanager.hxx4
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.cxx6
38 files changed, 37 insertions, 203 deletions
diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx
index 7bf55e120737..37b8b9f56b33 100644
--- a/accessibility/source/helper/accresmgr.cxx
+++ b/accessibility/source/helper/accresmgr.cxx
@@ -22,8 +22,7 @@
OUString AccResId(const char* pId)
{
- static std::locale loc = Translate::Create("acc");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("acc"));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk
index ff206228a0c5..1f4c5246b651 100644
--- a/avmedia/Library_avmedia.mk
+++ b/avmedia/Library_avmedia.mk
@@ -64,7 +64,6 @@ $(eval $(call gb_Library_add_exception_objects,avmedia,\
avmedia/source/framework/mediacontrol \
avmedia/source/framework/MediaControlBase \
avmedia/source/framework/mediaitem \
- avmedia/source/framework/mediamisc \
avmedia/source/framework/mediaplayer \
avmedia/source/framework/mediatoolbox \
avmedia/source/framework/soundhandler \
diff --git a/avmedia/source/framework/mediamisc.cxx b/avmedia/source/framework/mediamisc.cxx
deleted file mode 100644
index a8d627266596..000000000000
--- a/avmedia/source/framework/mediamisc.cxx
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <unotools/resmgr.hxx>
-#include <mediamisc.hxx>
-
-namespace avmedia {
-
-const std::locale& GetResLocale()
-{
- static std::locale loc = Translate::Create("avmedia");
- return loc;
-}
-
-} // namespace avmedia
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 46d513fa4817..2c45b58775dc 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -41,14 +41,9 @@
// Mime types
#define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media"
-namespace avmedia
-{
- const std::locale& GetResLocale();
-}
-
inline OUString AvmResId(const char* pId)
{
- return Translate::get(pId, ::avmedia::GetResLocale());
+ return Translate::get(pId, Translate::Create("avmedia"));
}
#endif
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index d13cacb3616c..370e73c8ae58 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -586,10 +586,9 @@ bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
}
}
-const std::locale& BasResLocale()
+std::locale BasResLocale()
{
- static std::locale loc(Translate::Create("sb"));
- return loc;
+ return Translate::Create("sb");
}
OUString BasResId(const char *pId)
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index f785d097ae54..28bc87b89057 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -234,7 +234,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/tools/RelativePositionHelper \
chart2/source/tools/RelativeSizeHelper \
chart2/source/tools/ResId \
- chart2/source/tools/ResourceManager \
chart2/source/tools/Scaling \
chart2/source/tools/SceneProperties \
chart2/source/tools/StatisticsHelper \
diff --git a/chart2/source/inc/ResourceManager.hxx b/chart2/source/inc/ResourceManager.hxx
deleted file mode 100644
index afb1e76f9165..000000000000
--- a/chart2/source/inc/ResourceManager.hxx
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_CHART2_SOURCE_INC_RESOURCEMANAGER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_RESOURCEMANAGER_HXX
-
-#include "charttoolsdllapi.hxx"
-#include <locale>
-
-namespace chart
-{
-
-namespace ResourceManager
-{
- const std::locale& getResourceLocale();
-}
-
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_INC_RESOURCEMANAGER_HXX
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/tools/ResId.cxx b/chart2/source/tools/ResId.cxx
index b7341f9cf348..850eb9b84dd7 100644
--- a/chart2/source/tools/ResId.cxx
+++ b/chart2/source/tools/ResId.cxx
@@ -18,14 +18,13 @@
*/
#include <ResId.hxx>
-#include <ResourceManager.hxx>
#include <unotools/resmgr.hxx>
namespace chart
{
OUString SchResId(const char *pId)
{
- return Translate::get(pId, ResourceManager::getResourceLocale());
+ return Translate::get(pId, Translate::Create("chart"));
}
} // namespace chart
diff --git a/chart2/source/tools/ResourceManager.cxx b/chart2/source/tools/ResourceManager.cxx
deleted file mode 100644
index 78fff6d86d09..000000000000
--- a/chart2/source/tools/ResourceManager.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <ResourceManager.hxx>
-#include <unotools/resmgr.hxx>
-
-namespace chart
-{
-
-const std::locale& ResourceManager::getResourceLocale()
-{
- static std::locale loc = Translate::Create("chart");
- return loc;
-}
-
-} // namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx
index 7a3b82f25335..b59f73cf8530 100644
--- a/cui/source/factory/cuiresmgr.cxx
+++ b/cui/source/factory/cuiresmgr.cxx
@@ -22,8 +22,7 @@
OUString CuiResId(const char *pKey)
{
- static std::locale loc(Translate::Create("cui"));
- return Translate::get(pKey, loc);
+ return Translate::get(pKey, Translate::Create("cui"));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx
index d04bbb902812..eaadea9ded4a 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -36,8 +36,7 @@ namespace dbaccess
OUString ResourceManager::loadString(const char* pResId)
{
- static std::locale loc = Translate::Create("dba");
- return Translate::get(pResId, loc);
+ return Translate::get(pResId, Translate::Create("dba"));
}
OUString ResourceManager::loadString(const char* pResId, const sal_Char* _pPlaceholderAscii, const OUString& _rReplace)
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index a7f74bf2701f..f6b43af56221 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -195,7 +195,7 @@ uno::Reference< linguistic2::XLanguageGuessing > const & GlobalEditData::GetLang
OUString EditResId(const char *pId)
{
- return Translate::get(pId, EditDLL::GetResLocale());
+ return Translate::get(pId, Translate::Create("editeng"));
}
EditDLL::EditDLL()
@@ -207,12 +207,6 @@ EditDLL::~EditDLL()
{
}
-std::locale& EditDLL::GetResLocale()
-{
- static std::locale loc = Translate::Create("editeng");
- return loc;
-}
-
editeng::SharedVclResources::SharedVclResources()
: m_pVirDev(VclPtr<VirtualDevice>::Create())
{
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx
index 5d031a67d1a5..562b8692a38b 100644
--- a/extensions/source/inc/componentmodule.cxx
+++ b/extensions/source/inc/componentmodule.cxx
@@ -37,8 +37,7 @@ namespace compmodule
OUString ModuleRes(const char* pId)
{
- static std::locale loc = Translate::Create("pcr");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("pcr"));
}
//- registration helper
diff --git a/extensions/source/propctrlr/modulepcr.cxx b/extensions/source/propctrlr/modulepcr.cxx
index 8fedf6499ad0..a7da05f3e947 100644
--- a/extensions/source/propctrlr/modulepcr.cxx
+++ b/extensions/source/propctrlr/modulepcr.cxx
@@ -55,8 +55,7 @@ namespace pcr
OUString PcrRes(const char* pId)
{
- static std::locale loc = Translate::Create("pcr");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("pcr"));
}
} // namespace pcr
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index e515a763af39..83bea0e05367 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -321,8 +321,7 @@ namespace {
OUString SaneResId(const char *pID)
{
- static std::locale loc = Translate::Create("pcr");
- return Translate::get(pID, loc);
+ return Translate::get(pID, Translate::Create("pcr"));
}
}
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 <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <com/sun/star/security/XCertificate.hpp>
-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 35ece49e3b4c..2146ddd1a1be 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,
diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx
index 21b440e55d2c..3375ce4ceae6 100644
--- a/forms/source/resource/frm_resource.cxx
+++ b/forms/source/resource/frm_resource.cxx
@@ -26,8 +26,7 @@ namespace frm
{
OUString loadString(const char* pResId)
{
- static std::locale loc = Translate::Create("frm");
- return Translate::get(pResId, loc);
+ return Translate::get(pResId, Translate::Create("frm"));
}
}
}
diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx
index e6732b0b3668..e89a1ce367aa 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -21,8 +21,7 @@
OUString ForResId(const char *pId)
{
- static std::locale loc = Translate::Create("for");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("for"));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/inc/fpsofficeResMgr.hxx b/fpicker/inc/fpsofficeResMgr.hxx
index 3d3b92de8465..11c8d9f50728 100644
--- a/fpicker/inc/fpsofficeResMgr.hxx
+++ b/fpicker/inc/fpsofficeResMgr.hxx
@@ -13,8 +13,7 @@
inline OUString FpsResId(const char* pId)
{
- static std::locale loc = Translate::Create("fps");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("fps"));
};
#endif
diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx
index c020b32290aa..b6dcaecff893 100644
--- a/framework/source/fwe/classes/fwkresid.cxx
+++ b/framework/source/fwe/classes/fwkresid.cxx
@@ -22,8 +22,7 @@
OUString FwkResId(const char* pId)
{
- static std::locale loc(Translate::Create("fwk"));
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("fwk"));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/basic/sbdef.hxx b/include/basic/sbdef.hxx
index 80513323f308..e79c58b6c071 100644
--- a/include/basic/sbdef.hxx
+++ b/include/basic/sbdef.hxx
@@ -69,7 +69,7 @@ enum class PropertyMode
};
BASIC_DLLPUBLIC const ErrMsgCode* getRID_BASIC_START();
-BASIC_DLLPUBLIC const std::locale& BasResLocale();
+BASIC_DLLPUBLIC std::locale BasResLocale();
BASIC_DLLPUBLIC OUString BasResId(const char* pId);
#endif
diff --git a/include/editeng/eerdll.hxx b/include/editeng/eerdll.hxx
index 1f1a8411c7c6..ba31c72380d9 100644
--- a/include/editeng/eerdll.hxx
+++ b/include/editeng/eerdll.hxx
@@ -41,7 +41,6 @@ public:
EditDLL();
~EditDLL();
- static std::locale& GetResLocale();
GlobalEditData* GetGlobalData() const { return pGlobalData.get(); }
std::shared_ptr<editeng::SharedVclResources> GetSharedVclResources();
static EditDLL& Get();
diff --git a/include/svtools/svtresid.hxx b/include/svtools/svtresid.hxx
index cae5861a4df9..f0f9b45fcc29 100644
--- a/include/svtools/svtresid.hxx
+++ b/include/svtools/svtresid.hxx
@@ -24,7 +24,7 @@
#include <rtl/ustring.hxx>
#include <locale>
-SVT_DLLPUBLIC const std::locale& SvtResLocale();
+SVT_DLLPUBLIC std::locale SvtResLocale();
SVT_DLLPUBLIC OUString SvtResId(const char* pId);
#endif // INCLUDED_SVTOOLS_SVTRESID_HXX
diff --git a/include/svx/dialmgr.hxx b/include/svx/dialmgr.hxx
index ee9147d1f503..20a5c25b81eb 100644
--- a/include/svx/dialmgr.hxx
+++ b/include/svx/dialmgr.hxx
@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <svx/svxdllapi.h>
-SVX_DLLPUBLIC const std::locale& SvxResLocale();
+SVX_DLLPUBLIC std::locale SvxResLocale();
SVX_DLLPUBLIC OUString SvxResId(const char* pId);
#endif
diff --git a/reportdesign/source/core/resource/core_resource.cxx b/reportdesign/source/core/resource/core_resource.cxx
index dc74fcae2380..4393cb8d5de6 100644
--- a/reportdesign/source/core/resource/core_resource.cxx
+++ b/reportdesign/source/core/resource/core_resource.cxx
@@ -30,8 +30,7 @@
OUString RptResId(const char* pId)
{
- static std::locale loc = Translate::Create("rpt");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("rpt"));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sccomp/source/solver/SolverComponent.cxx b/sccomp/source/solver/SolverComponent.cxx
index fae79103967c..d279d8feceb4 100644
--- a/sccomp/source/solver/SolverComponent.cxx
+++ b/sccomp/source/solver/SolverComponent.cxx
@@ -46,8 +46,7 @@ using namespace com::sun::star;
OUString SolverComponent::GetResourceString(const char* pId)
{
- static std::locale loc = Translate::Create("scc");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("scc"));
}
size_t ScSolverCellHash::operator()( const css::table::CellAddress& rAddress ) const
diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx
index eba55c87da2f..ba89367db54b 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -283,8 +283,7 @@ OUString SwarmSolver::getResourceString(const char* pId)
if (!pId)
return sString;
- static std::locale aLocale = Translate::Create("scc");
- return Translate::get(pId, aLocale);
+ return Translate::get(pId, Translate::Create("scc"));
}
uno::Reference<table::XCell> SwarmSolver::getCell(const table::CellAddress& rPosition)
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index aa7cd8d60f39..250494d52d09 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -17,14 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <sfx2/sfxresid.hxx>
#include <unotools/resmgr.hxx>
OUString SfxResId(const char* pId)
{
- static std::locale loc = Translate::Create("sfx");
- return Translate::get(pId, loc);
+ return Translate::get(pId, Translate::Create("sfx"));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/misc/getstringresource.cxx b/svl/source/misc/getstringresource.cxx
index c452b6612651..9b0f14882b61 100644
--- a/svl/source/misc/getstringresource.cxx
+++ b/svl/source/misc/getstringresource.cxx
@@ -28,8 +28,7 @@
OUString SvlResId(const char* id)
{
- static std::locale loc = Translate::Create("svl");
- return Translate::get(id, loc);
+ return Translate::get(id, Translate::Create("svl"));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/misc/svtresid.cxx b/svtools/source/misc/svtresid.cxx
index f7cfdf8ba0f3..cc03beeb1dd3 100644
--- a/svtools/source/misc/svtresid.cxx
+++ b/svtools/source/misc/svtresid.cxx
@@ -20,10 +20,9 @@
#include <unotools/resmgr.hxx>
#include <svtools/svtresid.hxx>
-const std::locale& SvtResLocale()
+std::locale SvtResLocale()
{
- static std::locale loc = Translate::Create("svt");
- return loc;
+ return Translate::Create("svt");
}
OUString SvtResId(const char* pId)
diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx
index 870cd05f295f..cba8fbcc9e03 100644
--- a/svx/source/dialog/dialmgr.cxx
+++ b/svx/source/dialog/dialmgr.cxx
@@ -20,10 +20,9 @@
#include <unotools/resmgr.hxx>
#include <svx/dialmgr.hxx>
-const std::locale& SvxResLocale()
+std::locale SvxResLocale()
{
- static std::locale loc = Translate::Create("svx");
- return loc;
+ return Translate::Create("svx");
}
OUString SvxResId(const char* pId)
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 043f36d750bb..e2841b8b4ed2 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2880,6 +2880,9 @@ const LanguageTag& AllSettings::GetLanguageTag() const
return aRet;
}
+ if (comphelper::LibreOfficeKit::isActive())
+ return comphelper::LibreOfficeKit::getLanguageTag();
+
// SYSTEM locale means: use settings from SvtSysLocale that is resolved
if ( mxData->maLocale.isSystemLocale() )
mxData->maLocale = mxData->maSysLocale.GetLanguageTag();
@@ -2895,6 +2898,9 @@ const LanguageTag& AllSettings::GetUILanguageTag() const
return aRet;
}
+ if (comphelper::LibreOfficeKit::isActive())
+ return comphelper::LibreOfficeKit::getLanguageTag();
+
// the UILocale is never changed
if ( mxData->maUILocale.isSystemLocale() )
mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag();
diff --git a/writerperfect/Library_writerperfect.mk b/writerperfect/Library_writerperfect.mk
index 430503ff81b5..fd7e344822f3 100644
--- a/writerperfect/Library_writerperfect.mk
+++ b/writerperfect/Library_writerperfect.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_Library_add_exception_objects,writerperfect,\
writerperfect/source/common/DirectoryStream \
writerperfect/source/common/DocumentHandler \
writerperfect/source/common/WPFTEncodingDialog \
- writerperfect/source/common/WPFTResMgr \
writerperfect/source/common/WPXSvInputStream \
))
diff --git a/writerperfect/inc/WPFTResMgr.hxx b/writerperfect/inc/WPFTResMgr.hxx
index 17bfc872731a..1ac6796bb91e 100644
--- a/writerperfect/inc/WPFTResMgr.hxx
+++ b/writerperfect/inc/WPFTResMgr.hxx
@@ -7,14 +7,9 @@
#include <unotools/resmgr.hxx>
-struct WRITERPERFECT_DLLPUBLIC WPFTResLocale
-{
- static std::locale &GetResLocale();
-};
-
inline OUString WpResId(const char *pId)
{
- return Translate::get(pId, WPFTResLocale::GetResLocale());
+ return Translate::get(pId, Translate::Create("wpt"));
}
#endif
diff --git a/writerperfect/source/common/WPFTResMgr.cxx b/writerperfect/source/common/WPFTResMgr.cxx
deleted file mode 100644
index 6d3d12381aa0..000000000000
--- a/writerperfect/source/common/WPFTResMgr.cxx
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
-#include <WPFTResMgr.hxx>
-
-std::locale &WPFTResLocale::GetResLocale()
-{
- static std::locale loc(Translate::Create("wpt"));
- return loc;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/resourcemanager.hxx b/xmlsecurity/inc/resourcemanager.hxx
index 3516bcfa0db4..d621c4bc7328 100644
--- a/xmlsecurity/inc/resourcemanager.hxx
+++ b/xmlsecurity/inc/resourcemanager.hxx
@@ -34,8 +34,6 @@ class LocaleDataWrapper;
namespace XmlSec
{
- const std::locale& GetResLocale();
-
const LocaleDataWrapper& GetLocaleData();
DateTime GetDateTime( const css::util::DateTime& _rDT );
OUString GetDateTimeString( const css::util::DateTime& _rDT );
@@ -53,7 +51,7 @@ namespace XmlSec
inline OUString XsResId(const char* pId)
{
- return Translate::get(pId, XmlSec::GetResLocale());
+ return Translate::get(pId, Translate::Create("xsc"));
}
#endif
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx
index 2e869691cdc2..102466a8159f 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.cxx
@@ -32,12 +32,6 @@ using namespace std;
namespace XmlSec
{
- const std::locale& GetResLocale()
- {
- static const std::locale loc = Translate::Create("xsc");
- return loc;
- }
-
const LocaleDataWrapper& GetLocaleData()
{
static SvtSysLocale ourSysLocale;