diff options
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 3 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 3 | ||||
-rw-r--r-- | stoc/source/typeconv/convert.cxx | 8 | ||||
-rw-r--r-- | testtools/source/bridgetest/bridgetest.cxx | 2 | ||||
-rw-r--r-- | testtools/source/bridgetest/cppobj.cxx | 5 |
5 files changed, 9 insertions, 12 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 4d8bc81628d5..8154782def68 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -1418,8 +1418,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper } case TypeClass_CHAR: { - sal_Unicode c = pVar->GetChar(); - aRetVal.setValue( &c , cppu::UnoType<cppu::UnoCharType>::get() ); + aRetVal <<= pVar->GetChar(); break; } case TypeClass_STRING: aRetVal <<= pVar->GetOUString(); break; diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 468d21f5b57d..7d7cfebc15c2 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -810,8 +810,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con } else if( PyObject_IsInstance( o, getCharClass( runtime ).get() ) ) { - sal_Unicode c = PyChar2Unicode( o ); - a.setValue( &c, cppu::UnoType<cppu::UnoCharType>::get()); + a <<= PyChar2Unicode( o ); } else if( PyObject_IsInstance( o, getAnyClass( runtime ).get() ) ) { diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index e7795c5fc66a..2a6cc736a557 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -761,14 +761,14 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina { if (aSourceClass==TypeClass_STRING) { - if ((*static_cast<const OUString *>(rVal.getValue())).getLength() == 1) // single char - aRet.setValue( (*static_cast<const OUString *>(rVal.getValue())).getStr(), cppu::UnoType<cppu::UnoCharType>::get() ); + auto const s = static_cast<const OUString *>(rVal.getValue()); + if (s->getLength() == 1) // single char + aRet <<= (*s)[0]; } else if (aSourceClass!=TypeClass_ENUM && // exclude enums, chars aSourceClass!=TypeClass_CHAR) { - sal_Unicode cRet = (sal_Unicode)toHyper( rVal, 0, 0xffff ); // range - aRet.setValue( &cRet, cppu::UnoType<cppu::UnoCharType>::get() ); + aRet <<= sal_Unicode(toHyper( rVal, 0, 0xffff )); // range } break; } diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index b4261947049c..207e1e398c3b 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -275,7 +275,7 @@ static bool performAnyTest( const Reference< XBridgeTest > &xLBT, const TestData } { - a.setValue( &(data.Char) , cppu::UnoType<cppu::UnoCharType>::get() ); + a <<= data.Char; OSL_ASSERT( xLBT->transportAny( a ) == a ); } diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index a5ca8bc61c21..8101f1efe11b 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -1003,8 +1003,7 @@ void Test_Impl::testConstructorsService( args[7] <<= SAL_MAX_UINT64; args[8] <<= 0.123f; args[9] <<= 0.456; - sal_Unicode arg10c = 'X'; - args[10].setValue(&arg10c, UnoType< UnoCharType >::get()); + args[10] <<= sal_Unicode('X'); args[11] <<= OUString("test"); args[12] <<= UnoType< Any >::get(); args[13] <<= true; @@ -1018,7 +1017,7 @@ void Test_Impl::testConstructorsService( args[21] <<= arg21; args[22] <<= arg22; args[23] <<= arg23; - args[24].setValue(&arg24, UnoType< UnoSequenceType< UnoCharType > >::get()); + args[24] <<= arg24; args[25] <<= arg25; args[26] <<= arg26; args[27] <<= arg27; |