summaryrefslogtreecommitdiff
path: root/javaunohelper/com/sun/star/comp
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-09-16 14:37:52 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-09-16 14:37:52 +0000
commitc7788533a2565593405e55b617d09425e08ef439 (patch)
tree3f5e079ea8633edfe8fd37ec9a6fe40a0a4f952f /javaunohelper/com/sun/star/comp
parent36fc972942594e186e6924bfc1568bfb0096733e (diff)
CWS-TOOLING: integrate CWS sb113
2009-09-01 sb #i76393# second attempt at properly #ifdef-ing previous HG commit d598efdbf012 2009-08-28 sb #i102469# change back <T extends XInterface> to just <T> on queryInterface, to avoid binary incompatibility (method changing its signature from (Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object; to (Ljava/lang/Class;Ljava/lang/Object;)Lcom/sun/star/uno/XInterface;) 2009-08-28 sb #i76393# properly #ifdef previous HG commit d598efdbf012 2009-08-27 sb #i94421# work around compiler error (based on a patch supplied by cloph) 2009-08-26 sb merged in DEV300_m56 2009-08-26 sb #i76393# on Linux, include dynamic section offset in crash report so as to be able to map "prelinked" callstacks back to original (patch by cmc) 2009-08-26 sb #i88162# remove unnecessary whitespace lines from per-locale xcu files (patch by tora) 2009-08-17 Juergen Schmidt #i104292# set context classloader after create new custom UNO loader 2009-08-17 Juergen Schmidt #i103749# integrate patch 2009-08-14 sb #i103269# cherry-picked ssh://hg@hg.services.openoffice.org/cws/sb111 -r 5124ebd5edd1 ("#i101955# changed encoding of XML file content from erroneous ISO-8859-1 to UTF-8") 2009-08-12 sb #i102469# fixed mis-applications of UnoRuntime.queryInterface (detected via the simplified UnoRuntime.queryInterface, the HG changeset 29de35fc9554) to use AnyConverter instead; changed qadevOOo's lib.MultiMethodTest.before to allow throwing arbitrary exceptions, to cater for IllegalArgumentException thrown by AnyConverter 2009-08-12 sb #i104178# drop extra libxml2-config script from libxmlsec 2009-08-10 sb #i101754# simplified osl_getProcessInfo for LINUX (patch by cmc) 2009-08-10 sb #i95018# avoid closing -1 fds (patch supplied by cmc) 2009-08-10 sb #i103585# removed (apparently unnecessary) zlib support from libxml2; in turn, removed zlib dependencies from libxmlsec, libxslt, and redland (assuming those were transitive dependencies brought in by direct dependencies on libxml2) 2009-08-10 sb #i102469# simplified UnoRuntime.queryInterface using Java 5 generics; adapted URE-related modules accordingly 2009-08-10 sb #i101213# adapted setsolar env (solenv/config/) to set PYTHONPATH (and not set PYTHONHOME) in accordance with configure env (set_soenv.in); fixed testtools/source/bridgetest/pyuno (which now should work everywhere out of the box, thanks to the fixed setsolar PYTHONPATH) 2009-08-10 sb cherry-picked ssh://hg@hg.services.openoffice.org/cws/sb111 -r ea8de6d9396b ("#i101955# work in progress for a .hgignore file, continued")
Diffstat (limited to 'javaunohelper/com/sun/star/comp')
-rw-r--r--javaunohelper/com/sun/star/comp/helper/Bootstrap.java20
-rw-r--r--javaunohelper/com/sun/star/comp/helper/ComponentContext.java12
-rw-r--r--javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java2
-rw-r--r--javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java4
-rw-r--r--javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java2
5 files changed, 19 insertions, 21 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index c5037b2f1566..d80b8a6b9df0 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -67,7 +67,7 @@ import java.util.Random;
Other services can be inserted into the service manager by
using its XSet interface:
<pre>
- XSet xSet = (XSet)UnoRuntime.queryInterface( XSet.class, aMultiComponentFactory );
+ XSet xSet = UnoRuntime.queryInterface( XSet.class, aMultiComponentFactory );
// insert the service manager
xSet.insert( aSingleComponentFactory );
</pre>
@@ -108,20 +108,20 @@ public class Bootstrap {
static public XComponentContext createInitialComponentContext( Hashtable context_entries )
throws Exception
{
- XImplementationLoader xImpLoader = (XImplementationLoader)UnoRuntime.queryInterface(
+ XImplementationLoader xImpLoader = UnoRuntime.queryInterface(
XImplementationLoader.class, new JavaLoader() );
// Get the factory of the ServiceManager
- XSingleComponentFactory smgr_fac = (XSingleComponentFactory)UnoRuntime.queryInterface(
+ XSingleComponentFactory smgr_fac = UnoRuntime.queryInterface(
XSingleComponentFactory.class, xImpLoader.activate(
"com.sun.star.comp.servicemanager.ServiceManager", null, null, null ) );
// Create an instance of the ServiceManager
- XMultiComponentFactory xSMgr = (XMultiComponentFactory)UnoRuntime.queryInterface(
+ XMultiComponentFactory xSMgr = UnoRuntime.queryInterface(
XMultiComponentFactory.class, smgr_fac.createInstanceWithContext( null ) );
// post init loader
- XInitialization xInit = (XInitialization)UnoRuntime.queryInterface(
+ XInitialization xInit = UnoRuntime.queryInterface(
XInitialization.class, xImpLoader );
Object[] args = new Object [] { xSMgr };
xInit.initialize( args );
@@ -137,12 +137,12 @@ public class Bootstrap {
XComponentContext xContext = new ComponentContext( context_entries, null );
// post init smgr
- xInit = (XInitialization)UnoRuntime.queryInterface(
+ xInit = UnoRuntime.queryInterface(
XInitialization.class, xSMgr );
args = new Object [] { null, xContext }; // no registry, default context
xInit.initialize( args );
- XSet xSet = (XSet)UnoRuntime.queryInterface( XSet.class, xSMgr );
+ XSet xSet = UnoRuntime.queryInterface( XSet.class, xSMgr );
// insert the service manager
xSet.insert( smgr_fac );
// and basic jurt factories
@@ -159,7 +159,7 @@ public class Bootstrap {
*/
static public XMultiServiceFactory createSimpleServiceManager() throws Exception
{
- return (XMultiServiceFactory)UnoRuntime.queryInterface(
+ return UnoRuntime.queryInterface(
XMultiServiceFactory.class, createInitialComponentContext( null ).getServiceManager() );
}
@@ -206,7 +206,7 @@ public class Bootstrap {
NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" );
m_loaded_juh = true;
}
- return (XComponentContext)UnoRuntime.queryInterface(
+ return UnoRuntime.queryInterface(
XComponentContext.class,
cppuhelper_bootstrap(
ini_file, pairs, Bootstrap.class.getClassLoader() ) );
@@ -283,7 +283,7 @@ public class Bootstrap {
try {
// try to connect to office
Object context = xUrlResolver.resolve( sConnect );
- xContext = (XComponentContext) UnoRuntime.queryInterface(
+ xContext = UnoRuntime.queryInterface(
XComponentContext.class, context);
if ( xContext == null )
throw new BootstrapException( "no component context!" );
diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index 938cc0543901..1c3df0d4844b 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -101,7 +101,7 @@ public class ComponentContext implements XComponentContext, XComponent
{
o = ((ComponentContextEntry)o).m_value;
}
- m_xSMgr = (XMultiComponentFactory)UnoRuntime.queryInterface(
+ m_xSMgr = UnoRuntime.queryInterface(
XMultiComponentFactory.class, o );
}
if (m_xSMgr != null)
@@ -114,7 +114,7 @@ public class ComponentContext implements XComponentContext, XComponent
}
// listen for delegate
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(
+ XComponent xComp = UnoRuntime.queryInterface(
XComponent.class, m_xDelegate );
if (xComp != null)
{
@@ -154,7 +154,7 @@ public class ComponentContext implements XComponentContext, XComponent
else
{
XSingleComponentFactory xCompFac =
- (XSingleComponentFactory)UnoRuntime.queryInterface(
+ UnoRuntime.queryInterface(
XSingleComponentFactory.class, entry.m_lateInit );
if (xCompFac != null)
{
@@ -185,7 +185,7 @@ public class ComponentContext implements XComponentContext, XComponent
else // inited in the meantime
{
// dispose fresh service instance
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(
+ XComponent xComp = UnoRuntime.queryInterface(
XComponent.class, xInstance );
if (xComp != null)
{
@@ -253,7 +253,7 @@ public class ComponentContext implements XComponentContext, XComponent
o = ((ComponentContextEntry)o).m_value;
}
- XComponent xComp = (XComponent)UnoRuntime.queryInterface( XComponent.class, o );
+ XComponent xComp = UnoRuntime.queryInterface( XComponent.class, o );
if (xComp != null)
{
if (name.equals( TDMGR_NAME ))
@@ -272,7 +272,7 @@ public class ComponentContext implements XComponentContext, XComponent
// smgr
if (m_bDisposeSMgr)
{
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(
+ XComponent xComp = UnoRuntime.queryInterface(
XComponent.class, m_xSMgr );
if (xComp != null)
{
diff --git a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java
index 4b5db3753da3..9523fbba7716 100644
--- a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java
+++ b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java
@@ -124,7 +124,7 @@ public class RegistryServiceFactory {
Object obj = createRegistryServiceFactory(
writeRegistryFile, readRegistryFile, readOnly,
RegistryServiceFactory.class.getClassLoader() );
- return (XMultiServiceFactory) UnoRuntime.queryInterface(
+ return UnoRuntime.queryInterface(
XMultiServiceFactory.class, obj );
}
diff --git a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
index eda51f8cb1f7..a1bf4d3a168c 100644
--- a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
+++ b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java
@@ -85,7 +85,7 @@ public class SharedLibraryLoader {
XMultiServiceFactory smgr,
XRegistryKey regKey )
{
- return (XSingleServiceFactory) UnoRuntime.queryInterface(
+ return UnoRuntime.queryInterface(
XSingleServiceFactory.class,
component_getFactory(
DEFAULT_LIBRARY, DEFAULT_IMPLEMENTATION, smgr, regKey,
@@ -110,7 +110,7 @@ public class SharedLibraryLoader {
XMultiServiceFactory smgr,
XRegistryKey regKey )
{
- return (XSingleServiceFactory) UnoRuntime.queryInterface(
+ return UnoRuntime.queryInterface(
XSingleServiceFactory.class,
component_getFactory(
libName, impName, smgr, regKey,
diff --git a/javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java b/javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java
index cafa7e0a412d..a508a209ad2c 100644
--- a/javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java
+++ b/javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java
@@ -119,7 +119,6 @@ class InteractionImpl implements com.sun.star.task.XInteractionHandler
if (approve)
{
com.sun.star.task.XInteractionApprove xApprove =
- (com.sun.star.task.XInteractionApprove)
UnoRuntime.queryInterface(com.sun.star.task.XInteractionApprove.class, conts[i]);
if (xApprove != null)
xApprove.select();
@@ -129,7 +128,6 @@ class InteractionImpl implements com.sun.star.task.XInteractionHandler
else if (abort)
{
com.sun.star.task.XInteractionAbort xAbort =
- (com.sun.star.task.XInteractionAbort)
UnoRuntime.queryInterface(com.sun.star.task.XInteractionAbort.class, conts[i]);
if (xAbort != null)
xAbort.select();