merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0330-vba-fix-wsfunction-booleanparam.diff
blob733474480c932730d35c399efd902c1348818de7
1 diff --git sc/source/ui/vba/vbawsfunction.cxx sc/source/ui/vba/vbawsfunction.cxx
2 index d0e7ee3..ed3a749 100644
3 --- sc/source/ui/vba/vbawsfunction.cxx
4 +++ sc/source/ui/vba/vbawsfunction.cxx
5 @@ -81,6 +81,16 @@ ScVbaWSFunction::invoke(const rtl::OUString& FunctionName, const uno::Sequence<
6 aArrayTemp[i] = myRange->getCellRange();
7 continue;
9 + else if ( aArray[ i ].getValueType().getTypeClass() == uno::TypeClass_BOOLEAN )
10 + {
11 + sal_Bool bValue( sal_False );
12 + aArray[ i ] >>= bValue;
13 + if ( bValue )
14 + aArrayTemp[ i ] <<= double( 1.0 );
15 + else
16 + aArrayTemp[ i ] <<= double( 0.0 );
18 + }
19 else if ( aArray[ i ].getValueType().getTypeClass() == uno::TypeClass_SEQUENCE )
21 // the sheet.FunctionAccess service doesn't deal with Sequences, only Sequences of Sequence