diff options
Diffstat (limited to 'extensions/test/ole/OleClient/clientTest.cxx')
-rw-r--r-- | extensions/test/ole/OleClient/clientTest.cxx | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/extensions/test/ole/OleClient/clientTest.cxx b/extensions/test/ole/OleClient/clientTest.cxx index 684644e47cec..4a79eead82df 100644 --- a/extensions/test/ole/OleClient/clientTest.cxx +++ b/extensions/test/ole/OleClient/clientTest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -92,7 +92,7 @@ extern "C" int __cdecl main( int , char **) return -1; } - + _Module.Init( ObjectMap, GetModuleHandle( NULL)); if( FAILED(hr=doTest())) @@ -152,17 +152,17 @@ bool doParameterTest(const Reference<XInvocation> & inv) Sequence<Any> seqNamed5(arArgs, 1); arArgs[0] <<= arg2; Sequence<Any> seqNamed6(arArgs, 1); - + arArgs[0] <<= (sal_Int32) 123; arArgs[1] <<= (sal_Int32) 456; Sequence<Any> seqPositional(arArgs, 2); arArgs[0] <<= (sal_Int32) 123; Sequence<Any> seqPositional2(arArgs, 1); - + arArgs[0] <<= Any(); arArgs[1] <<= Any(); Sequence<Any> seqPositional3(arArgs, 2); - + arArgs[0] <<= (sal_Int32) 123; arArgs[1] <<= SCode(DISP_E_PARAMNOTFOUND); Sequence<Any> seqOutOpt1(arArgs, 2); @@ -180,7 +180,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) arArgs1[2] <<= (sal_Int32) 0; arArgs1[3] <<= (sal_Int32) 0; Sequence<Any> seqMix0(arArgs1, 4); - + arArgs1[0] <<= (sal_Int32) 123; arArgs1[1] <<= (sal_Int32) 456; arArgs1[2] <<= arg3; @@ -215,7 +215,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional5"), seqPositional, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqPositional)) return false; - + //2 optional args, 1 provided seqIndices.realloc(0); seqOut.realloc(0); @@ -241,7 +241,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional5"), seqPositional3, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqOutOpt2)) return false; - + //named args -------------------------------------------- // 2 named args, correct position @@ -289,7 +289,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional5"), seqNamed4, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqNamed2 )) return false; - + //2 args, 1 provided (correct order) seqIndices.realloc(0); @@ -351,8 +351,8 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional7"), seqMix2Out, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqMix2Out)) return false; - - + + return true; } bool doPropertyTest(const Reference<XInvocation> & inv) @@ -379,7 +379,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) Any inrefDecimal, outrefDecimal; Any inParamsLong, outParamsLong; Reference<XInterface> xintUnknown(getComObject(L"AxTestComponents.Foo")); - + inBool <<= (sal_Bool) sal_True; inv->setValue(OUString(L"prpBool"), inBool); outBool = inv->getValue(OUString(L"prpBool")); @@ -393,7 +393,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) outShort = inv->getValue(OUString(L"prpShort")); inLong <<= ( sal_Int32) 1234567; - inv->setValue(OUString(L"prpLong"), inLong // TODO: Add your implementation code here + inv->setValue(OUString(L"prpLong"), inLong // TODO: Add your implementation code here ); outLong = inv->getValue(OUString(L"prpLong")); @@ -420,7 +420,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) inUnknown <<= xintUnknown; inv->setValue(OUString(L"prpUnknown"), inUnknown); outUnknown = inv->getValue(OUString(L"prpUnknown")); - + Currency cur(99999); inCY <<= cur; inv->setValue(OUString(L"prpCurrency"), inCY); @@ -444,7 +444,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) inrefLong <<= (sal_Int32) 123456; inv->setValue(OUString(L"prprefLong"), inrefLong); outrefLong = inv->getValue(OUString(L"prprefLong")); - + inrefVariant <<= OUString(L"A string in an any"); inv->setValue(OUString(L"prprefVariant"), inrefVariant); outrefVariant = inv->getValue(OUString(L"prprefVariant")); @@ -456,7 +456,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) if (inBool != outBool || inByte != outByte || inShort != outShort || inLong != outLong || inFloat != outFloat || inDouble != outDouble || inString != outString - || inVariant != outVariant || inObject != outObject + || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown || inCY != outCY || inDate != outDate || inDecimal != outDecimal || inSCode != outSCode || inrefLong != outrefLong ||inrefVariant != outrefVariant @@ -486,7 +486,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) Sequence<Any> seqMultiArgPut2(arMultiArgs, 2); arMultiArgs[0] <<= NamedArgument(OUString(L"val2"), makeAny((sal_Int32) 1)); - arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 3)); + arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 3)); Sequence<Any> seqMultiArgPut3(arMultiArgs, 2); arMultiArgs[0] <<= NamedArgument(OUString(L"val2"), makeAny((sal_Int32) 1)); @@ -501,12 +501,12 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) arMultiArgs[1] <<= makeAny((sal_Int32) 2); Sequence<Any> seqMultiArgGet1(arMultiArgs, 2); Sequence<Any> seqMultiArgGet2(arMultiArgs, 1); - + arMultiArgs[0] <<= makeAny((sal_Int32) 0); arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 0)); Sequence<Any> seqMultiArgPut5(arMultiArgs, 2); - + arMultiArgs[0] <<= makeAny((sal_Int32) 1); arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 2)); Sequence<Any> seqMultiArgPut6(arMultiArgs, 2); @@ -518,7 +518,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) arMultiArgs[0] = makeAny((sal_Int32) 0); arMultiArgs[1] = makeAny((sal_Int32) 0); Sequence<Any> seqMultiVoid2(arMultiArgs, 2); - + //[propput, ...] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [in] VARIANT* newVal); //[propget, ...] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [out, optional, retval] VARIANT* pVal); seqIndices.realloc( 0); @@ -552,7 +552,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) arMultiArgs[0] = makeAny((sal_Int32) 1); arMultiArgs[1] = makeAny((SCode(DISP_E_PARAMNOTFOUND))); - + if (anyRet != ((PropertyPutArgument const *) seqMultiArgPut2[1].getValue())->Value || ! checkOutArgs(seqOut, seqIndices, Sequence<Any>(arMultiArgs, 2))) { @@ -617,7 +617,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) if ( anyRet != ((PropertyPutArgument const*) seqMultiArgPut6[1].getValue())->Value || !checkOutArgs(seqOut, seqIndices, seqMultiArgGet2)) return false; - + //hasProperty, hasMethod if (inv->hasProperty(OUSTR("prpMultiArg1"))) @@ -631,7 +631,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) if ( ! inv->hasMethod(OUSTR("inLong"))) return false; - return true; + return true; } bool doSimpleTest(const Reference<XInvocation> & inv) { @@ -656,9 +656,9 @@ bool doSimpleTest(const Reference<XInvocation> & inv) Any inrefVariant, outrefVariant; Any inrefDecimal, outrefDecimal; - Reference<XInterface> xIntFoo(getComObject(L"AxTestComponents.Foo")); + Reference<XInterface> xIntFoo(getComObject(L"AxTestComponents.Foo")); //################################################################################### - // in and out parameter + // in and out parameter //################################################################################### sal_Bool aBool = sal_True; inBool.setValue(&aBool, getCppuBooleanType()); @@ -746,7 +746,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"outDate"), Sequence< Any > (& outDate, 1), seqIndices, seqOut); outDate <<= seqOut[0]; - + Decimal dec(3, 0, 0xffffffff, 0xffffffff, 0xfffffff0); inDecimal <<= dec; inv->invoke(OUString(L"inDecimal"), Sequence<Any>( & inDecimal, 1), seqIndices, seqOut); @@ -765,12 +765,12 @@ bool doSimpleTest(const Reference<XInvocation> & inv) if (inBool != outBool || inByte != outByte || inShort != outShort || inLong != outLong || inFloat != outFloat || inDouble != outDouble || inString != outString - || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown + || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown || inCY != outCY || inDate != outDate || inDecimal != outDecimal || inSCode != outSCode) return false; //################################################################################### - // in/out parameter + // in/out parameter //################################################################################### outBool = Any(); seqIndices.realloc( 0); @@ -783,7 +783,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"inoutByte"), Sequence< Any > ( & inByte, 1), seqIndices, seqOut); outByte <<= seqOut[0]; - + outShort = Any(); seqIndices.realloc( 0); seqOut.realloc(0); @@ -801,7 +801,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"inoutString"), Sequence< Any > ( & inString, 1), seqIndices, seqOut); outString <<= seqOut[0]; - + outFloat = Any(); seqIndices.realloc( 0); seqOut.realloc(0); @@ -837,7 +837,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"inoutDate"), Sequence< Any > ( & inDate, 1), seqIndices, seqOut); outDate <<= seqOut[0]; - + outDecimal = Any(); seqIndices.realloc( 0); seqOut.realloc(0); @@ -857,7 +857,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) return false; //################################################################################### - // in byref parameters + // in byref parameters //################################################################################### inrefLong <<= (sal_Int32) 1234; @@ -866,7 +866,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"outLong"), Sequence< Any > (& outrefLong, 1), seqIndices, seqOut); outrefLong <<= seqOut[0]; - + inrefVariant <<= OUString(L" A string in an any"); inv->invoke(OUString(L"inrefVariant"), Sequence< Any > ( & inrefVariant, 1), seqIndices, seqOut); seqIndices.realloc( 0); @@ -888,7 +888,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) //################################################################################### - // mixed parameter + // mixed parameter //################################################################################### // mixed1 seqIndices.realloc( 0); @@ -898,7 +898,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) param[1] = inFloat; param[2] = inVariant; inv->invoke(OUString(L"mixed1"), Sequence< Any >(param, 3), seqIndices, seqOut); - + if (seqOut.getLength() != 3 || inByte != seqOut[0] || inFloat != seqOut[1] || inVariant != seqOut[2]) return false; @@ -911,7 +911,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) Sequence<sal_Int16> seqIndices; Sequence<Any> seqOut; Any voidAny; - Any inArAny; + Any inArAny; Any outArray; Any inArBool, outArBool; Any inArByte, outArByte; @@ -935,7 +935,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) Sequence<Any> seq_1( arAnyStrTmp, 3); inArAny <<= seq_1; //################################################################################### - // in, out Sequences + // in, out Sequences //################################################################################### //Test sequence containing Anys of Strings inv->invoke(OUString(L"inArray"), Sequence< Any > ( & inArAny, 1), seqIndices, seqOut); @@ -954,7 +954,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) sal_Int8 arByte[]={1,2,3}; Sequence<sal_Int8> seqByte(arByte, 3); inArByte <<= seqByte; - inv->invoke(OUString(L"inSequenceByte"),Sequence<Any>( & inArByte, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceByte"),Sequence<Any>( & inArByte, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceByte"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -963,7 +963,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) sal_Int16 arShort[]={4,5,6}; Sequence<sal_Int16> seqShort(arShort, 3); inArShort<<= seqShort; - inv->invoke(OUString(L"inSequenceShort"),Sequence< Any >( & inArShort, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceShort"),Sequence< Any >( & inArShort, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceShort"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -972,19 +972,19 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) sal_Int32 arLong[] = {7,8,9}; Sequence<sal_Int32> seqLong(arLong, 3); inArLong <<= seqLong; - inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceLong"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArLong <<= seqOut[0]; - inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceLong"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArLong <<= seqOut[0]; - inv->invoke( OUString(L"inSequenceString"),Sequence< Any > ( & inArString, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inSequenceString"),Sequence< Any > ( & inArString, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceString"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -993,7 +993,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) float arFloat[]={3.14f, 31.4f, 314.f}; Sequence<float> seqFloat( arFloat, 3); inArFloat <<= seqFloat; - inv->invoke( OUString(L"inSequenceFloat"),Sequence< Any > ( & inArFloat, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inSequenceFloat"),Sequence< Any > ( & inArFloat, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceFloat"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -1002,30 +1002,30 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) double arDouble[]={3.145, 31.45, 3145.}; Sequence<double> seqDouble( arDouble, 3); inArDouble <<= seqDouble; - inv->invoke(OUString(L"inSequenceDouble"),Sequence< Any >( & inArDouble, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceDouble"),Sequence< Any >( & inArDouble, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceDouble"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArDouble <<= seqOut[0]; Sequence<Reference<XInvocation> > seqObj(2); - seqObj[0]= getComObject(L"AxTestComponents.Basic"); - seqObj[1]= getComObject(L"AxTestComponents.Basic"); + seqObj[0]= getComObject(L"AxTestComponents.Basic"); + seqObj[1]= getComObject(L"AxTestComponents.Basic"); inArObject <<= seqObj; - inv->invoke(OUString(L"inSequenceObject"),Sequence< Any >( & inArObject, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceObject"),Sequence< Any >( & inArObject, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceObject"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArObject <<= seqOut[0]; - - if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) + + if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) || ! equalSequences(inArLong, outArLong) || ! equalSequences(inArString, outArray) || ! equalSequences(inArFloat, outArFloat) || ! equalSequences(inArDouble, outArDouble) || ! equalSequences(inArString, outArString) || ! equalSequences(inArObject, outArObject)) return false; //################################################################################### - // in/out Sequences + // in/out Sequences //################################################################################### seqIndices.realloc(0); seqOut.realloc(0); @@ -1033,35 +1033,35 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"inoutArray"), Sequence< Any >( & inArString, 1), seqIndices, seqOut); outArray <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut); outArByte <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut); outArShort <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceLong"), Sequence<Any>( & inArLong, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceLong"), Sequence<Any>( & inArLong, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceLong"), Sequence< Any >( & inArLong, 1), seqIndices, seqOut); outArLong <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut); outArString <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut); outArFloat <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut); outArDouble <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut); outArObject <<= seqOut[0]; - if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) + if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) || ! equalSequences(inArLong, outArLong) || ! equalSequences(inArString, outArray) || ! equalSequences(inArFloat, outArFloat) || ! equalSequences(inArDouble, outArDouble) || ! equalSequences(inArString, outArString) || ! equalSequences(inArObject, outArObject)) @@ -1082,7 +1082,7 @@ HRESULT doTest() Sequence< sal_Int16> seqIndices; Sequence<Any> seqOut; - + Any aAny; Any anyOut; char buff[1024]; @@ -1097,9 +1097,9 @@ HRESULT doTest() if (! doPropertyTest(inv)) { fprintf(stdout, "### Test failed!\n"); - return E_FAIL; + return E_FAIL; } - + if ( ! doSimpleSequenceTest(inv)) { fprintf(stdout, "### Test failed! \n"); @@ -1118,15 +1118,15 @@ HRESULT doTest() return E_FAIL; } - + // -// //################################################################################### -// // in multi Sequences -// //################################################################################### -// // inMulDimArrayLong +// //################################################################################### +// // in multi Sequences +// //################################################################################### +// // inMulDimArrayLong sal_Int32 arLongi[]={1,2,3}; sal_Int32 arLongi2[]={4,5,6,7}; sal_Int32 arLongi3[]={8,9,10,11,12}; @@ -1141,10 +1141,10 @@ HRESULT doTest() seq2i[2]= seqLongi3; seqAny<<= seq2i; // dimension length 3,5 - inv->invoke( OUString(L"inMulDimArrayLong"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); -// + inv->invoke( OUString(L"inMulDimArrayLong"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); +// //inMulDimArrayVariant - inv->invoke( OUString(L"inMulDimArrayVariant"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inMulDimArrayVariant"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); //inMulDimArrayLong2 sal_Int32 arLongii1[]={1,2,3}; @@ -1167,12 +1167,12 @@ HRESULT doTest() seq2ii2[0]= seqLongii4; seq2ii2[1]= seqLongii5; - + Sequence< Sequence< Sequence< sal_Int32> > > seq3ii(2); seq3ii[0]=seq2ii; seq3ii[1]=seq2ii2; seqAny<<= seq3ii; - inv->invoke( OUString(L"inMulDimArrayLong2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inMulDimArrayLong2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); // inMulDimArrayByte2 sal_Int8 arByteii1[]={1,2,3}; @@ -1195,27 +1195,27 @@ HRESULT doTest() seq2Byteii2[0]= seqByteii4; seq2Byteii2[1]= seqByteii5; - + Sequence< Sequence< Sequence< sal_Int8> > > seq3Byteii(2); seq3Byteii[0]=seq2Byteii; seq3Byteii[1]=seq2Byteii2; seqAny<<= seq3Byteii; - inv->invoke( OUString(L"inMulDimArrayByte2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inMulDimArrayByte2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); //################################################################################### //################################################################################### //################################################################################### - // Tests with a MFC ActiveX control, ( pure dispinterface) + // Tests with a MFC ActiveX control, ( pure dispinterface) //################################################################################### //################################################################################### - // in parameter MFC ActiveX + // in parameter MFC ActiveX //################################################################################### // unsigned char is not supported by MFC - // aAny <<= ( sal_Int8) 127; - // invMfc->invoke( OUString(L"inByte"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); + // aAny <<= ( sal_Int8) 127; + // invMfc->invoke( OUString(L"inByte"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); if ( ! invMfc.is()) return hr; aAny <<= static_cast<sal_Int16>(-1); @@ -1239,12 +1239,12 @@ HRESULT doTest() aAny <<= OUString( L" A string in an any"); aAny=invMfc->invoke( OUString(L"inVariant"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); - + // Tests with Sequences later. - // OUString arStr4[]= {L"string0", L"string1", L"string2"}; - // Sequence<OUString> seqStr4( arStr4, 3); - // aAny <<= seqStr4; - // invMfc->invoke( OUString(L"inArray"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); + // OUString arStr4[]= {L"string0", L"string1", L"string2"}; + // Sequence<OUString> seqStr4( arStr4, 3); + // aAny <<= seqStr4; + // invMfc->invoke( OUString(L"inArray"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); Reference < XInvocation > inv5= getComObject(L"AxTestComponents.Basic"); @@ -1254,11 +1254,11 @@ HRESULT doTest() aAny <<= inv5; aAny=invMfc->invoke( OUString(L"inObject"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); // -// //################################################################################### -// // out parameter MFC ActiveX -// //################################################################################### -// -// // outShort +// //################################################################################### +// // out parameter MFC ActiveX +// //################################################################################### +// +// // outShort aAny= invMfc->invoke( OUString(L"outShort"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); anyOut<<= seqOut[0]; sprintf(buff, "MFC outShort %d", *(sal_Int16*)anyOut.getValue()); @@ -1308,9 +1308,9 @@ HRESULT doTest() //################################################################################### - // Sequence parameter MFC ActiveX + // Sequence parameter MFC ActiveX //################################################################################### - // Sequences are not directly supported. + // Sequences are not directly supported. delete pWin; |