summaryrefslogtreecommitdiffstats
path: root/sd/source/ui/view
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/source/ui/view
parentGerman comment translations (diff)
downloadcore-41956321ceefb5836feb2c119b66de7bb557740f.tar.gz
core-41956321ceefb5836feb2c119b66de7bb557740f.zip
get rid of Svx...Locale...() double conversion nonsense
Change-Id: I21d14ff6087d1adb0ce769f2e8f8060a005250cc
Diffstat (limited to 'sd/source/ui/view')
-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
3 files changed, 3 insertions, 10 deletions
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 );
}
}