summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-04-17 21:35:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-26 08:50:54 +0200
commitc70d49c7c888da8cfd73db8585e7be1f37fc398a (patch)
treec0e540401850018464ca76300536faf9aa7e27d2 /shell
parentcd4344d3bdef631b3e64ac12a9e64bc9670c1b7c (diff)
use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index 079f0558194b..49edc07ad92c 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -289,7 +289,7 @@ void add_group_entries(
aConfig.SetGroup(GroupName);
size_t key_count = aConfig.GetKeyCount();
- std::map< unsigned short , std::string > map;
+ std::map< LanguageType, std::string > map;
for (size_t i = 0; i < key_count; i++)
{
@@ -297,7 +297,7 @@ void add_group_entries(
OString key_value_utf8 = aConfig.ReadKey(sal::static_int_cast<sal_uInt16>(i));
iso_lang_identifier myiso_lang( iso_lang );
LanguageType ltype = LanguageTag( myiso_lang.make_OUString()).makeFallback().getLanguageType();
- if( ( ltype & 0x0200 ) == 0 && map[ ltype ].empty() )
+ if( ( (sal_uInt16)ltype & 0x0200 ) == 0 && map[ ltype ].empty() )
{
Substitutor.set_language(iso_lang_identifier(iso_lang));
@@ -308,13 +308,13 @@ void add_group_entries(
Substitutor.add_substitution(
GroupName.getStr(), make_winrc_unicode_string(key_value_utf16));
- map[ static_cast<unsigned short>(ltype) ] = std::string( iso_lang.getStr() );
+ map[ ltype ] = std::string( iso_lang.getStr() );
}
else
{
if( !map[ ltype ].empty() )
{
- printf("ERROR: Duplicated ms id %d found for the languages %s and %s !!!! This does not work in microsoft resources\nPlease remove one!\n", ltype , map[ ltype ].c_str() , iso_lang.getStr());
+ printf("ERROR: Duplicated ms id %d found for the languages %s and %s !!!! This does not work in microsoft resources\nPlease remove one!\n", (sal_uInt16)ltype , map[ ltype ].c_str() , iso_lang.getStr());
exit( -1 );
}
}