diff options
author | Eike Rathke <erack@redhat.com> | 2013-03-29 14:07:33 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-29 14:09:01 +0100 |
commit | 5be14df2444d9fcc3518c5f54872c87b924e3e98 (patch) | |
tree | 5a0b3b4b588469e9ff012c3a3328bdb224843160 /tools/inc | |
parent | ba4df3dd31ee9b2ced2a9119ecfd263e95de5ee6 (diff) |
ResMgr with LanguageTag
Change-Id: Ie5ce9157a7ea59db7b0509fbaec61d07f8f9edf0
Diffstat (limited to 'tools/inc')
-rw-r--r-- | tools/inc/tools/resmgr.hxx | 11 | ||||
-rw-r--r-- | tools/inc/tools/simplerm.hxx | 11 |
2 files changed, 8 insertions, 14 deletions
diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index 37aac4be9b6a..10bbfdc8734c 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -20,10 +20,9 @@ #define _TOOLS_RESMGR_HXX #include "tools/toolsdllapi.h" -#include <i18npool/lang.h> +#include <i18npool/languagetag.hxx> #include <tools/string.hxx> #include <tools/resid.hxx> -#include <com/sun/star/lang/Locale.hpp> #include <vector> @@ -136,11 +135,9 @@ public: /// Language-dependent resource library static const sal_Char* GetLang( LanguageType& eLanguage, sal_uInt16 nPrio = 0 ); ///< @deprecated see "tools/source/rc/resmgr.cxx" static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName, - com::sun::star::lang::Locale& rLocale ); + LanguageTag& rLocale ); static ResMgr* CreateResMgr( const sal_Char* pPrefixName, - com::sun::star::lang::Locale aLocale = com::sun::star::lang::Locale( rtl::OUString(), - rtl::OUString(), - rtl::OUString())); + LanguageTag aLocale = LanguageTag( LANGUAGE_SYSTEM) ); /// Test whether resource still exists void TestStack( const Resource * ); @@ -198,7 +195,7 @@ public: static void SetReadStringHook( ResHookProc pProc ); static ResHookProc GetReadStringHook(); - static void SetDefaultLocale( const com::sun::star::lang::Locale& rLocale ); + static void SetDefaultLocale( const LanguageTag& rLocale ); }; inline sal_uInt32 RSHEADER_TYPE::GetId() diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx index 9c054ec7dc10..6176ad5783f3 100644 --- a/tools/inc/tools/simplerm.hxx +++ b/tools/inc/tools/simplerm.hxx @@ -25,9 +25,8 @@ #include <osl/mutex.hxx> #include <tools/resid.hxx> -#include <i18npool/lang.h> +#include <i18npool/languagetag.hxx> #include <tools/string.hxx> -#include <com/sun/star/lang/Locale.hpp> #include "tools/toolsdllapi.h" class InternalResMgr; @@ -45,17 +44,15 @@ public: in ThreadTextEncoding @param rLocale denotes the locale of the resource file to - load. If empty, a default locale will be used. + load. If empty (SYSTEM), a default locale will be used. */ SimpleResMgr( const sal_Char* pPrefixName, - const ::com::sun::star::lang::Locale& _rLocale); + const LanguageTag& rLocale); virtual ~SimpleResMgr(); static SimpleResMgr* Create( const sal_Char* pPrefixName, - ::com::sun::star::lang::Locale aLocale = ::com::sun::star::lang::Locale( rtl::OUString(), - rtl::OUString(), - rtl::OUString()));// only in VCL + LanguageTag aLocale = LanguageTag( LANGUAGE_SYSTEM) );// only in VCL bool IsValid() const { return m_pResImpl != NULL; } |