Kaydet (Commit) ea7df4a8 authored tarafından Tamas Bunth's avatar Tamas Bunth Kaydeden (comit) Tamás Bunth

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/39357Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTamás Bunth <btomi96@gmail.com>
üst 2f609759
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment