summaryrefslogtreecommitdiff
path: root/svtools/source/misc/svtdata.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-08 18:23:23 +0200
committerMathias Bauer <mba@openoffice.org>2009-10-08 18:23:23 +0200
commit62c0e0c6b18e5e7a9d0ce9d6c53f4c3b1ba5204e (patch)
tree7ec46721150f49bf875fad8b1bfa2244bfe6737a /svtools/source/misc/svtdata.cxx
parent80a5eff607808252c7fa7024793d445191d928a5 (diff)
#i103496#: make svtools buildable
Diffstat (limited to 'svtools/source/misc/svtdata.cxx')
-rw-r--r--svtools/source/misc/svtdata.cxx44
1 files changed, 13 insertions, 31 deletions
diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx
index 51247a628c0e..2bc1977e9197 100644
--- a/svtools/source/misc/svtdata.cxx
+++ b/svtools/source/misc/svtdata.cxx
@@ -36,17 +36,7 @@
#include <tools/shl.hxx>
#include <vos/process.hxx>
#include <svtools/svtdata.hxx>
-
-namespace unnamed_svtools_svtdata {}
-using namespace unnamed_svtools_svtdata;
- // unnamed namespaces don't work well yet
-
-//============================================================================
-namespace unnamed_svtools_svtdata {
-
-typedef std::map< rtl::OUString, SimpleResMgr * > SimpleResMgrMap;
-
-}
+#include <vcl/svapp.hxx>
//============================================================================
//
@@ -57,11 +47,6 @@ typedef std::map< rtl::OUString, SimpleResMgr * > SimpleResMgrMap;
ImpSvtData::~ImpSvtData()
{
delete pResMgr;
- for (SimpleResMgrMap::iterator t
- = static_cast< SimpleResMgrMap * >(m_pThreadsafeRMs)->begin();
- t != static_cast< SimpleResMgrMap * >(m_pThreadsafeRMs)->end(); ++t)
- delete t->second;
- delete static_cast< SimpleResMgrMap * >(m_pThreadsafeRMs);
}
//============================================================================
@@ -74,22 +59,9 @@ ResMgr * ImpSvtData::GetResMgr(const ::com::sun::star::lang::Locale aLocale)
return pResMgr;
}
-//============================================================================
-SimpleResMgr* ImpSvtData::GetSimpleRM(const ::com::sun::star::lang::Locale& rLocale)
+ResMgr * ImpSvtData::GetResMgr()
{
- if (!m_pThreadsafeRMs)
- m_pThreadsafeRMs = new SimpleResMgrMap;
- rtl::OUString aISOcode = rLocale.Language;
- aISOcode += rtl::OStringToOUString("-", RTL_TEXTENCODING_UTF8);
- aISOcode += rLocale.Country;
-
- SimpleResMgr *& rResMgr
- = (*static_cast< SimpleResMgrMap * >(m_pThreadsafeRMs))[aISOcode];
- if (!rResMgr)
- {
- rResMgr = new SimpleResMgr(CREATEVERSIONRESMGR_NAME(svs), rLocale );
- }
- return rResMgr;
+ return GetResMgr(Application::GetSettings().GetUILocale());
}
ResMgr * ImpSvtData::GetPatchResMgr(const ::com::sun::star::lang::Locale& aLocale)
@@ -101,6 +73,16 @@ ResMgr * ImpSvtData::GetPatchResMgr(const ::com::sun::star::lang::Locale& aLocal
return pPatchResMgr;
}
+ResMgr * ImpSvtData::GetPatchResMgr()
+{
+ return GetPatchResMgr(Application::GetSettings().GetUILocale());
+}
+
+SvpResId::SvpResId( USHORT nId ) :
+ ResId( nId, *ImpSvtData::GetSvtData().GetPatchResMgr() )
+{
+}
+
//============================================================================
// static
ImpSvtData & ImpSvtData::GetSvtData()