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 <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 32edd32..f5606ff 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;