summaryrefslogtreecommitdiff
path: root/formula/source/core/resource/core_resource.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'formula/source/core/resource/core_resource.cxx')
-rw-r--r--formula/source/core/resource/core_resource.cxx60
1 files changed, 5 insertions, 55 deletions
diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx
index 5163d41b5ae7..d68ab6b193a8 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -16,63 +16,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#include "core_resource.hxx"
-
#include <unotools/resmgr.hxx>
+#include "core_resource.hxx"
-// ---- needed as long as we have no contexts for components ---
-#include <rtl/instance.hxx>
-#include <svl/solar.hrc>
-
-
-namespace formula
+OUString ForResId(const char *pId)
{
-
-
- //= ResourceManager
-
- namespace
- {
- // access safety
- struct theResourceManagerMutex : public rtl::Static< osl::Mutex, theResourceManagerMutex > {};
- }
-
- sal_Int32 ResourceManager::s_nClients = 0;
- std::locale* ResourceManager::m_pImpl = nullptr;
-
- void ResourceManager::ensureImplExists()
- {
- if (m_pImpl)
- return;
-
- m_pImpl = new std::locale(Translate::Create("for"));
- }
-
- void ResourceManager::registerClient()
- {
- ::osl::MutexGuard aGuard(theResourceManagerMutex::get());
- ++s_nClients;
- }
-
- void ResourceManager::revokeClient()
- {
- ::osl::MutexGuard aGuard(theResourceManagerMutex::get());
- if (!--s_nClients && m_pImpl)
- {
- delete m_pImpl;
- m_pImpl = nullptr;
- }
- }
-
- const std::locale& ResourceManager::getResLocale()
- {
- ensureImplExists();
- return *m_pImpl;
- }
-
-
-} // formula
-
+ static std::locale loc = Translate::Create("for");
+ return Translate::get(pId, loc);
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */