move ResArray into SvtLanguageTableImpl
Change-Id: I0921fcef306f1ca60196fc9dfa2652e91db63004
This commit is contained in:
@@ -19,20 +19,13 @@
|
|||||||
#ifndef INCLUDED_SVTOOLS_LANGTAB_HXX
|
#ifndef INCLUDED_SVTOOLS_LANGTAB_HXX
|
||||||
#define INCLUDED_SVTOOLS_LANGTAB_HXX
|
#define INCLUDED_SVTOOLS_LANGTAB_HXX
|
||||||
|
|
||||||
|
|
||||||
#include <tools/resary.hxx>
|
|
||||||
#include <i18nlangtag/lang.h>
|
#include <i18nlangtag/lang.h>
|
||||||
|
#include <rtl/ustring.hxx>
|
||||||
#include <svtools/svtdllapi.h>
|
#include <svtools/svtdllapi.h>
|
||||||
|
|
||||||
|
class SVT_DLLPUBLIC SvtLanguageTable
|
||||||
// class SvtLanguageTable
|
|
||||||
|
|
||||||
|
|
||||||
class SVT_DLLPUBLIC SvtLanguageTable : public ResStringArray
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SvtLanguageTable();
|
|
||||||
~SvtLanguageTable();
|
|
||||||
|
|
||||||
static OUString GetLanguageString( const LanguageType eType );
|
static OUString GetLanguageString( const LanguageType eType );
|
||||||
static LanguageType GetLanguageType( const OUString& rStr );
|
static LanguageType GetLanguageType( const OUString& rStr );
|
||||||
@@ -47,14 +40,6 @@ public:
|
|||||||
parameter.
|
parameter.
|
||||||
*/
|
*/
|
||||||
static OUString GetLanguageString( const LanguageType eType, bool bUserInterfaceSelection );
|
static OUString GetLanguageString( const LanguageType eType, bool bUserInterfaceSelection );
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection = false ) const;
|
|
||||||
LanguageType GetType( const OUString& rStr ) const;
|
|
||||||
sal_uInt32 GetEntryCount() const;
|
|
||||||
LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add LRE or RLE embedding characters to the string based on the
|
// Add LRE or RLE embedding characters to the string based on the
|
||||||
|
@@ -31,12 +31,26 @@
|
|||||||
#include <svtools/svtresid.hxx>
|
#include <svtools/svtresid.hxx>
|
||||||
#include <svtools/langtab.hxx>
|
#include <svtools/langtab.hxx>
|
||||||
#include <unotools/syslocale.hxx>
|
#include <unotools/syslocale.hxx>
|
||||||
|
#include <tools/resary.hxx>
|
||||||
|
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
|
|
||||||
|
class SvtLanguageTableImpl : public ResStringArray
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
SvtLanguageTableImpl();
|
||||||
|
virtual ~SvtLanguageTableImpl();
|
||||||
|
|
||||||
|
const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection = false ) const;
|
||||||
|
LanguageType GetType( const OUString& rStr ) const;
|
||||||
|
sal_uInt32 GetEntryCount() const;
|
||||||
|
LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const;
|
||||||
|
};
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct theLanguageTable : public rtl::Static< SvtLanguageTable, theLanguageTable > {};
|
struct theLanguageTable : public rtl::Static< SvtLanguageTableImpl, theLanguageTable > {};
|
||||||
}
|
}
|
||||||
|
|
||||||
SVT_DLLPUBLIC const OUString ApplyLreOrRleEmbedding( const OUString &rText )
|
SVT_DLLPUBLIC const OUString ApplyLreOrRleEmbedding( const OUString &rText )
|
||||||
@@ -122,20 +136,20 @@ namespace {
|
|||||||
// "The value of STR_ARR_SVT_LANGUAGE_TABLE has changed. wizards/com/sun/star/wizards/letter/LocaleCodes.java has this value hard coded, please adapt it to your change."
|
// "The value of STR_ARR_SVT_LANGUAGE_TABLE has changed. wizards/com/sun/star/wizards/letter/LocaleCodes.java has this value hard coded, please adapt it to your change."
|
||||||
}
|
}
|
||||||
|
|
||||||
SvtLanguageTable::SvtLanguageTable() :
|
SvtLanguageTableImpl::SvtLanguageTableImpl() :
|
||||||
ResStringArray( SvtResId( STR_ARR_SVT_LANGUAGE_TABLE ) )
|
ResStringArray( SvtResId( STR_ARR_SVT_LANGUAGE_TABLE ) )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SvtLanguageTable::~SvtLanguageTable()
|
SvtLanguageTableImpl::~SvtLanguageTableImpl()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const OUString SvtLanguageTable::GetString( const LanguageType eType, bool bUserInterfaceSelection ) const
|
const OUString SvtLanguageTableImpl::GetString( const LanguageType eType, bool bUserInterfaceSelection ) const
|
||||||
{
|
{
|
||||||
LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType, bUserInterfaceSelection);
|
LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType, bUserInterfaceSelection);
|
||||||
sal_uInt32 nPos = FindIndex( eLang );
|
sal_uInt32 nPos = FindIndex( eLang );
|
||||||
@@ -164,7 +178,7 @@ OUString SvtLanguageTable::GetLanguageString( const LanguageType eType, bool bUs
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
LanguageType SvtLanguageTable::GetType( const OUString& rStr ) const
|
LanguageType SvtLanguageTableImpl::GetType( const OUString& rStr ) const
|
||||||
{
|
{
|
||||||
LanguageType eType = LANGUAGE_DONTKNOW;
|
LanguageType eType = LANGUAGE_DONTKNOW;
|
||||||
sal_uInt32 nCount = Count();
|
sal_uInt32 nCount = Count();
|
||||||
@@ -187,7 +201,7 @@ LanguageType SvtLanguageTable::GetLanguageType( const OUString& rStr )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
sal_uInt32 SvtLanguageTable::GetEntryCount() const
|
sal_uInt32 SvtLanguageTableImpl::GetEntryCount() const
|
||||||
{
|
{
|
||||||
return Count();
|
return Count();
|
||||||
}
|
}
|
||||||
@@ -199,7 +213,7 @@ sal_uInt32 SvtLanguageTable::GetLanguageEntryCount()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
LanguageType SvtLanguageTable::GetTypeAtIndex( sal_uInt32 nIndex ) const
|
LanguageType SvtLanguageTableImpl::GetTypeAtIndex( sal_uInt32 nIndex ) const
|
||||||
{
|
{
|
||||||
LanguageType nType = LANGUAGE_DONTKNOW;
|
LanguageType nType = LANGUAGE_DONTKNOW;
|
||||||
if (nIndex < Count())
|
if (nIndex < Count())
|
||||||
|
Reference in New Issue
Block a user