From 93a41b20538f18344eb1b8c23b1eae134212b141 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 6 Jun 2017 23:04:49 +0200 Subject: tdf#108349: fix LanguageType conversions from UNO "short" The bugdoc uses LANGUAGE_USER_LATIN_VATICAN LanguageType(0x8076). The UNO API uses signed "short" for these in various interfaces, and so the LanguageType constructor complains about out-of-(short)-range values. Avoid this by deleting the problematic constructor, so that the places that currently call it with API parameters can be changed to first cast the parameter to unsigned. (Yes, we need to write "template<>" twice in a row. Don't ask me why, i just work here. sberg says we also need to omit the explict .) Change-Id: I2443a89bc8d579504fc707ded3d145f9a625597a Reviewed-on: https://gerrit.libreoffice.org/38473 Tested-by: Jenkins Reviewed-by: Michael Stahl --- unotools/source/config/lingucfg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unotools') diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 9dfc019b19ac..d11b9c62fd6f 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -524,7 +524,7 @@ bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const uno::Any { if (nNew != (sal_uInt16)*plVal) { - *plVal = LanguageType(nNew); + *plVal = LanguageType(static_cast(nNew)); bMod = true; } bSucc = true; -- cgit