diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-04 11:59:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-04 11:59:23 +0200 |
commit | 6e70103da07ec67b1c1f106a8fcd064e3df97271 (patch) | |
tree | 091834cdeb1358b9b3b0c3416f8672cc7cfb26d0 /stoc | |
parent | 019a0fbdd860994ba727f19eba0879136406d0f9 (diff) |
While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base
Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/typeconv/convert.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index b7ec72cba391..1c864f0864d1 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -729,8 +729,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina { default: { - sal_Bool bTmp = (toDouble( rVal ) != 0.0); - aRet.setValue( &bTmp, cppu::UnoType<bool>::get() ); + aRet <<= (toDouble( rVal ) != 0.0); } case TypeClass_ENUM: // exclude enums break; @@ -740,13 +739,11 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina const OUString & aStr = *static_cast<const OUString *>(rVal.getValue()); if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( "false" )) { - sal_Bool bFalse = false; - aRet.setValue( &bFalse, cppu::UnoType<bool>::get() ); + aRet <<= false; } else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( "true" )) { - sal_Bool bTrue = true; - aRet.setValue( &bTrue, cppu::UnoType<bool>::get() ); + aRet <<= true; } else { |