From c113aded3e7f333e44c0cde1c3e4f4194fc407fa Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 10 Apr 2017 12:07:11 +0200 Subject: tdf#107029 xmlscript: fix enum conversion Regression from commit 0fe6f1a196b70f0ba4c948389b2ef9b1e77187b8 (use actual UNO enums in vcl..xmlsecurity, 2017-04-03), it's important when changing a sal_Int16 to an enum, then arguments of makeAny() calls of that variable are explicitly casted the previous type to keep compatibility. Change-Id: Ib55eeded34033ce536078919c6fad4d571951cd3 Reviewed-on: https://gerrit.libreoffice.org/36358 Reviewed-by: Miklos Vajna Tested-by: Jenkins Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index 32edd32ea4cf..f5606ffe2d90 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -1092,7 +1092,7 @@ bool ImportContext::importButtonTypeProperty( throw xml::sax::SAXException( "invalid button-type value!", Reference< XInterface >(), Any() ); } - _xControlModel->setPropertyValue( rPropName, makeAny( nButtonType ) ); + _xControlModel->setPropertyValue( rPropName, makeAny( (sal_Int16)nButtonType ) ); return true; } return false; -- cgit v1.2.3