Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index



Hi!

I deleted the constructor which uses OUString as suggested here: 
https://bugs.freedesktop.org/show_bug.cgi?id=46501

Szabolcs
                                          
From f69fd5cb5e8cbe05a3b87b9b5adfd8494a9a4bab Mon Sep 17 00:00:00 2001
From: Szabolcs Dezsi <dezsiszabi@hotmail.com>
Date: Fri, 2 Mar 2012 13:30:28 +0100
Subject: [PATCH] Cleanup SimpleResMgr

---
 extensions/source/resource/oooresourceloader.cxx |    2 +-
 tools/inc/tools/simplerm.hxx                     |   13 -------------
 tools/source/rc/resmgr.cxx                       |    7 -------
 3 files changed, 1 insertions(+), 21 deletions(-)

diff --git a/extensions/source/resource/oooresourceloader.cxx 
b/extensions/source/resource/oooresourceloader.cxx
index 21b9f56..a0320da 100644
--- a/extensions/source/resource/oooresourceloader.cxx
+++ b/extensions/source/resource/oooresourceloader.cxx
@@ -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() )
         {
diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx
index 0794ed1..cee100f 100644
--- a/tools/inc/tools/simplerm.hxx
+++ b/tools/inc/tools/simplerm.hxx
@@ -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,
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 8af6da3..8c6358e 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1926,13 +1926,6 @@ SimpleResMgr::SimpleResMgr( const sal_Char* pPrefixName,
 }
 
 // -----------------------------------------------------------------------
-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()
 {
     delete m_pResImpl;
-- 
1.7.7


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.