diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-09-25 21:47:16 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-09-25 21:47:16 +0200 |
commit | 3739e0b64036f81ee62b4842332dd74d974b6d00 (patch) | |
tree | b9073e6fae3d3e20395d34ba1221a9812bf79ea2 /bridges | |
parent | a2c915bbd6b28ca2ad39800ba768464f73981145 (diff) | |
parent | 8fb94ad47fa73514ec1854825d63d612121dd9b7 (diff) |
merge commit
Diffstat (limited to 'bridges')
21 files changed, 53 insertions, 65 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx index 6141efd7964a..e474dce7268c 100644 --- a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx @@ -33,6 +33,7 @@ #include "precompiled_bridges.hxx" #include <stdio.h> +#include <string.h> #include <dlfcn.h> #include <cxxabi.h> #include <hash_map> diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx index 0f0fdbf351ca..e3f4d36e3962 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx @@ -110,6 +110,9 @@ static void callVirtualMethod( /* set up a pointer to the stack parameter area */ __asm__ ( "addi %0,r1,24" : "=r" (p) : /* no inputs */ ); + // #i94421#, work around compiler error: + volatile long * pCopy = p; + (void) pCopy; // avoid warning about unused variable // never called // if (! pAdjustedThisPtr )CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx index d4584227cdc1..d6589b8d86cf 100644 --- a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx @@ -163,7 +163,8 @@ static typelib_TypeClass cpp2uno_call( (*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc ); #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, ">cpp2uno_call pUnoExc %x\n", pUnoExc); + if (pUnoExc != NULL) + fprintf( stderr, ">cpp2uno_call pUnoExc %x\n", pUnoExc); #endif // in case an exception occured... diff --git a/bridges/source/cpp_uno/mingw_intel/call.s b/bridges/source/cpp_uno/mingw_intel/call.s index b4a9ba031cf5..47327d9a4650 100644 --- a/bridges/source/cpp_uno/mingw_intel/call.s +++ b/bridges/source/cpp_uno/mingw_intel/call.s @@ -1,7 +1,6 @@ .text .globl _privateSnippetExecutorGeneral - .type _privateSnippetExecutorGeneral,@function _privateSnippetExecutorGeneral: .LFBg: movl %esp,%ecx @@ -19,10 +18,9 @@ _privateSnippetExecutorGeneral: leave ret .LFEg: - .size _privateSnippetExecutorGeneral,.-_privateSnippetExecutorGeneral + .long .-_privateSnippetExecutorGeneral .globl _privateSnippetExecutorVoid - .type _privateSnippetExecutorVoid,@function _privateSnippetExecutorVoid: .LFBv: movl %esp,%ecx @@ -38,10 +36,9 @@ _privateSnippetExecutorVoid: leave ret .LFEv: - .size _privateSnippetExecutorVoid,.-_privateSnippetExecutorVoid + .long .-_privateSnippetExecutorVoid .globl _privateSnippetExecutorHyper - .type _privateSnippetExecutorHyper,@function _privateSnippetExecutorHyper: .LFBh: movl %esp,%ecx @@ -60,10 +57,9 @@ _privateSnippetExecutorHyper: leave ret .LFEh: - .size _privateSnippetExecutorHyper,.-_privateSnippetExecutorHyper + .long .-_privateSnippetExecutorHyper .globl _privateSnippetExecutorFloat - .type _privateSnippetExecutorFloat,@function _privateSnippetExecutorFloat: .LFBf: movl %esp,%ecx @@ -81,10 +77,9 @@ _privateSnippetExecutorFloat: leave ret .LFEf: - .size _privateSnippetExecutorFloat,.-_privateSnippetExecutorFloat + .long .-_privateSnippetExecutorFloat .globl _privateSnippetExecutorDouble - .type _privateSnippetExecutorDouble,@function _privateSnippetExecutorDouble: .LFBd: movl %esp,%ecx @@ -102,10 +97,9 @@ _privateSnippetExecutorDouble: leave ret .LFEd: - .size _privateSnippetExecutorDouble,.-_privateSnippetExecutorDouble + .long .-_privateSnippetExecutorDouble .globl _privateSnippetExecutorClass - .type _privateSnippetExecutorClass,@function _privateSnippetExecutorClass: .LFBc: movl %esp,%ecx @@ -123,9 +117,9 @@ _privateSnippetExecutorClass: leave ret $4 .LFEc: - .size _privateSnippetExecutorClass,.-_privateSnippetExecutorClass + .long .-_privateSnippetExecutorClass - .section .eh_frame,"a",@progbits + .section .eh_frame,"dr" .Lframe1: .long .LECIE1-.LSCIE1 # length .LSCIE1: @@ -265,4 +259,3 @@ _privateSnippetExecutorClass: .uleb128 5 .align 4 .LEFDEc: - .section .note.GNU-stack,"",@progbits diff --git a/bridges/test/com/sun/star/lib/TestBed.java b/bridges/test/com/sun/star/lib/TestBed.java index 7242b56438f0..5e2c5e7859c8 100644 --- a/bridges/test/com/sun/star/lib/TestBed.java +++ b/bridges/test/com/sun/star/lib/TestBed.java @@ -130,7 +130,7 @@ public final class TestBed { throws com.sun.star.uno.Exception { XConnector connector = Connector.create(context); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); @@ -169,7 +169,7 @@ public final class TestBed { = Bootstrap.createInitialComponentContext(null); XAcceptor acceptor = Acceptor.create(context); XBridgeFactory factory - = (XBridgeFactory) UnoRuntime.queryInterface( + = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java index a2c4122d3017..2c7e314afc82 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java @@ -68,22 +68,19 @@ public final class Bug107753_Test extends ComplexTestCase { protected boolean run(XComponentContext context) throws Throwable { boolean success = true; - XTransport transport = (XTransport) UnoRuntime.queryInterface( + XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); Object obj1a = new XType1() {}; - XType1 obj1b = (XType1) UnoRuntime.queryInterface(XType1.class, - obj1a); + XType1 obj1b = UnoRuntime.queryInterface(XType1.class, obj1a); success &= test("obj1a == obj1b", obj1a == obj1b); Object obj2a = new XType2() {}; - XType2 obj2b = (XType2) UnoRuntime.queryInterface(XType2.class, - obj2a); + XType2 obj2b = UnoRuntime.queryInterface(XType2.class, obj2a); success &= test("obj2a == obj2b", obj2a == obj2b); Object obj3a = transport.getType1(); - XType1 obj3b = (XType1) UnoRuntime.queryInterface(XType1.class, - obj3a); + XType1 obj3b = UnoRuntime.queryInterface(XType1.class, obj3a); success &= test( "obj3a != obj3b; only meaningful as long as different proxy" + " instances are used for different UNO interfaces of one UNO" @@ -91,8 +88,7 @@ public final class Bug107753_Test extends ComplexTestCase { obj3a != obj3b); Object obj4a = transport.getType2(); - XType2 obj4b = (XType2) UnoRuntime.queryInterface(XType2.class, - obj4a); + XType2 obj4b = UnoRuntime.queryInterface(XType2.class, obj4a); success &= test( "obj4a != obj4b; only meaningful as long as different proxy" + " instances are used for different UNO interfaces of one UNO" diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java index 6e9d97f7034d..0585e1c8f650 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java @@ -68,7 +68,7 @@ public final class Bug108825_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); // Send the XObject that is held on the server side amidst two // dummies that are not held on the server side; then wait for the diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java index 76bd9d37a10c..1a537895b0ed 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java @@ -71,7 +71,7 @@ public final class Bug110892_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); test.start(new ClientObject()); synchronized (lock) { diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java index d1f09509d9a3..40eccdba2cc6 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java @@ -63,7 +63,7 @@ public final class Bug111153_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTransport t = (XTransport) UnoRuntime.queryInterface( + XTransport t = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); XDerived d = new XDerived() {}; t.setDerived(d); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java index 32bfe9d832a3..247bf65ba185 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java @@ -67,7 +67,7 @@ public final class Bug51323_Test extends ComplexTestCase { protected boolean run(XComponentContext context) throws Throwable { XConnection connection = Connector.create(context).connect(getConnectionDescription()); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java index 292dabde4758..13b61447c320 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java @@ -55,7 +55,7 @@ public final class Bug92174_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTransport t = (XTransport) UnoRuntime.queryInterface( + XTransport t = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); t.setDerived(new XDerived() { public void fn() {} diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java index f235ccfd6475..2fdd457f0dcb 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java @@ -72,7 +72,7 @@ public final class Bug97697_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTransport transport = (XTransport) UnoRuntime.queryInterface( + XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); try { transport.getAny(); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java index b713deaa352e..79e373014c4a 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java @@ -76,7 +76,7 @@ public final class Bug98508_Test extends ComplexTestCase { protected boolean run(XComponentContext context) throws Throwable { Test98508Interface ifc - = (Test98508Interface) UnoRuntime.queryInterface( + = UnoRuntime.queryInterface( Test98508Interface.class, getBridge(context).getInstance("")); try { diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java index c22811502e14..407164c66c7f 100755 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java @@ -64,7 +64,7 @@ public final class MethodIdTest extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest t = (XTest) UnoRuntime.queryInterface( + XTest t = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); return t.f129() == 129; } diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java index 2f17041a52fb..1c9e387ddb32 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java @@ -61,7 +61,7 @@ public final class PolyStructTest extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - TestTransport t = (TestTransport) UnoRuntime.queryInterface( + TestTransport t = UnoRuntime.queryInterface( TestTransport.class, getBridge(context).getInstance("")); assertEquals( diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java index 7590a89fdd0e..37fb8ffee05b 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java @@ -63,7 +63,7 @@ public final class StopMessageDispatcherTest extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); Thread[] threads = new Thread[101]; int n = Thread.enumerate(threads); diff --git a/bridges/test/java_uno/acquire/TestAcquire.java b/bridges/test/java_uno/acquire/TestAcquire.java index 7d54c00d480d..e219b3adbf72 100644 --- a/bridges/test/java_uno/acquire/TestAcquire.java +++ b/bridges/test/java_uno/acquire/TestAcquire.java @@ -71,7 +71,7 @@ public final class TestAcquire { private static void execClient(XComponentContext context, String url) throws Exception { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, UnoUrlResolver.create(context).resolve(url)); WaitUnreachable u; @@ -184,7 +184,7 @@ public final class TestAcquire { throws Exception { XAcceptor acceptor = Acceptor.create(context); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/java_uno/any/TestRemote.java b/bridges/test/java_uno/any/TestRemote.java index db33efc139e9..ec533054579d 100644 --- a/bridges/test/java_uno/any/TestRemote.java +++ b/bridges/test/java_uno/any/TestRemote.java @@ -49,7 +49,7 @@ public final class TestRemote { } protected boolean run(XComponentContext context) throws Throwable { - XTransport transport = (XTransport) UnoRuntime.queryInterface( + XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); return TestAny.test(transport, true); } diff --git a/bridges/test/java_uno/equals/TestEquals.java b/bridges/test/java_uno/equals/TestEquals.java index 31b735473c9b..38c9500629e3 100644 --- a/bridges/test/java_uno/equals/TestEquals.java +++ b/bridges/test/java_uno/equals/TestEquals.java @@ -91,10 +91,10 @@ public final class TestEquals { } protected boolean run(XComponentContext context) throws Throwable { - XTestFrame f = (XTestFrame) UnoRuntime.queryInterface( + XTestFrame f = UnoRuntime.queryInterface( XTestFrame.class, getBridge(context).getInstance("TestFrame")); XAcceptor acceptor = Acceptor.create(context); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); @@ -160,17 +160,15 @@ public final class TestEquals { public void run() { try { Object test1Aa = object1; - XBase test1Ab = (XBase) - UnoRuntime.queryInterface( - XBase.class, test1Aa); - XDerived test1Ac = (XDerived) + XBase test1Ab = UnoRuntime.queryInterface( + XBase.class, test1Aa); + XDerived test1Ac = UnoRuntime.queryInterface( XDerived.class, test1Aa); Object test2Aa = object2; - XBase test2Ab = (XBase) - UnoRuntime.queryInterface( - XBase.class, test2Aa); - XDerived test2Ac = (XDerived) + XBase test2Ab = UnoRuntime.queryInterface( + XBase.class, test2Aa); + XDerived test2Ac = UnoRuntime.queryInterface( XDerived.class, test2Aa); @@ -182,16 +180,14 @@ public final class TestEquals { null, params); XMultiComponentFactory factory = context.getServiceManager(); - XImplementationLoader loader - = (XImplementationLoader) + XImplementationLoader loader = UnoRuntime.queryInterface( XImplementationLoader.class, factory.createInstanceWithContext( "com.sun.star.loader." + "SharedLibrary", context)); - XSingleComponentFactory factory2 - = (XSingleComponentFactory) + XSingleComponentFactory factory2 = UnoRuntime.queryInterface( XSingleComponentFactory.class, loader.activate( @@ -199,7 +195,7 @@ public final class TestEquals { + "testequals.impl", "", "../lib/testequals.uno", null)); - XTestInterface test = (XTestInterface) + XTestInterface test = UnoRuntime.queryInterface( XTestInterface.class, factory2.createInstanceWithContext( @@ -211,17 +207,15 @@ public final class TestEquals { PROTOCOL_DESCRIPTION); Object test1Ba = test.get(INSTANCE1); - XBase test1Bb = (XBase) - UnoRuntime.queryInterface( - XBase.class, test1Ba); - XDerived test1Bc = (XDerived) + XBase test1Bb = UnoRuntime.queryInterface( + XBase.class, test1Ba); + XDerived test1Bc = UnoRuntime.queryInterface( XDerived.class, test1Ba); Object test2Ba = test.get(INSTANCE2); - XBase test2Bb = (XBase) - UnoRuntime.queryInterface( - XBase.class, test2Ba); - XDerived test2Bc = (XDerived) + XBase test2Bb = UnoRuntime.queryInterface( + XBase.class, test2Ba); + XDerived test2Bc = UnoRuntime.queryInterface( XDerived.class, test2Ba); diff --git a/bridges/test/java_uno/nativethreadpool/Relay.java b/bridges/test/java_uno/nativethreadpool/Relay.java index b7e304c4a3c9..03cf6795c596 100644 --- a/bridges/test/java_uno/nativethreadpool/Relay.java +++ b/bridges/test/java_uno/nativethreadpool/Relay.java @@ -63,7 +63,7 @@ public final class Relay implements XRelay, XSource { final XAcceptor acceptor = Acceptor.create(context); final XBridgeFactory factory; try { - factory = (XBridgeFactory) UnoRuntime.queryInterface( + factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/testclient.java b/bridges/test/testclient.java index 244264fa8686..e1733bbc8b10 100644 --- a/bridges/test/testclient.java +++ b/bridges/test/testclient.java @@ -121,7 +121,7 @@ public class testclient XConnector xConnector = - ( XConnector ) UnoRuntime.queryInterface( XConnector.class , x ); + UnoRuntime.queryInterface( XConnector.class , x ); XConnection xConnection = xConnector.connect(args[0]); @@ -138,7 +138,7 @@ public class testclient System.out.println( "after building bridge" ); // Object rInitialObject = m_bridge.mapInterfaceFrom(rootOid, XInterface.class); -// XTestFactory rFactory = (XTestFactory ) +// XTestFactory rFactory = // UnoRuntime.queryInterface(XTestFactory.class,rInitialObject ); // XCallMe callMerFactory-> |