summaryrefslogtreecommitdiff
path: root/stoc/test
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-01 08:41:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-01 08:41:10 +0200
commite1f3391a749873875e2e65bf9f36d242702b8006 (patch)
tree3b4df0931cb7f1540471e1dafa51a4a18e98eea3 /stoc/test
parent72a11e4544c900f0b83fbdcae11eb247d65e9666 (diff)
Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I14b923990a012e8e85ca9170cdffd6b8e3626d89
Diffstat (limited to 'stoc/test')
-rw-r--r--stoc/test/testconv.cxx14
-rw-r--r--stoc/test/testcorefl.cxx20
-rw-r--r--stoc/test/testiadapter.cxx18
3 files changed, 26 insertions, 26 deletions
diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx
index 3f897294a697..66ecd6473600 100644
--- a/stoc/test/testconv.cxx
+++ b/stoc/test/testconv.cxx
@@ -520,7 +520,7 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks )
// st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa
// ==CHAR==
sal_Unicode c = 'A';
- aVal.setValue( &c, ::getCharCppuType() );
+ aVal.setValue( &c, cppu::UnoType<cppu::UnoCharType>::get() );
pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 );
// st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa
aVal <<= OUString("A");
@@ -541,7 +541,7 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks )
// st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa
sal_Bool bTmp = sal_True;
- aVal.setValue( &bTmp, getBooleanCppuType() );
+ aVal.setValue( &bTmp, cppu::UnoType<bool>::get() );
pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 );
// st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa
// ==ZERO STRINGS==
@@ -626,13 +626,13 @@ static void test_Conversion( const Reference< XMultiServiceFactory > & xMgr )
convertTo( cppu::UnoType<cppu::UnoUnsignedShortType>::get(), rVal, rBlock._toUINT16 );
convertTo( cppu::UnoType<sal_Int16>::get(), rVal, rBlock._toINT16 );
convertTo( cppu::UnoType<sal_Int8>::get(), rVal, rBlock._toBYTE );
- convertTo( ::getBooleanCppuType(), rVal, rBlock._toBOOL );
- convertTo( ::getCharCppuType(), rVal, rBlock._toChar );
+ convertTo( cppu::UnoType<bool>::get(), rVal, rBlock._toBOOL );
+ convertTo( cppu::UnoType<cppu::UnoCharType>::get(), rVal, rBlock._toChar );
convertTo( cppu::UnoType<TypeClass>::get(), rVal, rBlock._toTypeClass );
- convertTo( ::getCppuType( (const Sequence< sal_Int16 > *)0 ), rVal, rBlock._toSeqINT16 );
- convertTo( ::getCppuType( (const Sequence< Any > *)0 ), rVal, rBlock._toSeqAny );
+ convertTo( cppu::UnoType<Sequence< sal_Int16 >>::get(), rVal, rBlock._toSeqINT16 );
+ convertTo( cppu::UnoType<Sequence< Any >>::get(), rVal, rBlock._toSeqAny );
- convertTo( ::getVoidCppuType(), rVal, sal_True ); // anything converts to void
+ convertTo( cppu::UnoType<cppu::UnoVoidType>::get(), rVal, sal_True ); // anything converts to void
}
s_xConverter.clear();
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx
index e5d8b01a0c68..aa3719abbc85 100644
--- a/stoc/test/testcorefl.cxx
+++ b/stoc/test/testcorefl.cxx
@@ -203,15 +203,15 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
xRefl->forName("ModuleA.StructC")->getField(OUString("aInterfaceSeq"))->getType()->createObject(aAny);
- OSL_ENSURE(aAny.getValueType() == ::getCppuType( (const Sequence<Reference< XInterface > > *)0 ), "test_RegCoreReflection(): error 51a");
+ OSL_ENSURE(aAny.getValueType() == cppu::UnoType<Sequence<Reference< XInterface > >>::get(), "test_RegCoreReflection(): error 51a");
- Any aStructAny(&aStructC, ::getCppuType( (const StructC *) 0 ));
+ Any aStructAny(&aStructC, cppu::UnoType<StructC>::get());
sal_Int32 nLong = aConstLong * 2;
aAny.setValue( &nLong, cppu::UnoType<sal_Int32>::get());
OSL_ENSURE(*(sal_Int32*)xRefl->forName("ModuleA.StructA")->getField(OUString( "aLong" ))->get(
- Any(&aStructC, ::getCppuType( (const StructC *)0 ))).getValue() == aConstLong, "test_RegCoreReflection(): error 52");
+ Any(&aStructC, cppu::UnoType<StructC>::get())).getValue() == aConstLong, "test_RegCoreReflection(): error 52");
OSL_ENSURE(xRefl->forName("ModuleA.StructA")->getField(OUString( "aLong" ))->getAccessMode() == FieldAccessMode_READWRITE, "test_RegCoreReflection(): error 52a");
Reference< XIdlField2 > rField ( xRefl->forName("ModuleA.StructC")->getField(OUString( "aLong" )) , UNO_QUERY );
rField->set(aStructAny, aAny);
@@ -297,8 +297,8 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
{
Sequence< Any > params(2);
- params.getArray()[0].setValue(&aStructC, ::getCppuType( (const StructC *)0 ));
- params.getArray()[1].setValue(&aStructC, ::getCppuType( (const StructC *)0 ));
+ params.getArray()[0].setValue(&aStructC, cppu::UnoType<StructC>::get());
+ params.getArray()[1].setValue(&aStructC, cppu::UnoType<StructC>::get());
Any a;
a <<= xAI;
@@ -308,8 +308,8 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
{
Sequence< Any > params(2);
- params.getArray()[0].setValue(&aStructA, ::getCppuType( (const StructA *)0 ));
- params.getArray()[1].setValue(&aStructA, ::getCppuType( (const StructA *)0 ));
+ params.getArray()[0].setValue(&aStructA, cppu::UnoType<StructA>::get());
+ params.getArray()[1].setValue(&aStructA, cppu::UnoType<StructA>::get());
Any a;
a <<= xAI;
@@ -323,13 +323,13 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Sequence< Any > params(2);
- params.getArray()[0].setValue(&aStructC, ::getCppuType( (const StructC *)0 ));
- params.getArray()[1].setValue(&aStructA, ::getCppuType( (const StructA *)0 ));
+ params.getArray()[0].setValue(&aStructC, cppu::UnoType<StructC>::get());
+ params.getArray()[1].setValue(&aStructA, cppu::UnoType<StructA>::get());
Any a;
a <<= xAI;
bool result = (xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params).getValueType()
- == ::getCppuType( (const Sequence<StructB> *)0 )); (void)result;
+ == cppu::UnoType<Sequence<StructB>>::get()); (void)result;
OSL_ENSURE(result, "test_RegCoreReflection(): error 68");
return sal_True;
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index 097597f927e2..5099f886aa75 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -406,8 +406,8 @@ Any XLB_Invocation::invoke( const OUString & rFunctionName,
rOutParamIndex[16] = 16;
rOutParam.realloc( 17 );
- rOutParam[0].setValue( &aBool, ::getCppuBooleanType() );
- rOutParam[1].setValue( &aChar, ::getCppuCharType() );
+ rOutParam[0].setValue( &aBool, cppu::UnoType<bool>::get() );
+ rOutParam[1].setValue( &aChar, cppu::UnoType<cppu::UnoCharType>::get() );
rOutParam[2] <<= nByte;
rOutParam[3] <<= nShort;
rOutParam[4] <<= nUShort;
@@ -450,8 +450,8 @@ Any XLB_Invocation::invoke( const OUString & rFunctionName,
rOutParamIndex[16] = 16;
rOutParam.realloc( 17 );
- rOutParam[0].setValue( &aBool, ::getCppuBooleanType() );
- rOutParam[1].setValue( &aChar, ::getCppuCharType() );
+ rOutParam[0].setValue( &aBool, cppu::UnoType<bool>::get() );
+ rOutParam[1].setValue( &aChar, cppu::UnoType<cppu::UnoCharType>::get() );
rOutParam[2] <<= nByte;
rOutParam[3] <<= nShort;
rOutParam[4] <<= nUShort;
@@ -494,8 +494,8 @@ Any XLB_Invocation::invoke( const OUString & rFunctionName,
rOutParamIndex[16] = 16;
rOutParam.realloc( 17 );
- rOutParam[0].setValue( &aBool, ::getCppuBooleanType() );
- rOutParam[1].setValue( &aChar, ::getCppuCharType() );
+ rOutParam[0].setValue( &aBool, cppu::UnoType<bool>::get() );
+ rOutParam[1].setValue( &aChar, cppu::UnoType<cppu::UnoCharType>::get() );
rOutParam[2] <<= nByte;
rOutParam[3] <<= nShort;
rOutParam[4] <<= nUShort;
@@ -588,14 +588,14 @@ Any XLB_Invocation::getValue( const OUString & rName )
if ( rName == "Bool" )
{
sal_Bool aBool = _xLBT->getBool();
- aRet.setValue( &aBool, ::getCppuBooleanType() );
+ aRet.setValue( &aBool, cppu::UnoType<bool>::get() );
}
else if ( rName == "Byte" )
aRet <<= _xLBT->getByte();
else if ( rName == "Char" )
{
sal_Unicode aChar = _xLBT->getChar();
- aRet.setValue( &aChar, ::getCppuCharType() );
+ aRet.setValue( &aChar, cppu::UnoType<cppu::UnoCharType>::get() );
}
else if ( rName == "Short" )
aRet <<= _xLBT->getShort();
@@ -986,7 +986,7 @@ static sal_Bool test_invocation( const Reference< XMultiServiceFactory > & xMgr
xMgr->createInstance("com.sun.star.script.Invocation"), UNO_QUERY );
Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() );
- Any aOriginal( &xOriginal, ::getCppuType( &xOriginal ) );
+ Any aOriginal( &xOriginal, cppu::UnoType<decltype(xOriginal)>::get() );
Reference< XInvocation > xInvok(
xInvocFac->createInstanceWithArguments( Sequence< Any >( &aOriginal, 1 ) ), UNO_QUERY );