diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-01 13:50:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-02 10:36:07 +0200 |
commit | 13fac4894f752e922727c6f22c6303712e06ba12 (patch) | |
tree | 5689829e917927bb13461d91988ec99e461f1831 /fpicker/inc | |
parent | 13cadf3fe38daa0b4cfddcfa68ec8631bc85f44a (diff) |
normalize resource locale ctor construction mechanisms
make them all the same and share std::locales more
various OModuleClient, etc, classes go away
Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5
Reviewed-on: https://gerrit.libreoffice.org/40634
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker/inc')
-rw-r--r-- | fpicker/inc/fpsofficeResMgr.hxx | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/fpicker/inc/fpsofficeResMgr.hxx b/fpicker/inc/fpsofficeResMgr.hxx index 1d38ae7d4fa7..3d3b92de8465 100644 --- a/fpicker/inc/fpsofficeResMgr.hxx +++ b/fpicker/inc/fpsofficeResMgr.hxx @@ -9,34 +9,12 @@ #ifndef INCLUDED_FPICKER_SOURCE_OFFICE_FPSOFFICERESMGR_HXX #define INCLUDED_FPICKER_SOURCE_OFFICE_FPSOFFICERESMGR_HXX -#include <rtl/instance.hxx> -#include <osl/getglobalmutex.hxx> #include <unotools/resmgr.hxx> -#include <vcl/settings.hxx> -#include <vcl/svapp.hxx> - -namespace fpicker -{ - struct ResLocaleHolder - { - std::locale* operator ()() - { - return new std::locale(Translate::Create("fps")); - } - - static std::locale* getOrCreate() - { - return rtl_Instance< - std::locale, ResLocaleHolder, - osl::MutexGuard, osl::GetGlobalMutex >::create ( - ResLocaleHolder(), osl::GetGlobalMutex()); - } - }; -} inline OUString FpsResId(const char* pId) { - return Translate::get(pId, *fpicker::ResLocaleHolder::getOrCreate()); + static std::locale loc = Translate::Create("fps"); + return Translate::get(pId, loc); }; #endif |