summaryrefslogtreecommitdiff
path: root/svtools/source/misc/svtresid.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/misc/svtresid.cxx')
-rw-r--r--svtools/source/misc/svtresid.cxx17
1 files changed, 4 insertions, 13 deletions
diff --git a/svtools/source/misc/svtresid.cxx b/svtools/source/misc/svtresid.cxx
index e6cac0b9b981..f7cfdf8ba0f3 100644
--- a/svtools/source/misc/svtresid.cxx
+++ b/svtools/source/misc/svtresid.cxx
@@ -18,26 +18,17 @@
*/
#include <unotools/resmgr.hxx>
-#include <tools/solar.h>
#include <svtools/svtresid.hxx>
-static std::locale* pResLocale=nullptr;
-
-std::locale* SvtResLocale::GetResLocale()
-{
- if (!pResLocale)
- pResLocale = new std::locale(Translate::Create("svt"));
- return pResLocale;
-}
-
-void SvtResLocale::DeleteResLocale()
+const std::locale& SvtResLocale()
{
- DELETEZ(pResLocale);
+ static std::locale loc = Translate::Create("svt");
+ return loc;
}
OUString SvtResId(const char* pId)
{
- return Translate::get(pId, *SvtResLocale::GetResLocale());
+ return Translate::get(pId, SvtResLocale());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */