summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/SpellDialog.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-24 18:54:09 +0100
committerEike Rathke <erack@redhat.com>2012-11-24 18:56:43 +0100
commit41956321ceefb5836feb2c119b66de7bb557740f (patch)
treee756d740615881ceeea816e7ef15096f91d7cc1e /cui/source/dialogs/SpellDialog.cxx
parent6395c843710b59e391f10f3532442ae11fe64357 (diff)
get rid of Svx...Locale...() double conversion nonsense
Change-Id: I21d14ff6087d1adb0ce769f2e8f8060a005250cc
Diffstat (limited to 'cui/source/dialogs/SpellDialog.cxx')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index b5ba38030d2e..b110231999bb 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -341,7 +341,7 @@ void SpellDialog::UpdateBoxes_Impl()
bool bIsGrammarError = false;
if( pSpellErrorDescription )
{
- nAltLanguage = SvxLocaleToLanguage( pSpellErrorDescription->aLocale );
+ nAltLanguage = LanguageTag( pSpellErrorDescription->aLocale ).getLanguageType();
aNewWords = pSpellErrorDescription->aSuggestions;
bIsGrammarError = pSpellErrorDescription->bIsGrammarError;
aExplainLink.SetURL( pSpellErrorDescription->sExplanationURL );
@@ -985,7 +985,7 @@ int SpellDialog::InitUserDicts()
continue;
uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY );
- LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() );
+ LanguageType nActLanguage = LanguageTag( xDicTmp->getLocale() ).getLanguageType();
if( xDicTmp->isActive()
&& xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE
&& (nLang == nActLanguage || LANGUAGE_NONE == nActLanguage )
@@ -1266,7 +1266,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
uno::Reference< lang::XServiceInfo > xInfo( aStart->xGrammarChecker, uno::UNO_QUERY );
SpellErrorDescription aDesc( true,
aStart->sText,
- SvxCreateLocale( aStart->eLanguage ),
+ LanguageTag( aStart->eLanguage ).getLocale(),
aStart->aGrammarError.aSuggestions,
aStart->xGrammarChecker,
xInfo->getImplementationName(),
@@ -1732,7 +1732,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError )
String sReplacement(getDotReplacementString(GetErrorText(), xEntry->getReplacementText()));
- ChangeMarkedWord(sReplacement, SvxLocaleToLanguage( pSpellErrorDescription->aLocale ));
+ ChangeMarkedWord(sReplacement, LanguageTag( pSpellErrorDescription->aLocale ).getLanguageType());
aCursor.GetIndex() = aCursor.GetIndex() + (sal_uInt16)(xEntry->getReplacementText().getLength());
}
@@ -1754,7 +1754,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError )
const SpellErrorAttrib* pOldAttrib = static_cast<const SpellErrorAttrib*>(
pTextEngine->FindAttrib( TextPaM(0, nOldErrorStart), TEXTATTR_SPELL_ERROR ));
pAction->SetErrorLanguageSelected(pOldAttrib && pOldAttrib->GetErrorDescription().aSuggestions.getLength() &&
- SvxLocaleToLanguage( pOldAttrib->GetErrorDescription().aLocale) ==
+ LanguageTag( pOldAttrib->GetErrorDescription().aLocale).getLanguageType() ==
GetSpellDialog()->aLanguageLB.GetSelectLanguage());
AddUndoAction(pAction);
}
@@ -1871,7 +1871,7 @@ void SentenceEditWindow_Impl::RestoreCurrentError()
{
const SpellErrorDescription& rDesc = pAttrib->GetErrorDescription();
if( !rDesc.sErrorText.equals( GetErrorText() ) )
- ChangeMarkedWord(rDesc.sErrorText, SvxLocaleToLanguage( rDesc.aLocale ));
+ ChangeMarkedWord(rDesc.sErrorText, LanguageTag( rDesc.aLocale ).getLanguageType());
}
}