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 /accessibility/source/helper | |
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 'accessibility/source/helper')
-rw-r--r-- | accessibility/source/helper/accresmgr.cxx | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx index 7ffcafb3080f..7bf55e120737 100644 --- a/accessibility/source/helper/accresmgr.cxx +++ b/accessibility/source/helper/accresmgr.cxx @@ -20,40 +20,10 @@ #include <helper/accresmgr.hxx> #include <unotools/resmgr.hxx> -using namespace accessibility; - -// TkResMgr - -std::locale* TkResMgr::m_pImpl = nullptr; - -TkResMgr::EnsureDelete::~EnsureDelete() +OUString AccResId(const char* pId) { - delete TkResMgr::m_pImpl; -} - -void TkResMgr::ensureImplExists() -{ - if (m_pImpl) - return; - - m_pImpl = new std::locale(Translate::Create("acc")); - - if (m_pImpl) - { - // now that we have a impl class, make sure it's deleted on unloading the library - static TkResMgr::EnsureDelete s_aDeleteTheImplClass; - } -} - -OUString TkResMgr::loadString(const char *pResId) -{ - OUString sReturn; - - ensureImplExists(); - if (m_pImpl) - sReturn = Translate::get(pResId, *m_pImpl); - - return sReturn; + static std::locale loc = Translate::Create("acc"); + return Translate::get(pId, loc); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |