fdo#46501: Cleanup SimpleResMgr
This commit is contained in:
committed by
Tor Lillqvist
parent
48666b7d60
commit
bcd21acf72
@@ -202,7 +202,7 @@ namespace extensions { namespace resource
|
||||
,m_pResourceManager( NULL )
|
||||
{
|
||||
::rtl::OUString sBaseName( _rBaseName );
|
||||
m_pResourceManager = new SimpleResMgr( sBaseName, m_aLocale );
|
||||
m_pResourceManager = new SimpleResMgr( rtl::OUStringToOString( sBaseName, RTL_TEXTENCODING_UTF8 ).getStr(), m_aLocale );
|
||||
|
||||
if ( !m_pResourceManager->IsValid() )
|
||||
{
|
||||
|
@@ -61,19 +61,6 @@ public:
|
||||
SimpleResMgr( const sal_Char* pPrefixName,
|
||||
const ::com::sun::star::lang::Locale& _rLocale);
|
||||
|
||||
/** creates a new SimpleResManager
|
||||
@param _rPrefixName
|
||||
denotes the prefix of the resource file name
|
||||
@param _inout_Locale
|
||||
denotes the locale of the resource file to load. If empty, no default handling
|
||||
(like in the other constructor) will happen, instead an unlocalized version will be
|
||||
attempted to be loaded.
|
||||
Upon return, the variable will contain the actual locale of the loaded resource file.
|
||||
For instance, if "en-US" is requested, but only "en" exists, the latter will be loaded
|
||||
and returned. Furthermore, if an unlocalized resource file with only the base name exists,
|
||||
this one will be loaded as final fallback.
|
||||
*/
|
||||
SimpleResMgr( const ::rtl::OUString& _rPrefixName, ::com::sun::star::lang::Locale& _inout_Locale );
|
||||
virtual ~SimpleResMgr();
|
||||
|
||||
static SimpleResMgr* Create( const sal_Char* pPrefixName,
|
||||
|
@@ -1925,13 +1925,6 @@ SimpleResMgr::SimpleResMgr( const sal_Char* pPrefixName,
|
||||
DBG_ASSERT( m_pResImpl, "SimpleResMgr::SimpleResMgr : have no impl class !" );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
SimpleResMgr::SimpleResMgr( const ::rtl::OUString& _rPrefixName, ::com::sun::star::lang::Locale& _inout_Locale )
|
||||
{
|
||||
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
|
||||
m_pResImpl = ResMgrContainer::get().getResMgr( _rPrefixName, _inout_Locale, true );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
SimpleResMgr::~SimpleResMgr()
|
||||
{
|
||||
|
Reference in New Issue
Block a user