Kaydet (Commit) 92c2a468 authored tarafından Alexander Wilms's avatar Alexander Wilms Kaydeden (comit) Caolán McNamara

Remove visual noise from javaunohelper

Change-Id: Ib359d536070456c1ef403642eba7913a834d365d
Reviewed-on: https://gerrit.libreoffice.org/8275Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e524ecb3
...@@ -33,17 +33,17 @@ import java.util.Iterator; ...@@ -33,17 +33,17 @@ import java.util.Iterator;
import java.util.ArrayList; import java.util.ArrayList;
//==================================================================================================
class Disposer implements XEventListener class Disposer implements XEventListener
{ {
private XComponent m_xComp; private XComponent m_xComp;
//----------------------------------------------------------------------------------------------
Disposer( XComponent xComp ) Disposer( XComponent xComp )
{ {
m_xComp = xComp; m_xComp = xComp;
} }
//______________________________________________________________________________________________
public void disposing( EventObject Source ) public void disposing( EventObject Source )
{ {
m_xComp.dispose(); m_xComp.dispose();
...@@ -117,7 +117,7 @@ public class ComponentContext implements XComponentContext, XComponent ...@@ -117,7 +117,7 @@ public class ComponentContext implements XComponentContext, XComponent
} }
// XComponentContext impl // XComponentContext impl
//______________________________________________________________________________________________
public Object getValueByName( String rName ) public Object getValueByName( String rName )
{ {
Object o = m_table.get( rName ); Object o = m_table.get( rName );
...@@ -210,7 +210,7 @@ public class ComponentContext implements XComponentContext, XComponent ...@@ -210,7 +210,7 @@ public class ComponentContext implements XComponentContext, XComponent
return Any.VOID; return Any.VOID;
} }
} }
//______________________________________________________________________________________________
public XMultiComponentFactory getServiceManager() public XMultiComponentFactory getServiceManager()
{ {
if (m_xSMgr == null) if (m_xSMgr == null)
...@@ -222,7 +222,7 @@ public class ComponentContext implements XComponentContext, XComponent ...@@ -222,7 +222,7 @@ public class ComponentContext implements XComponentContext, XComponent
} }
// XComponent impl // XComponent impl
//______________________________________________________________________________________________
public void dispose() public void dispose()
{ {
if (DEBUG) if (DEBUG)
...@@ -289,7 +289,7 @@ public class ComponentContext implements XComponentContext, XComponent ...@@ -289,7 +289,7 @@ public class ComponentContext implements XComponentContext, XComponent
if (DEBUG) if (DEBUG)
System.err.println( "... finished" ); System.err.println( "... finished" );
} }
//______________________________________________________________________________________________
public void addEventListener( XEventListener xListener ) public void addEventListener( XEventListener xListener )
{ {
if (xListener == null) if (xListener == null)
...@@ -299,7 +299,7 @@ public class ComponentContext implements XComponentContext, XComponent ...@@ -299,7 +299,7 @@ public class ComponentContext implements XComponentContext, XComponent
m_eventListener.add( xListener ); m_eventListener.add( xListener );
} }
//______________________________________________________________________________________________
public void removeEventListener( XEventListener xListener ) public void removeEventListener( XEventListener xListener )
{ {
if (xListener == null) if (xListener == null)
......
...@@ -85,7 +85,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream { ...@@ -85,7 +85,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream {
// Casting bytesRead to an int is okay, since the user can // Casting bytesRead to an int is okay, since the user can
// only pass in an integer length to read, so the bytesRead // only pass in an integer length to read, so the bytesRead
// must <= len. // must <= len.
//
if (bytesRead <= 0) { if (bytesRead <= 0) {
return(0); return(0);
} }
...@@ -112,7 +112,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream { ...@@ -112,7 +112,7 @@ public class InputStreamToXInputStreamAdapter implements XInputStream {
// Casting bytesRead to an int is okay, since the user can // Casting bytesRead to an int is okay, since the user can
// only pass in an integer length to read, so the bytesRead // only pass in an integer length to read, so the bytesRead
// must <= len. // must <= len.
//
if (bytesRead <= 0) { if (bytesRead <= 0) {
return(0); return(0);
} }
......
...@@ -122,7 +122,7 @@ public class XInputStreamToInputStreamAdapter extends InputStream { ...@@ -122,7 +122,7 @@ public class XInputStreamToInputStreamAdapter extends InputStream {
// Casting bytesRead to an int is okay, since the user can // Casting bytesRead to an int is okay, since the user can
// only pass in an integer length to read, so the bytesRead // only pass in an integer length to read, so the bytesRead
// must <= len. // must <= len.
//
if (bytesRead <= 0) { if (bytesRead <= 0) {
return(-1); return(-1);
} else if (bytesRead < len) { } else if (bytesRead < len) {
......
...@@ -76,7 +76,7 @@ public class XOutputStreamToOutputStreamAdapter extends OutputStream { ...@@ -76,7 +76,7 @@ public class XOutputStreamToOutputStreamAdapter extends OutputStream {
byte[] tmp = new byte[len]; byte[] tmp = new byte[len];
// Copy the input array into a temp array, and write it out. // Copy the input array into a temp array, and write it out.
//
System.arraycopy(b, off, tmp, 0, len); System.arraycopy(b, off, tmp, 0, len);
try { try {
......
...@@ -115,7 +115,7 @@ public class Factory ...@@ -115,7 +115,7 @@ public class Factory
return false; return false;
} }
//==============================================================================================
private String m_impl_name; private String m_impl_name;
private String [] m_supported_services; private String [] m_supported_services;
private Class<?> m_impl_class; private Class<?> m_impl_class;
...@@ -163,7 +163,7 @@ public class Factory ...@@ -163,7 +163,7 @@ public class Factory
} }
} }
//______________________________________________________________________________________________
private final Object instantiate( XComponentContext xContext ) private final Object instantiate( XComponentContext xContext )
throws com.sun.star.uno.Exception throws com.sun.star.uno.Exception
{ {
...@@ -209,14 +209,14 @@ public class Factory ...@@ -209,14 +209,14 @@ public class Factory
} }
} }
// XSingleComponentFactory impl // XSingleComponentFactory impl
//______________________________________________________________________________________________
public final Object createInstanceWithContext( public final Object createInstanceWithContext(
XComponentContext xContext ) XComponentContext xContext )
throws com.sun.star.uno.Exception throws com.sun.star.uno.Exception
{ {
return instantiate( xContext ); return instantiate( xContext );
} }
//______________________________________________________________________________________________
public final Object createInstanceWithArgumentsAndContext( public final Object createInstanceWithArgumentsAndContext(
Object arguments [], XComponentContext xContext ) Object arguments [], XComponentContext xContext )
throws com.sun.star.uno.Exception throws com.sun.star.uno.Exception
...@@ -235,12 +235,12 @@ public class Factory ...@@ -235,12 +235,12 @@ public class Factory
} }
// XServiceInfo impl // XServiceInfo impl
//______________________________________________________________________________________________
public final String getImplementationName() public final String getImplementationName()
{ {
return m_impl_name; return m_impl_name;
} }
//______________________________________________________________________________________________
public final boolean supportsService( String service_name ) public final boolean supportsService( String service_name )
{ {
for ( int nPos = 0; nPos < m_supported_services.length; ++nPos ) for ( int nPos = 0; nPos < m_supported_services.length; ++nPos )
...@@ -250,7 +250,7 @@ public class Factory ...@@ -250,7 +250,7 @@ public class Factory
} }
return false; return false;
} }
//______________________________________________________________________________________________
public final String [] getSupportedServiceNames() public final String [] getSupportedServiceNames()
{ {
return m_supported_services; return m_supported_services;
......
...@@ -63,7 +63,7 @@ inline OUString jstring_to_oustring( jstring jstr, JNIEnv * jni_env ) ...@@ -63,7 +63,7 @@ inline OUString jstring_to_oustring( jstring jstr, JNIEnv * jni_env )
} }
//==================================================================================================
jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
JNIEnv * jni_env, SAL_UNUSED_PARAMETER jclass, jstring juno_rc, jobjectArray jpairs, JNIEnv * jni_env, SAL_UNUSED_PARAMETER jclass, jstring juno_rc, jobjectArray jpairs,
jobject loader ) jobject loader )
......
...@@ -89,7 +89,7 @@ static bool inited_juhx( JNIEnv * jni_env ) ...@@ -89,7 +89,7 @@ static bool inited_juhx( JNIEnv * jni_env )
return true; return true;
} }
//==================================================================================================
SAL_DLLPUBLIC_EXPORT jboolean JNICALL SAL_DLLPUBLIC_EXPORT jboolean JNICALL
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo( Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
JNIEnv * pJEnv, jclass jClass, jstring jLibName, jobject jSMgr, JNIEnv * pJEnv, jclass jClass, jstring jLibName, jobject jSMgr,
...@@ -100,7 +100,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo( ...@@ -100,7 +100,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
pJEnv, jClass, jLibName, jSMgr, jRegKey, loader ); pJEnv, jClass, jLibName, jSMgr, jRegKey, loader );
return JNI_FALSE; return JNI_FALSE;
} }
//==================================================================================================
SAL_DLLPUBLIC_EXPORT jobject JNICALL SAL_DLLPUBLIC_EXPORT jobject JNICALL
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory( Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
JNIEnv * pJEnv, jclass jClass, jstring jLibName, jstring jImplName, JNIEnv * pJEnv, jclass jClass, jstring jLibName, jstring jImplName,
...@@ -111,7 +111,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory( ...@@ -111,7 +111,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
pJEnv, jClass, jLibName, jImplName, jSMgr, jRegKey, loader ); pJEnv, jClass, jLibName, jImplName, jSMgr, jRegKey, loader );
return 0; return 0;
} }
//==================================================================================================
SAL_DLLPUBLIC_EXPORT jobject JNICALL SAL_DLLPUBLIC_EXPORT jobject JNICALL
Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
JNIEnv * jni_env, jclass jClass, jstring juno_rc, jobjectArray jpairs, JNIEnv * jni_env, jclass jClass, jstring juno_rc, jobjectArray jpairs,
......
...@@ -35,7 +35,7 @@ import com.sun.star.comp.helper.RegistryServiceFactory; ...@@ -35,7 +35,7 @@ import com.sun.star.comp.helper.RegistryServiceFactory;
import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.UnoRuntime;
//==================================================================================================
public class Factory_Test public class Factory_Test
extends WeakBase extends WeakBase
implements XServiceInfo implements XServiceInfo
...@@ -44,11 +44,11 @@ public class Factory_Test ...@@ -44,11 +44,11 @@ public class Factory_Test
static final String m_supported_services [] = { static final String m_supported_services [] = {
"Factory_Test.Service0", "Factory_Test.Service1" }; "Factory_Test.Service0", "Factory_Test.Service1" };
//______________________________________________________________________________________________
public Factory_Test() public Factory_Test()
{ {
} }
//______________________________________________________________________________________________
public Factory_Test( XComponentContext xContext ) public Factory_Test( XComponentContext xContext )
throws com.sun.star.uno.Exception throws com.sun.star.uno.Exception
{ {
...@@ -58,7 +58,7 @@ public class Factory_Test ...@@ -58,7 +58,7 @@ public class Factory_Test
"bad component context given!", this ); "bad component context given!", this );
} }
} }
//______________________________________________________________________________________________
public static Object __create( XComponentContext xContext ) public static Object __create( XComponentContext xContext )
throws com.sun.star.uno.Exception throws com.sun.star.uno.Exception
{ {
...@@ -66,12 +66,12 @@ public class Factory_Test ...@@ -66,12 +66,12 @@ public class Factory_Test
} }
// XServiceInfo impl // XServiceInfo impl
//______________________________________________________________________________________________
public final String getImplementationName() public final String getImplementationName()
{ {
return m_impl_name; return m_impl_name;
} }
//______________________________________________________________________________________________
public final boolean supportsService( String service_name ) public final boolean supportsService( String service_name )
{ {
for ( int nPos = 0; nPos < m_supported_services.length; ++nPos ) for ( int nPos = 0; nPos < m_supported_services.length; ++nPos )
...@@ -81,13 +81,13 @@ public class Factory_Test ...@@ -81,13 +81,13 @@ public class Factory_Test
} }
return false; return false;
} }
//______________________________________________________________________________________________
public final String [] getSupportedServiceNames() public final String [] getSupportedServiceNames()
{ {
return m_supported_services; return m_supported_services;
} }
//==============================================================================================
public static XSingleComponentFactory __getComponentFactory( String implName ) public static XSingleComponentFactory __getComponentFactory( String implName )
{ {
if (implName.equals( m_impl_name )) if (implName.equals( m_impl_name ))
...@@ -97,14 +97,14 @@ public class Factory_Test ...@@ -97,14 +97,14 @@ public class Factory_Test
} }
return null; return null;
} }
//==============================================================================================
public static boolean __writeRegistryServiceInfo( XRegistryKey xKey ) public static boolean __writeRegistryServiceInfo( XRegistryKey xKey )
{ {
return Factory.writeRegistryServiceInfo( return Factory.writeRegistryServiceInfo(
m_impl_name, Factory_Test.m_supported_services, xKey ); m_impl_name, Factory_Test.m_supported_services, xKey );
} }
//==============================================================================================
static void service_info_test( Object inst ) static void service_info_test( Object inst )
{ {
XServiceInfo xInfo = UnoRuntime.queryInterface( XServiceInfo.class, inst ); XServiceInfo xInfo = UnoRuntime.queryInterface( XServiceInfo.class, inst );
...@@ -134,7 +134,7 @@ public class Factory_Test ...@@ -134,7 +134,7 @@ public class Factory_Test
} }
} }
} }
//==============================================================================================
public static void main( String args [] ) public static void main( String args [] )
{ {
try try
......
...@@ -392,7 +392,7 @@ public class PropertySet_Test ...@@ -392,7 +392,7 @@ public class PropertySet_Test
r[i++]= ret instanceof Any && util.anyEquals(value, ret); r[i++]= ret instanceof Any && util.anyEquals(value, ret);
// ------------------------------------------------------------------------------
cl.resetPropertyMembers(); cl.resetPropertyMembers();
value= new Boolean(true); value= new Boolean(true);
cl.setPropertyValue("PropBoolClass", value); cl.setPropertyValue("PropBoolClass", value);
...@@ -573,7 +573,7 @@ public class PropertySet_Test ...@@ -573,7 +573,7 @@ public class PropertySet_Test
r[i++]= cl.propObjectA == null; r[i++]= cl.propObjectA == null;
//
}catch(java.lang.Exception e){ }catch(java.lang.Exception e){
i++; i++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment