we don't even need an instance of SvtLanguageTable at SvxLanguageBox

Change-Id: I7ccefc73d7f6e5b7c41d6819ae13116af9d5b5ef
This commit is contained in:
Eike Rathke
2014-04-18 01:03:55 +02:00
parent 2580b5dd87
commit 7531f838c8
2 changed files with 4 additions and 7 deletions

View File

@@ -57,7 +57,6 @@ private:
Image m_aCheckedImage;
OUString m_aAllString;
com::sun::star::uno::Sequence< sal_Int16 > *m_pSpellUsedLang;
SvtLanguageTable* m_pLangTable;
sal_Int16 m_nLangList;
bool m_bHasLangNone;
bool m_bLangNoneIsLangAll;

View File

@@ -143,7 +143,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxLanguageBox(Window *pPar
void SvxLanguageBox::Init()
{
m_pLangTable = new SvtLanguageTable;
m_aNotCheckedImage = Image( SVX_RES( RID_SVXIMG_NOTCHECKED ) );
m_aCheckedImage = Image( SVX_RES( RID_SVXIMG_CHECKED ) );
m_aAllString = SVX_RESSTR( RID_SVXSTR_LANGUAGE_ALL );
@@ -180,7 +179,6 @@ void SvxLanguageBox::Init()
SvxLanguageBox::~SvxLanguageBox()
{
delete m_pSpellUsedLang;
delete m_pLangTable;
}
@@ -340,7 +338,7 @@ sal_Int32 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal_
return nAt;
}
OUString aStrEntry = m_pLangTable->GetString( nLang );
OUString aStrEntry = SvtLanguageTable::GetLanguageString( nLang );
if (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll)
aStrEntry = m_aAllString;
@@ -349,11 +347,11 @@ sal_Int32 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal_
{
nRealLang = MsLangId::resolveSystemLanguageByScriptType(nRealLang, nType);
aStrEntry += " - ";
aStrEntry += m_pLangTable->GetString( nRealLang );
aStrEntry += SvtLanguageTable::GetLanguageString( nRealLang );
} else if (nRealLang == LANGUAGE_USER_SYSTEM_CONFIG) {
nRealLang = MsLangId::getSystemLanguage();
aStrEntry += " - ";
aStrEntry += m_pLangTable->GetString( nRealLang );
aStrEntry += SvtLanguageTable::GetLanguageString( nRealLang );
}
aStrEntry = ApplyLreOrRleEmbedding( aStrEntry );
@@ -411,7 +409,7 @@ sal_Int32 SvxLanguageBox::InsertLanguage( const LanguageType nLangType,
return nAt;
}
OUString aStrEntry = m_pLangTable->GetString( nLang );
OUString aStrEntry = SvtLanguageTable::GetLanguageString( nLang );
if (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll)
aStrEntry = m_aAllString;