sc/source/ui/vba/vbaformat.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit ea7df4a802dfe363a6d7d088d9937a22c59dede3 Author: Tamas Bunth <tamas.bu...@collabora.co.uk> Date: Wed Jun 28 14:46:03 2017 +0200 oovbaapi: cast ReadingOrder value to sal_Int16 Instead of ENUM type. Otherwise there is an IllegalArgumentException. Change-Id: I70dd71dabaf3154b3a591712b57f96ebe7b5debd Reviewed-on: https://gerrit.libreoffice.org/39357 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tamás Bunth <btom...@gmail.com> diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index cbd390032938..06ae463b8219 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -660,17 +660,20 @@ ScVbaFormat< Ifc... >::setReadingOrder( const uno::Any& ReadingOrder ) sal_Int32 nReadingOrder = 0; if ( !(ReadingOrder >>= nReadingOrder )) throw uno::RuntimeException(); - uno::Any aVal; + uno::Any aVal = aNULL(); switch(nReadingOrder) { case excel::Constants::xlLTR: - aVal <<= text::WritingMode_LR_TB; + aVal <<= (sal_Int16) text::WritingMode_LR_TB; break; case excel::Constants::xlRTL: - aVal <<= text::WritingMode_RL_TB; + aVal <<= (sal_Int16) text::WritingMode_RL_TB; break; case excel::Constants::xlContext: - DebugHelper::basicexception(ERRCODE_BASIC_NOT_IMPLEMENTED, OUString()); + // TODO implement xlContext + // Reading order has to depend on the language of the first letter + // written. + aVal <<= (sal_Int16) text::WritingMode_LR_TB; break; default: DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString());
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits