summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/drwtxtex.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-07-13 02:54:05 +0200
committerEike Rathke <erack@redhat.com>2013-07-13 11:55:16 +0200
commit358d1a99484bcc02900bd200a7606a7bf3298cac (patch)
tree031f808141dbc712553b8a4a029a354a2699a622 /sw/source/ui/shells/drwtxtex.cxx
parent5d1a8e0d47b6d6e9e3e5735d0ee52fa0b4782202 (diff)
use static LanguageTag::convertTo...() for standalone conversions
If no LanguageTag instance is at hand use the static methods to convert between BCP 47 string, Locale and MS-LangID instead of creating temporary instances. Change-Id: I9597f768078eb81c840e84a5db5617f26bb7dc09
Diffstat (limited to 'sw/source/ui/shells/drwtxtex.cxx')
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index b533ea1b5fa4..547ba2e2f1fb 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -604,7 +604,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
// disable "Thesaurus" context menu entry if there is nothing to look up
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
if (!bIsLookUpWord ||
- !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( LanguageTag( nLang ).getLocale() ))
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( LanguageTag::convertToLocale( nLang ) ))
rSet.DisableItem( SID_THES );
//! avoid putting the same item as SfxBoolItem at the end of this function
@@ -714,7 +714,7 @@ ASK_ESCAPE:
LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
- if (!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( LanguageTag( nLang ).getLocale() ))
+ if (!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( LanguageTag::convertToLocale( nLang ) ))
rSet.DisableItem( SID_THESAURUS );
nSlotId = 0;
}