summaryrefslogtreecommitdiff
path: root/sd
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 /sd
parent6395c843710b59e391f10f3532442ae11fe64357 (diff)
get rid of Svx...Locale...() double conversion nonsense
Change-Id: I21d14ff6087d1adb0ce769f2e8f8060a005250cc
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx6
-rw-r--r--sd/source/ui/view/drtxtob.cxx3
-rw-r--r--sd/source/ui/view/drviews7.cxx5
-rw-r--r--sd/source/ui/view/outlnvsh.cxx5
4 files changed, 5 insertions, 14 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 28c6b1297189..7175fbf14420 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1213,7 +1213,7 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam
if(!(aValue >>= aLocale))
throw lang::IllegalArgumentException();
- mpDoc->SetLanguage( SvxLocaleToLanguage(aLocale), EE_CHAR_LANGUAGE );
+ mpDoc->SetLanguage( LanguageTag(aLocale).getLanguageType(), EE_CHAR_LANGUAGE );
break;
}
case WID_MODEL_TABSTOP:
@@ -1285,9 +1285,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
case WID_MODEL_LANGUAGE:
{
LanguageType eLang = mpDoc->GetLanguage( EE_CHAR_LANGUAGE );
- lang::Locale aLocale;
- SvxLanguageToLocale( aLocale, eLang );
- aAny <<= aLocale;
+ aAny <<= LanguageTag( eLang).getLocale();
break;
}
case WID_MODEL_TABSTOP:
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index e124fcc735e5..0ec0d9935896 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -382,10 +382,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
// disable "Thesaurus" context menu entry if there is nothing to look up
- lang::Locale aLocale( SvxCreateLocale( nLang ) );
uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() );
if (!bIsLookUpWord ||
- !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( LanguageTag( nLang). getLocale() ))
rSet.DisableItem( SID_THES );
}
else
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 530b1c5acfe9..af1eb659c1cf 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -571,11 +571,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
LanguageType eLang = GetDoc()->GetLanguage( EE_CHAR_LANGUAGE );
Reference< XThesaurus > xThesaurus( LinguMgr::GetThesaurus() );
- Locale aLocale;
- SvxLanguageToLocale( aLocale, eLang );
-
- if (!xThesaurus.is() || eLang == LANGUAGE_NONE || !xThesaurus->hasLocale(aLocale) )
+ if (!xThesaurus.is() || eLang == LANGUAGE_NONE || !xThesaurus->hasLocale( LanguageTag( eLang).getLocale()) )
rSet.DisableItem( SID_THESAURUS );
}
}
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 2b93ed6213b9..1497ad8becd7 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1105,11 +1105,8 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
{
LanguageType eLang = GetDoc()->GetLanguage( EE_CHAR_LANGUAGE );
Reference< XThesaurus > xThesaurus( LinguMgr::GetThesaurus() );
- Locale aLocale;
- SvxLanguageToLocale( aLocale, eLang );
-
- if (!xThesaurus.is() || eLang == LANGUAGE_NONE || !xThesaurus->hasLocale(aLocale))
+ if (!xThesaurus.is() || eLang == LANGUAGE_NONE || !xThesaurus->hasLocale( LanguageTag( eLang).getLocale()))
rSet.DisableItem( SID_THESAURUS );
}
}