summaryrefslogtreecommitdiffstats
path: root/extensions/test/ole/cpnt
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-07-16 11:33:46 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-07-16 11:33:46 +0000
commit3481ba93eabba9da810593a96e69900a62fc3052 (patch)
treece7d8c3cae8765f85150aa0b2b5db705239df178 /extensions/test/ole/cpnt
parentCWS-TOOLING: integrate CWS dba311a_DEV300 (diff)
downloadcore-3481ba93eabba9da810593a96e69900a62fc3052.tar.gz
core-3481ba93eabba9da810593a96e69900a62fc3052.zip
CWS-TOOLING: integrate CWS jl129
2009-07-08 09:24:14 +0200 jl r273817 : #i103275# catching DisposedException when calling XDesktop.terminate, the test librariesversion_3_0_0.dll, ..3_0_1.dll, .. 3.1.dll have been recreated and checked in 2009-07-08 09:20:29 +0200 jl r273816 : # 2009-07-07 10:51:52 +0200 jl r273784 : #103378# allow to pass Nothing in Basic for uno null reference 2009-07-07 10:30:48 +0200 jl r273781 : #103242# VS 2008 changes 2009-07-07 10:21:23 +0200 jl r273778 : #103242 2009-07-07 10:12:20 +0200 jl r273777 : #103242 adapting to VS 2008 2009-07-03 09:47:21 +0200 jl r273679 : #i10324# fix build errors 2009-07-03 09:12:08 +0200 jl r273677 : #i10324# fix build errors 2009-07-02 15:26:07 +0200 jl r273657 : #i103242 make it build again 2009-07-02 14:39:34 +0200 jl r273652 : #i103242 make it build again 2009-07-02 14:18:45 +0200 jl r273650 : #i103242 remove warnings 2009-07-02 14:11:48 +0200 jl r273648 : #i103242 2009-07-02 12:41:23 +0200 jl r273637 : #i103242 2009-07-02 12:25:09 +0200 jl r273636 : #i103242 upgraded to VS2008 2009-07-02 12:00:07 +0200 jl r273632 : #i103242 upgraded to VS2008 2009-07-02 11:30:55 +0200 jl r273630 : #i103242 test does not build anymore 2009-07-02 11:14:21 +0200 jl r273629 : #i103242 test does not build anymore 2009-07-02 10:59:56 +0200 jl r273628 : #i103242 test does not build anymore 2009-07-02 10:17:43 +0200 jl r273622 : #i103242 run test prints out the InnerException in case there was an exception. The InnerException is usually the one thrown in OOo 2009-07-01 17:06:24 +0200 jl r273604 : #i103242 test does not build anymore
Diffstat (limited to 'extensions/test/ole/cpnt')
-rw-r--r--extensions/test/ole/cpnt/cpnt.cxx49
-rw-r--r--extensions/test/ole/cpnt/readme.txt26
2 files changed, 41 insertions, 34 deletions
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index 8a42a958c612..606a2193b794 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.cxx
@@ -49,7 +49,7 @@
#include <cppuhelper/implbase7.hxx>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/uno/Reference.h>
-#include <rtl/ustring>
+#include <rtl/ustring.h>
#include <com/sun/star/uno/Reference.hxx>
#include <oletest/XTestSequence.hpp>
#include <oletest/XTestStruct.hpp>
@@ -374,7 +374,7 @@ Sequence<OUString> OComponent_getSupportedServiceNames(void)
}
-extern "C" sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey )
+extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
{
if(pRegistryKey)
{
@@ -395,7 +395,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void
}
extern "C" void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+ const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
static void * pRet= NULL;
if( ! pRet)
@@ -421,7 +421,7 @@ extern "C" void * SAL_CALL component_getFactory(
}
extern "C" void SAL_CALL component_getImplementationEnvironment(
- const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+ const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
@@ -983,11 +983,11 @@ void SAL_CALL OComponent::testout_methodMulParams2(sal_Int32& rout1, sal_Int32&
rout2= 1222;
rout3= L" another string";
}
-void SAL_CALL OComponent::testout_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException )
+void SAL_CALL OComponent::testout_methodMulParams3(const OUString&, OUString& sout) throw( RuntimeException )
{
sout= L"Out Hallo!";
}
-void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 in3 ) throw(RuntimeException)
+void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 ) throw(RuntimeException)
{
out1= in1 + 1;
out2= in2 + 1;
@@ -1091,11 +1091,11 @@ Reference<XInvocation > SAL_CALL OComponent::in_methodInvocation( const Referenc
try{
inv->invoke( OUString(RTL_CONSTASCII_USTRINGPARAM("disposing")),
params, outIndex, outParams);
- }catch(IllegalArgumentException & iae) {
+ }catch(IllegalArgumentException &) {
}
- catch(CannotConvertException & cce) {
+ catch(CannotConvertException &){
}
- catch(InvocationTargetException& ite) {
+ catch(InvocationTargetException&) {
}
return inv;
}
@@ -1113,9 +1113,10 @@ SimpleStruct SAL_CALL OComponent::in_methodStruct( const SimpleStruct& aStruct )
"This string was set in OleTest"));
return aStruct;
}
-void SAL_CALL OComponent::in_methodAll( sal_Int8 b, float f, double d, sal_Bool boo, sal_Int16 sh, sal_uInt16 us,
- sal_Int32 l, sal_uInt32 ul, const OUString& s, sal_Unicode c,
- const Any& a, const Type& t, const Reference<XInvocation>& inv ) throw (RuntimeException)
+void SAL_CALL OComponent::in_methodAll(
+ sal_Int8, float, double, sal_Bool, sal_Int16, sal_uInt16,
+ sal_Int32, sal_uInt32, const OUString&, sal_Unicode,
+ const Any&, const Type&, const Reference<XInvocation>&) throw (RuntimeException)
{
}
@@ -1324,7 +1325,7 @@ Property SAL_CALL OComponent::methodStruct2( const Property& aProp ) throw (Runt
}
// XTestOther ==================================================================================
-void SAL_CALL OComponent::other_methodAnyIn(const Any& rAny) throw( RuntimeException )
+void SAL_CALL OComponent::other_methodAnyIn(const Any& ) throw( RuntimeException )
{
}
void SAL_CALL OComponent::other_methodAnyOut(Any& rAny) throw( RuntimeException )
@@ -1471,8 +1472,8 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
sal_Int8 aByte;
sal_Int16 aShort;
sal_Int32 aLong;
- sal_uInt16 aUShort;
- sal_uInt32 aULong;
+// sal_uInt16 aUShort;
+// sal_uInt32 aULong;
switch( mode)
{
@@ -1590,8 +1591,8 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
sal_Int8 aByte;
sal_Int16 aShort;
sal_Int32 aLong;
- sal_uInt16 aUShort;
- sal_uInt32 aULong;
+// sal_uInt16 aUShort;
+// sal_uInt32 aULong;
xCallback->outValuesAll( xSimple, aSimpleStruct, aSimpleEnum, seqAny, aAny, aBool,
aChar, aString,
aFloat, aDouble,
@@ -1731,7 +1732,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
}
case 108:
{
- float f= 3.14;
+ float f= 3.14f;
xCallback->inoutFloat(f);
char buff[1024];
sprintf( buff, "out value float: %f", f);
@@ -1811,7 +1812,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
sal_Bool aBool= sal_True;
sal_Unicode aChar= L'A';
OUString aString( L"OleTest");
- float aFloat=3.14;
+ float aFloat=3.14f;
double aDouble= 3.145;
sal_Int8 aByte= 0xf;
sal_Int16 aShort= 0xff;
@@ -1981,15 +1982,15 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
arAny[6] <<= L'B';
OUString stringParam(L" a string parameter");
arAny[7] <<= stringParam;
- float _float= 3.14;
+ float _float= 3.14f;
arAny[8] <<= _float;
double _double= 3.145;
arAny[9] <<= _double;
- sal_Int8 _byte= 0xff;
+ sal_Int8 _byte= -1;
arAny[10] <<= _byte;
- sal_Int16 _short= 0xffff;
+ sal_Int16 _short= -1;
arAny[11] <<= _short;
- sal_Int32 _long= 0xffffffff;
+ sal_Int32 _long= -1;
arAny[12] <<= _long;
//
Sequence<Any> params( arAny, 13);
@@ -2089,7 +2090,7 @@ Reference< XInterface > SAL_CALL OComponent::getThis( ) throw (RuntimeException
return ret;
}
-void SAL_CALL EventListener::disposing( const ::com::sun::star::lang::EventObject& Source ) throw (RuntimeException)
+void SAL_CALL EventListener::disposing( const ::com::sun::star::lang::EventObject& ) throw (RuntimeException)
{
bCalled= sal_True;
}
diff --git a/extensions/test/ole/cpnt/readme.txt b/extensions/test/ole/cpnt/readme.txt
index 2f9aab8fcadd..46d525efb285 100644
--- a/extensions/test/ole/cpnt/readme.txt
+++ b/extensions/test/ole/cpnt/readme.txt
@@ -1,15 +1,21 @@
-cpnt.cxx contains a uno component that is uses to test the olebridge
-within a JavaScript context.
-In particular it has functions using out, in/out and sequence parameter
-that have to be specifically treated in JScript because they are represented
-by IDispatch objects.
+cpnt.cxx contains a uno component that is uses to test the olebridge within a
+JavaScript context. In particular it has functions using out, in/out and
+sequence parameter that have to be specifically treated in JScript because they
+are represented by IDispatch objects. Other clients, such as VBScript, VB and
+C++ applications can also use this component for testing.
+The service name is oletest.OleTest.
+The uno types are also build in this folder. The idl file is in ..\idl. The
+types rdb is in wntmscixx.pro\bin\oletest.rdb
-The test is run by JavaScript contained in OleTest.htm and JScriptNewStyle.htm.
+The service is used by:
+OleTest.htm
+JScriptNewStyle.htm
+ScriptTest.html
Prerequisites:
-The oletest.dll ( build in this directory) must reside in the <Office Dir>/program
-directory and it must have been registered with regcomp.exe.
-The types in wntmsci/bin/oletest.rdb must be merged with the applicat.rdb. oletest.rdb
-is automatically build in this directory. However the idl file is in test/ole/idl. \ No newline at end of file
+The oletest.dll must be registered, for example in the services.rdb, using
+regcomp. Then the uno types contained in oletest.rdb (wntmscixx/bin) must be merged
+for example in the offapi.rdb. This is done with regmerge.
+