diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-04-22 15:10:13 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-04-22 15:10:13 +0200 |
commit | bef8909ce175f728d43501cfec4368eebd69cabf (patch) | |
tree | f5ea9873e1af554d82c351acdf85619c17f01de7 /jurt/com/sun/star/comp | |
parent | 83e8a2bbe468b5439cc8e59cc04abf001677a8e6 (diff) | |
parent | 013fa416d39f1c219722e6736b7234f944fe774f (diff) |
Merge commit 'ooo/DEV300_m106' into libreoffice-3-4
Conflicts:
offapi/com/sun/star/animations/XAnimationNode.idl
offapi/com/sun/star/awt/grid/XGridColumn.idl
offapi/com/sun/star/drawing/framework/XPaneBorderPainter.idl
offapi/com/sun/star/frame/ModuleManager.idl
offapi/com/sun/star/frame/XLayoutManager.idl
offapi/com/sun/star/frame/XLayoutManagerListener.idl
offapi/com/sun/star/rendering/FontInfo.idl
offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl
offapi/com/sun/star/rendering/XCanvas.idl
offapi/com/sun/star/rendering/XSprite.idl
offapi/com/sun/star/report/ForceNewPage.idl
offapi/com/sun/star/report/ReportPrintOption.idl
offapi/com/sun/star/report/XFunctionsSupplier.idl
offapi/com/sun/star/report/XReportControlFormat.idl
offapi/com/sun/star/resource/StringResourceWithLocation.idl
offapi/com/sun/star/resource/XStringResourceResolver.idl
offapi/com/sun/star/resource/XStringResourceWithLocation.idl
offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl
offapi/com/sun/star/security/XCertificateContainer.idl
offapi/com/sun/star/ui/UIElementFactory.idl
offapi/com/sun/star/ui/XImageManager.idl
offapi/com/sun/star/ui/XUIConfigurationManager.idl
offapi/com/sun/star/ui/XUIElementFactory.idl
offapi/com/sun/star/ui/XUIElementSettings.idl
offapi/com/sun/star/xml/crypto/SEInitializer.idl
offapi/com/sun/star/xml/crypto/XSEInitializer.idl
offapi/com/sun/star/xml/crypto/XSecurityEnvironment.idl
offapi/com/sun/star/xml/crypto/XXMLSecurityContext.idl
sal/rtl/source/alloc_arena.c
udkapi/com/sun/star/task/XInteractionHandler2.idl
Diffstat (limited to 'jurt/com/sun/star/comp')
6 files changed, 25 insertions, 35 deletions
diff --git a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java index 1c4819326268..b0c093ffa2bb 100644 --- a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java +++ b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java @@ -108,7 +108,7 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ { com.sun.star.uno.RuntimeException { boolean hasName = sName.length() != 0; - Object context = hasName ? (Object) sName : (Object) new UniqueToken(); + Object context = hasName ? sName : new UniqueToken(); // UnoRuntime.getBridgeByName internally uses context.toString() to // distinguish bridges, so the result of // new UniqueToken().toString() might clash with an explicit @@ -128,7 +128,7 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ { } } - XBridge xBridge = null; + XBridge xBridge; try { IBridge iBridge = UnoRuntime.getBridgeByName("java", context, "remote", context, hasName ? new Object[]{sProtocol, aConnection, anInstanceProvider, sName} : new Object[]{sProtocol, aConnection, anInstanceProvider}); diff --git a/jurt/com/sun/star/comp/connections/PipedConnection.java b/jurt/com/sun/star/comp/connections/PipedConnection.java index f5a839ea78c5..aefc2eec3a7a 100644 --- a/jurt/com/sun/star/comp/connections/PipedConnection.java +++ b/jurt/com/sun/star/comp/connections/PipedConnection.java @@ -139,7 +139,7 @@ public class PipedConnection implements XConnection { if(_closed) throw new com.sun.star.io.IOException("connection has been closed"); - int bytes = 0; + int bytes ; if(_out < _in) { bytes = Math.min(aData.length - bytesWritten, _in - _out - 1); diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java index 29b484631670..ef0dda4e3f23 100644 --- a/jurt/com/sun/star/comp/loader/FactoryHelper.java +++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java @@ -413,10 +413,7 @@ public class FactoryHelper { _implementationId[2]= (byte)((hash >>> 16) & 0xff); _implementationId[3]= (byte)((hash >>>24) & 0xff); - for (int i= 0; i < nNameLength; i++) - { - _implementationId[4 + i]= arName[i]; - } + System.arraycopy(arName, 0, _implementationId, 4, nNameLength); } } return _implementationId; @@ -453,7 +450,7 @@ public class FactoryHelper { XSingleServiceFactory xSingleServiceFactory = null; try { - Field serviceName = null; + Field serviceName ; try { serviceName = implClass.getField("__serviceName"); diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java b/jurt/com/sun/star/comp/loader/JavaLoader.java index 47723b208497..25fc90b47676 100644 --- a/jurt/com/sun/star/comp/loader/JavaLoader.java +++ b/jurt/com/sun/star/comp/loader/JavaLoader.java @@ -265,7 +265,7 @@ public class JavaLoader implements XImplementationLoader, locationUrl = expand_url( locationUrl ); Object returnObject = null; - Class clazz = null; + Class clazz ; DEBUG("try to get factory for " + implementationName); diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java index 6914ee5228e0..ab15529fc16b 100644 --- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java +++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java @@ -187,7 +187,7 @@ public class ServiceManager implements XMultiServiceFactory, Class clazz = Class.forName( newImpls[i] ); Class[] methodClassParam = { String.class, XMultiServiceFactory.class, XRegistryKey.class }; - java.lang.reflect.Method getFactoryMeth = null; + java.lang.reflect.Method getFactoryMeth ; try { getFactoryMeth = clazz.getMethod("__getServiceFactory", methodClassParam); } @@ -233,7 +233,7 @@ public class ServiceManager implements XMultiServiceFactory, public void initialize( Object args[] ) throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { - XSimpleRegistry xSimpleRegistry = null; + XSimpleRegistry xSimpleRegistry ; try { xSimpleRegistry = (XSimpleRegistry) args[0]; if (xSimpleRegistry != null) @@ -462,9 +462,9 @@ public class ServiceManager implements XMultiServiceFactory, XEventListener listener = (XEventListener) enumer.nextElement(); listener.disposing(new com.sun.star.lang.EventObject(this)); } + eventListener.removeAllElements(); } - eventListener.removeAllElements(); factoriesByServiceNames.clear(); factoriesByImplNames.clear(); } @@ -527,12 +527,9 @@ public class ServiceManager implements XMultiServiceFactory, XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object); - if (xServiceInfo != null) { - return UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object); - } + return xServiceInfo != null && UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object); - return false; - } + } /** * Adds a <code>SingleServiceFactory</code> to the <code>ServiceManager</code>. @@ -567,7 +564,7 @@ public class ServiceManager implements XMultiServiceFactory, String[] serviceNames = xServiceInfo.getSupportedServiceNames(); - java.util.Vector vec = null; + java.util.Vector vec ; for (int i=0; i<serviceNames.length; i++) { if ( !factoriesByServiceNames.containsKey( serviceNames[i] ) ) { @@ -688,7 +685,7 @@ public class ServiceManager implements XMultiServiceFactory, public XEnumeration createContentEnumeration( String serviceName ) throws com.sun.star.uno.RuntimeException { - XEnumeration enumer = null; + XEnumeration enumer ; java.util.Vector serviceList = (java.util.Vector) factoriesByServiceNames.get(serviceName); @@ -725,10 +722,9 @@ public class ServiceManager implements XMultiServiceFactory, for (int i=0; i<supportedServiceNames.length; i++) if (supportedServiceNames[i].equals( serviceName )) return true; - if (getImplementationName().equals( serviceName )) return true; + return getImplementationName().equals(serviceName); - return false; - } + } /** * Supplies list of all supported services. @@ -781,11 +777,9 @@ public class ServiceManager implements XMultiServiceFactory, public boolean hasMoreElements() throws com.sun.star.uno.RuntimeException { - if (enumeration != null) - return enumeration.hasMoreElements(); + return enumeration != null && enumeration.hasMoreElements(); - return false; - } + } /** * Returns the next element of the enumeration. If no further elements @@ -859,10 +853,9 @@ class ServiceManagerFactory implements XServiceInfo, XSingleComponentFactory, X for ( int i=0; i<ServiceManager.supportedServiceNames.length; i++ ) if ( ServiceManager.supportedServiceNames[i].equals(serviceName) ) return true; - if ( getImplementationName().equals(serviceName) ) return true; + return getImplementationName().equals(serviceName); - return false; - } + } /** * Returns all service names which are supported by <code>ServiceManager</code>. diff --git a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java index 538315638553..2a7bddcb01d9 100644 --- a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java +++ b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java @@ -71,9 +71,9 @@ public class UrlResolver { } public Object resolve(/*IN*/String dcp) throws NoConnectException, ConnectionSetupException, IllegalArgumentException, com.sun.star.uno.RuntimeException { - String conDcp = null; - String protDcp = null; - String rootOid = null; + String conDcp ; + String protDcp ; + String rootOid ; if(dcp.indexOf(';') == -1) {// use old style conDcp = dcp; @@ -96,8 +96,8 @@ public class UrlResolver { rootOid = dcp.trim().trim(); } - Object rootObject = null; - XBridgeFactory xBridgeFactory= null; + Object rootObject ; + XBridgeFactory xBridgeFactory ; try { xBridgeFactory = UnoRuntime.queryInterface(XBridgeFactory.class, _xMultiServiceFactory.createInstance("com.sun.star.bridge.BridgeFactory")); @@ -107,7 +107,7 @@ public class UrlResolver { XBridge xBridge = xBridgeFactory.getBridge(conDcp + ";" + protDcp); if(xBridge == null) { - Object connector= null; + Object connector ; try { connector = _xMultiServiceFactory.createInstance("com.sun.star.connection.Connector"); } catch (com.sun.star.uno.Exception e) { |