diff --git a/bean/Jar_officebean.mk b/bean/Jar_officebean.mk
index 852788318cd5..d7883a5fa7e6 100644
--- a/bean/Jar_officebean.mk
+++ b/bean/Jar_officebean.mk
@@ -27,7 +27,6 @@ $(eval $(call gb_Jar_add_sourcefiles,officebean,\
bean/com/sun/star/beans/NativeConnection \
bean/com/sun/star/beans/NativeService \
bean/com/sun/star/beans/OfficeConnection \
- bean/com/sun/star/beans/OfficeWindow \
bean/com/sun/star/comp/beans/ContainerFactory \
bean/com/sun/star/comp/beans/Controller \
bean/com/sun/star/comp/beans/Frame \
diff --git a/bean/com/sun/star/beans/ContainerFactory.java b/bean/com/sun/star/beans/ContainerFactory.java
index e3c0c9d9d7e2..7b8e93f42717 100644
--- a/bean/com/sun/star/beans/ContainerFactory.java
+++ b/bean/com/sun/star/beans/ContainerFactory.java
@@ -29,10 +29,5 @@ import java.awt.Container;
public interface ContainerFactory
{
- /**
- * Creates an AWT container.
- *
- * @return An AWT container.
- */
- Container createContainer();
+
}
diff --git a/bean/com/sun/star/beans/LocalOfficeConnection.java b/bean/com/sun/star/beans/LocalOfficeConnection.java
index b4b59359a32b..34c33f90e314 100644
--- a/bean/com/sun/star/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/beans/LocalOfficeConnection.java
@@ -158,19 +158,6 @@ public class LocalOfficeConnection
return mContext;
}
- /**
- * Creates an office window.
- * The window is either a sub-class of java.awt.Canvas (local) or
- * java.awt.Container (RVP).
- *
- * @param container This is an AWT container.
- * @return The office window instance.
- */
- public OfficeWindow createOfficeWindow(Container container)
- {
- return new LocalOfficeWindow(this);
- }
-
/**
* Closes the connection.
*/
diff --git a/bean/com/sun/star/beans/LocalOfficeWindow.java b/bean/com/sun/star/beans/LocalOfficeWindow.java
index 63dc9ce53b33..0d2021b92f5e 100644
--- a/bean/com/sun/star/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/beans/LocalOfficeWindow.java
@@ -42,7 +42,7 @@ import com.sun.star.uno.XComponentContext;
*/
public class LocalOfficeWindow
extends java.awt.Canvas
- implements OfficeWindow, XEventListener
+ implements XEventListener
{
private transient OfficeConnection mConnection;
private transient XWindowPeer mParentProxy;
diff --git a/bean/com/sun/star/beans/OfficeConnection.java b/bean/com/sun/star/beans/OfficeConnection.java
index 4301600590c0..272d2376f754 100644
--- a/bean/com/sun/star/beans/OfficeConnection.java
+++ b/bean/com/sun/star/beans/OfficeConnection.java
@@ -39,13 +39,7 @@ public interface OfficeConnection
void setUnoUrl(String url)
throws java.net.MalformedURLException;
- /**
- * Sets an AWT container catory.
- *
- * @param containerFactory This is a application provided AWT container
- * factory.
- */
- void setContainerFactory(ContainerFactory containerFactory);
+
/**
* Retrieves the UNO component context.
@@ -56,15 +50,5 @@ public interface OfficeConnection
*/
XComponentContext getComponentContext();
- /**
- * Creates an office window.
- * The window is either a sub-class of java.awt.Canvas (local) or
- * java.awt.Container (RVP).
- *
- * This method does not add add the office window to its container.
- *
- * @param container This is an AWT container.
- * @return The office window instance.
- */
- OfficeWindow createOfficeWindow(Container container);
+
}
diff --git a/bean/com/sun/star/beans/OfficeWindow.java b/bean/com/sun/star/beans/OfficeWindow.java
deleted file mode 100644
index ebc46b8335de..000000000000
--- a/bean/com/sun/star/beans/OfficeWindow.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package com.sun.star.beans;
-
-import java.awt.Component;
-
-import com.sun.star.awt.XWindowPeer;
-
-/**
- * The concreate implementation of the OfficeWindow extends an
- * approperate type of visual component (java.awt.Canvas for local
- * and java.awt.Container for remote).
- * @deprecated
- */
-public interface OfficeWindow
-{
- /**
- * Retrieves an AWT component object associated with the OfficeWindow.
- *
- * @return The AWT component object associated with the OfficeWindow.
- */
- Component getAWTComponent();
-
- /**
- * Retrieves an UNO XWindowPeer object associated with the OfficeWindow.
- *
- * @return The UNO XWindowPeer object associated with the OfficeWindow.
- */
- XWindowPeer getUNOWindowPeer();
-}
diff --git a/bean/com/sun/star/comp/beans/ContainerFactory.java b/bean/com/sun/star/comp/beans/ContainerFactory.java
index d06a082c7db6..8e54884d9a36 100644
--- a/bean/com/sun/star/comp/beans/ContainerFactory.java
+++ b/bean/com/sun/star/comp/beans/ContainerFactory.java
@@ -29,10 +29,5 @@ import java.awt.Container;
public interface ContainerFactory
{
- /**
- * Creates an AWT container.
- *
- * @return An AWT container.
- */
- Container createContainer();
+
}
diff --git a/bean/com/sun/star/comp/beans/Controller.java b/bean/com/sun/star/comp/beans/Controller.java
index 9e93c5878b2f..4a68980a8866 100644
--- a/bean/com/sun/star/comp/beans/Controller.java
+++ b/bean/com/sun/star/comp/beans/Controller.java
@@ -83,13 +83,7 @@ public class Controller
// com.sun.star.frame.XDispatchProvider
- public com.sun.star.frame.XDispatch queryDispatch(
- /*IN*/ com.sun.star.util.URL aURL,
- /*IN*/ String aTargetFrameName,
- /*IN*/ int nSearchFlags )
- {
- return xDispatchProvider.queryDispatch( aURL, aTargetFrameName, nSearchFlags );
- }
+
public com.sun.star.frame.XDispatch[] queryDispatches(
/*IN*/ com.sun.star.frame.DispatchDescriptor[] aRequests )
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java
index 85daec2e1cf0..1357f6adcad0 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -181,25 +181,7 @@ public class OOoBean
xConnectionListener = this.new EventListener("setOOoConnection");
}
- // @requirement FUNC.CON.STRT/0.4
- /** Starts a connection to an OOo instance which is lauched if not running.
- @throws HasConnectionException
- if a connection was already established.
-
- @throws NoConnectionException
- if the specified connection cannot be established
- */
- public void startOOoConnection( String aConnectionURL )
- throws java.net.MalformedURLException,
- HasConnectionException,
- NoConnectionException
- {
- // create a new connection from the given connection URL
- LocalOfficeConnection aConnection = new LocalOfficeConnection();
- aConnection.setUnoUrl( aConnectionURL );
- setOOoConnection( aConnection );
- }
// @requirement FUNC.CON.CHK/0.7
/** Returns true if this OOoBean is connected to an OOo instance,
@@ -331,31 +313,7 @@ public class OOoBean
return xDesktop;
}
- /** Resets this bean to an empty document.
- If a document is loaded and the content modified,
- the changes are dismissed. Otherwise nothing happens.
-
- This method is intended to be overridden in derived classes.
- This implementation simply calls clear.
-
- @param bClearStateToo
- Not only the document content but also the state of the bean,
- like visibility of child components is cleared.
-
- @deprecated There is currently no way to dismiss changes, except for loading
- of the unchanged initial document. Furthermore it is unclear how derived classes
- handle this and what exactly their state is (e.g. what members make up their state).
- Calling this method on a derived class requires knowledge about their implementation.
- Therefore a deriving class should declare their own clearDocument if needed. Clients
- should call the clearDocument of the deriving class or {@link #clear} which discards
- the currently displayed document.
- */
- public synchronized void clearDocument( boolean bClearStateToo )
- {
- // TBD
- clear();
- }
/** Resets the OOoBean to an empty status.
@@ -696,79 +654,9 @@ public class OOoBean
}
}
- /** Loads a document from a Java stream.
- See loadFromURL() for further information.
- */
- public void loadFromStream(
- final java.io.InputStream iInStream,
- final com.sun.star.beans.PropertyValue aArguments[] )
- throws
- // @requirement FUNC.CON.LOST/0.2
- NoConnectionException,
- java.io.IOException,
- com.sun.star.lang.IllegalArgumentException,
- com.sun.star.util.CloseVetoException
- {
- // wrap Java stream into UNO stream
- // copy stream....
- int s = 4096;
- int r=0 ,n = 0;
- byte[] buffer = new byte[s];
- byte[] newBuffer = null;
- while ((r = iInStream.read(buffer, n, buffer.length-n))>0) {
- n += r;
- if (iInStream.available() > buffer.length - n) {
- newBuffer = new byte[buffer.length*2];
- System.arraycopy(buffer, 0, newBuffer, 0, n);
- buffer = newBuffer;
- }
- }
- if (buffer.length != n) {
- newBuffer = new byte[n];
- System.arraycopy(buffer, 0, newBuffer, 0, n);
- buffer = newBuffer;
- }
- com.sun.star.io.XInputStream xStream =
- new com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter(buffer);
- // add stream to arguments
- com.sun.star.beans.PropertyValue[] aExtendedArguments =
- addArgument( aArguments, new com.sun.star.beans.PropertyValue(
- "InputStream", -1, xStream, com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
-
- // call normal load method
- loadFromURL( "private:stream", aExtendedArguments );
- }
-
- /** Loads a document from a byte array.
-
- See loadFromURL() for further information.
- */
- public void loadFromByteArray(
- final byte aInBuffer[],
- final com.sun.star.beans.PropertyValue aArguments[] )
- throws
- // @requirement FUNC.CON.LOST/0.2
- NoConnectionException,
- java.io.IOException,
- com.sun.star.lang.IllegalArgumentException,
- com.sun.star.util.CloseVetoException
- {
- // wrap byte arrray into UNO stream
- com.sun.star.io.XInputStream xStream =
- new com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter(
- aInBuffer );
-
- // add stream to arguments
- com.sun.star.beans.PropertyValue[] aExtendedArguments =
- addArgument( aArguments, new com.sun.star.beans.PropertyValue(
- "InputStream", -1, xStream, com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
-
- // call normal load method
- loadFromURL( "private:stream", aExtendedArguments );
- }
/** Stores a document to the given URL.
@@ -831,84 +719,9 @@ public class OOoBean
{ throw new NoConnectionException(); }
}
- /** Stores a document to a stream.
- See {@link #storeToURL storeToURL} for further information.
- @see #storeToURL storeToURL
- */
- public java.io.OutputStream storeToStream(
- java.io.OutputStream aOutStream,
- final com.sun.star.beans.PropertyValue aArguments[] )
- throws
- // @requirement FUNC.CON.LOST/0.2
- NoConnectionException,
- NoDocumentException,
- java.io.IOException,
- com.sun.star.lang.IllegalArgumentException
- {
- // wrap Java stream into UNO stream
- com.sun.star.lib.uno.adapter.OutputStreamToXOutputStreamAdapter aStream =
- new com.sun.star.lib.uno.adapter.OutputStreamToXOutputStreamAdapter(
- aOutStream );
- // add stream to arguments
- com.sun.star.beans.PropertyValue[] aExtendedArguments =
- addArgument( aArguments, new com.sun.star.beans.PropertyValue(
- "OutputStream", -1, aStream, com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
-
- // call normal store method
- storeToURL( "private:stream", aExtendedArguments );
-
- // get byte array from document stream
- try { aStream.closeOutput(); }
- catch ( com.sun.star.io.NotConnectedException aExc )
- { /* TDB */ }
- catch ( com.sun.star.io.BufferSizeExceededException aExc )
- { /* TDB */ }
- catch ( com.sun.star.io.IOException aExc )
- { throw new java.io.IOException(); }
- return aOutStream;
- }
-
- /** Stores a document to a byte array.
-
- See {@link #storeToURL storeToURL} for further information.
- @see #storeToURL storeToURL
- */
- public byte[] storeToByteArray(
- byte aOutBuffer[],
- final com.sun.star.beans.PropertyValue aArguments[] )
- throws
- // @requirement FUNC.CON.LOST/0.2
- NoConnectionException,
- NoDocumentException,
- java.io.IOException,
- com.sun.star.lang.IllegalArgumentException
- {
- // wrap byte arrray into UNO stream
- com.sun.star.lib.uno.adapter.XOutputStreamToByteArrayAdapter aStream =
- new com.sun.star.lib.uno.adapter.XOutputStreamToByteArrayAdapter(
- aOutBuffer );
-
- // add stream to arguments
- com.sun.star.beans.PropertyValue[] aExtendedArguments =
- addArgument( aArguments, new com.sun.star.beans.PropertyValue(
- "OutputStream", -1, aStream, com.sun.star.beans.PropertyState.DIRECT_VALUE ) );
-
- // call normal store method
- storeToURL( "private:stream", aExtendedArguments );
-
- // get byte array from document stream
- try { aStream.closeOutput(); }
- catch ( com.sun.star.io.NotConnectedException aExc )
- { /* TDB */ }
- catch ( com.sun.star.io.BufferSizeExceededException aExc )
- { /* TDB */ }
- catch ( com.sun.star.io.IOException aExc )
- { throw new java.io.IOException(); }
- return aStream.getBuffer();
- }
// @requirement FUNC.BEAN.PROG/0.5
// @requirement API.SIM.SEAP/0.2
diff --git a/bean/com/sun/star/comp/beans/OfficeConnection.java b/bean/com/sun/star/comp/beans/OfficeConnection.java
index 2786810654d8..ec239d480c56 100644
--- a/bean/com/sun/star/comp/beans/OfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/OfficeConnection.java
@@ -40,13 +40,7 @@ public interface OfficeConnection
void setUnoUrl(String url)
throws java.net.MalformedURLException;
- /**
- * Sets an AWT container catory.
- *
- * @param containerFactory This is a application provided AWT container
- * factory.
- */
- void setContainerFactory(ContainerFactory containerFactory);
+
/**
* Retrieves the UNO component context.
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java
index b2e08164f44c..679d41e1b469 100644
--- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java
+++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeStorageAccess.java
@@ -56,11 +56,11 @@ public class NativeStorageAccess {
public native int read(String name,String key,byte[] b, int off, int len) throws java.io.IOException;
- public native int readInt(String name,String key) throws java.io.IOException;
+
public native void seek(String name,String key,long position) throws java.io.IOException;
public native void write(String name,String key,byte[] b, int offset, int length) throws java.io.IOException;
- public native void writeInt(String name,String key,int v) throws java.io.IOException;
+
}
diff --git a/connectivity/qa/connectivity/tools/sdb/Connection.java b/connectivity/qa/connectivity/tools/sdb/Connection.java
index f530fa9af92e..e3c006aefbb8 100644
--- a/connectivity/qa/connectivity/tools/sdb/Connection.java
+++ b/connectivity/qa/connectivity/tools/sdb/Connection.java
@@ -48,24 +48,6 @@ public class Connection
return m_connection;
}
- public boolean execute( final String _sql ) throws SQLException
- {
- XStatement statement = createStatement();
- return statement.execute( _sql );
- }
-
- public XResultSet executeQuery( final String _sql ) throws SQLException
- {
- XStatement statement = createStatement();
- return statement.executeQuery( _sql );
- }
-
- public int executeUpdate( final String _sql ) throws SQLException
- {
- XStatement statement = createStatement();
- return statement.executeUpdate( _sql );
- }
-
public void refreshTables()
{
final XTablesSupplier suppTables = UnoRuntime.queryInterface(XTablesSupplier.class, m_connection);
diff --git a/extensions/qa/integration/extensions/MethodHandler.java b/extensions/qa/integration/extensions/MethodHandler.java
index 56eda09b2912..c362016f9538 100644
--- a/extensions/qa/integration/extensions/MethodHandler.java
+++ b/extensions/qa/integration/extensions/MethodHandler.java
@@ -50,10 +50,7 @@ public class MethodHandler implements XPropertyHandler
}
}
- static public XSingleComponentFactory getFactory()
- {
- return new ComponentFactory( MethodHandler.class );
- }
+
public void actuatingPropertyChanged(String _propertyName, Object _newValue, Object _oldValue, com.sun.star.inspection.XObjectInspectorUI _objectInspectorUI, boolean _firstTimeInit) throws com.sun.star.lang.NullPointerException
{
diff --git a/forms/qa/complex/forms/CheckOGroupBoxModel.java b/forms/qa/complex/forms/CheckOGroupBoxModel.java
index 987af1367e85..6f048a6aa160 100644
--- a/forms/qa/complex/forms/CheckOGroupBoxModel.java
+++ b/forms/qa/complex/forms/CheckOGroupBoxModel.java
@@ -179,10 +179,7 @@ public class CheckOGroupBoxModel
return propertiesChanged;
}
- public void reset()
- {
- propertiesChanged = false;
- }
+
}
private XMultiServiceFactory getMSF()
diff --git a/forms/qa/integration/forms/DocumentHelper.java b/forms/qa/integration/forms/DocumentHelper.java
index cbbb73d7385b..41e620593e65 100644
--- a/forms/qa/integration/forms/DocumentHelper.java
+++ b/forms/qa/integration/forms/DocumentHelper.java
@@ -108,11 +108,7 @@ public class DocumentHelper
return blankDocument( orb, DocumentType.WRITER );
}
- /* ------------------------------------------------------------------ */
- public static DocumentHelper blankXMLForm( XMultiServiceFactory orb ) throws com.sun.star.uno.Exception
- {
- return blankDocument( orb, DocumentType.XMLFORM );
- }
+
/* ------------------------------------------------------------------ */
public static DocumentHelper blankDocument( XMultiServiceFactory orb, DocumentType eType ) throws com.sun.star.uno.Exception
@@ -260,22 +256,7 @@ public class DocumentHelper
return createSubForm( xContainer, sInitialName );
}
- /* ------------------------------------------------------------------ */
- /** retrieves the document model which a given form component belongs to
- */
- static public DocumentHelper getDocumentForComponent( Object aFormComponent, XMultiServiceFactory orb )
- {
- XChild xChild = UnoRuntime.queryInterface( XChild.class, aFormComponent );
- XModel xModel = null;
- while ( ( null != xChild ) && ( null == xModel ) )
- {
- XInterface xParent = (XInterface)xChild.getParent();
- xModel = UnoRuntime.queryInterface( XModel.class, xParent );
- xChild = UnoRuntime.queryInterface( XChild.class, xParent );
- }
- return new DocumentHelper( orb, xModel );
- }
/* ------------------------------------------------------------------ */
/** returns a URL which can be used to create a document of a certain type
diff --git a/forms/qa/integration/forms/DocumentType.java b/forms/qa/integration/forms/DocumentType.java
index 94e2fa4e54ae..105c31fc2614 100644
--- a/forms/qa/integration/forms/DocumentType.java
+++ b/forms/qa/integration/forms/DocumentType.java
@@ -26,10 +26,7 @@ public class DocumentType extends com.sun.star.uno.Enum
super( value );
}
- public static DocumentType getDefault()
- {
- return WRITER;
- }
+
public static final DocumentType WRITER = new DocumentType(0);
public static final DocumentType CALC = new DocumentType(1);
@@ -37,16 +34,6 @@ public class DocumentType extends com.sun.star.uno.Enum
public static final DocumentType XMLFORM = new DocumentType(3);
public static final DocumentType UNKNOWN = new DocumentType(-1);
- public static DocumentType fromInt(int value)
- {
- switch(value)
- {
- case 0: return WRITER;
- case 1: return CALC;
- case 2: return DRAWING;
- case 3: return XMLFORM;
- default: return UNKNOWN;
- }
- }
+
}
diff --git a/forms/qa/integration/forms/DocumentViewHelper.java b/forms/qa/integration/forms/DocumentViewHelper.java
index b2b06cad3990..4026ba3c9751 100644
--- a/forms/qa/integration/forms/DocumentViewHelper.java
+++ b/forms/qa/integration/forms/DocumentViewHelper.java
@@ -213,36 +213,6 @@ public class DocumentViewHelper
xControlWindow.setFocus();
}
- /* ------------------------------------------------------------------ */
- /** sets the focus to the first control
- */
- protected void grabControlFocus( ) throws java.lang.Exception
- {
- // the forms container of our document
- XIndexContainer xForms = dbfTools.queryIndexContainer( m_document.getFormComponentTreeRoot( ) );
- // the first form
- XIndexContainer xForm = dbfTools.queryIndexContainer( xForms.getByIndex( 0 ) );
- // the first control model which is no FixedText (FixedText's can't have the focus)
- for ( int i = 0; i" );
- sLog.append(sDescription);
- sLog.append("" );
-
- log(TYPE_LINK, sLog.toString());
- }
/**
diff --git a/framework/qa/complex/framework/recovery/RecoveryTools.java b/framework/qa/complex/framework/recovery/RecoveryTools.java
index feb10f4b255a..623f14141813 100644
--- a/framework/qa/complex/framework/recovery/RecoveryTools.java
+++ b/framework/qa/complex/framework/recovery/RecoveryTools.java
@@ -191,30 +191,7 @@ public class RecoveryTools {
}
}
- /**
- * This function close the office while calling terminate on the desktop. If
- * this failed, the ProcessHandler kills the process.
- * @param xMSF the XMultiServiceFactory
- * @return TRUE if no exception was thrown, otherwise FALSE
- */
- public boolean closeOffice(XMultiServiceFactory xMSF) {
- try {
- XDesktop desk = UnoRuntime.queryInterface(
- XDesktop.class, xMSF.createInstance(
- "com.sun.star.frame.Desktop"));
- xMSF = null;
- desk.terminate();
- log.println("Waiting until ProcessHandler loses the office...");
-
- }
- catch (java.lang.Exception e) {
- e.printStackTrace();
- return false;
- }
- waitForClosedOffice();
- return true;
- }
/**
* This function waits until the office is closed. If the closing time reach
@@ -237,10 +214,7 @@ public class RecoveryTools {
if (ph != null) ph.kill();
}
- public void killOffice(){
- helper.ProcessHandler ph = (helper.ProcessHandler) param.get("AppProvider");
- ph.kill();
- }
+
/**
* The office must be started WITH restore and crashreporter functionality.
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
index 383e9c2ed202..39413006ab13 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
@@ -64,21 +64,7 @@ public class BasicBound {
return value;
}
- public static BasicBound getBound(double[] data) {
- BasicBound bound = new BasicBound();
- if(data!=null) {
- if(data.length>0) {
- bound.minValue = data[0];
- bound.maxValue = data[0];
- for(int i=1; i maxValue || value < minValue) {
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java
index 1721b240217c..8cbfaa158747 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java
@@ -26,19 +26,5 @@ public class GlobalCompare {
return CompareValue.EQUAL_TO;
}
-/* check the magnitude of two array, the frontial is more important
- **/
- public static int compareArray(double[] fit1, double[] fit2) {
- if (fit1.length!=fit2.length) {
- return CompareValue.INVALID; //error
- }
- for (int i=0; ifit2[i]) {
- return CompareValue.LARGER_THAN; //Large than
- } else if (fit1[i]=totalIndices.length) {
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java
index c33d6490b4be..6fee1b7367e4 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java
@@ -68,10 +68,5 @@ public class SearchPoint extends BasicPoint implements IEncodeEngine {
return encodeInfo[0] == 0; //no constraint violations
}
- public void outputSelf() {
- System.out.println("#--> Location:");
- OutputMethods.outputVector(getLocation());
- System.out.println("#--> (CON & OPTIM):");
- OutputMethods.outputVector(getEncodeInfo());
- }
+
}
\ No newline at end of file
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
index 5bbd88a26a45..98c6824b73d6 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
@@ -65,11 +65,7 @@ public abstract class ProblemEncoder {
designSpace.setElemAt(dd, i);
}
- protected void setDefaultXAt(int i, double min, double max) {
- DesignDim dd = new DesignDim();
- dd.paramBound = new BasicBound(min, max);
- designSpace.setElemAt(dd, i);
- }
+
//set the default information for evaluation each response
protected void setDefaultYAt(int i, double min, double max) {
@@ -78,12 +74,7 @@ public abstract class ProblemEncoder {
evalStruct.setElemAt(ee, i);
}
- protected void setDefaultYAt(int i, double min, double max, double weight) {
- EvalElement ee = new EvalElement();
- ee.targetBound = new BasicBound(min, max);
- ee.weight = weight;
- evalStruct.setElemAt(ee, i);
- }
+
//get a fresh point
public SearchPoint getFreshSearchPoint() {
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java
index aa9988c1b3a9..2ddbf1b891a8 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim.java
@@ -29,10 +29,7 @@ public class DesignDim {
public BasicBound paramBound = new BasicBound(); //the range of a parameter
- public void importData(DesignDim ipr) {
- this.grain = ipr.grain;
- this.paramBound = ipr.paramBound;
- }
+
public boolean isDiscrete() {
return grain!=0;
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java
index bd620fa5bb9c..0b98752acb80 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java
@@ -35,9 +35,7 @@ public class DesignSpace {
dimProps = new DesignDim[dim];
}
- public DesignDim getDimAt(int index) {
- return dimProps[index];
- }
+
public void setElemAt(DesignDim elem, int index) {
dimProps[index] = elem;
@@ -60,56 +58,26 @@ public class DesignSpace {
}
}
- public void randomAdjust (double[] location){
- for (int i=0; iURL object.
- */
- static public URL parseURL( String sURL, XComponentContext xCtx ) throws java.lang.Exception
- {
- URL[] aURL = new URL[] { new URL() };
- aURL[0].Complete = sURL;
- // need an URLTransformer
- XURLTransformer xTransformer = UnoRuntime.queryInterface(
- XURLTransformer.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.util.URLTransformer", xCtx ) );
- xTransformer.parseStrict( aURL );
- return aURL[0];
- }
+
/* ------------------------------------------------------------------ */
/** returns the name of the given form component
@@ -122,39 +98,7 @@ public class FLTools
return sLabel;
}
- /* ------------------------------------------------------------------ */
- /** retrieves the index of a form component within its parent
- */
- static public int getIndexInParent( Object aContainer, Object aElement ) throws com.sun.star.uno.Exception
- {
- int nIndex = -1;
- // norm the element
- XInterface xElement = UnoRuntime.queryInterface(
- XInterface.class, aElement );
-
- // get the container
- XIndexContainer xIndexCont = UNO.queryIndexContainer( aContainer );
- if ( null != xIndexCont )
- {
- // loop through all children
- int nCount = xIndexCont.getCount();
- for ( int i = 0; i < nCount; ++i )
- {
- // compare with the element
- XInterface xCurrent = UnoRuntime.queryInterface(
- XInterface.class, xIndexCont.getByIndex( 0 ) );
- if ( xCurrent.equals( xElement ) )
- { // found
- nIndex = i;
- break;
- }
- }
- }
-
- // outta here
- return nIndex;
- }
/* ------------------------------------------------------------------ */
/** retrieves the parent of the given object
diff --git a/odk/examples/DevelopersGuide/Forms/FormLayer.java b/odk/examples/DevelopersGuide/Forms/FormLayer.java
index 1bd48667d75b..b582ee4fe701 100644
--- a/odk/examples/DevelopersGuide/Forms/FormLayer.java
+++ b/odk/examples/DevelopersGuide/Forms/FormLayer.java
@@ -43,21 +43,9 @@ public class FormLayer
m_insertPage = -1;
}
- /* ------------------------------------------------------------------ */
- /** sets the page which is to be used for subsequent insertions of controls/shapes
- */
- void setInsertPage( int page )
- {
- m_insertPage = page;
- }
- /* ------------------------------------------------------------------ */
- /** retrieves the page which is to be used for subsequent insertions of controls/shapes
- */
- final int getInsertPage( )
- {
- return m_insertPage;
- }
+
+
/* ------------------------------------------------------------------ */
/** creates a control in the document
diff --git a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
index 29593b04cbae..df2c1b53ec5b 100644
--- a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
+++ b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
@@ -106,25 +106,9 @@ public class HsqlDatabase
return m_connection;
}
- /** executes the given SQL statement via the defaultConnection
- */
- public void executeSQL( String statementString ) throws SQLException
- {
- XStatement statement = defaultConnection().createStatement();
- statement.execute( statementString );
- }
- /** stores the database document
- */
- public void store() throws IOException
- {
- if ( m_databaseDocument != null )
- {
- XStorable storeDoc = UnoRuntime.queryInterface( XStorable.class,
- m_databaseDocument );
- storeDoc.store();
- }
- }
+
+
/** closes the database document
*
@@ -198,12 +182,7 @@ public class HsqlDatabase
return m_databaseDocument.getDataSource();
}
- /** returns the model interface of the underlying database document
- */
- XModel getModel()
- {
- return UnoRuntime.queryInterface( XModel.class, m_databaseDocument );
- }
+
/** returns the URL of the ODB document represented by this instance
*/
@@ -212,12 +191,7 @@ public class HsqlDatabase
return m_databaseDocumentFile;
}
- /** creates a row set operating the database, with a given command/type
- */
- public RowSet createRowSet( int _commandType, String _command )
- {
- return new RowSet( m_context, getDocumentURL(), _commandType, _command );
- }
+
@Override
protected void finalize() throws Throwable
diff --git a/odk/examples/DevelopersGuide/Forms/InteractionRequest.java b/odk/examples/DevelopersGuide/Forms/InteractionRequest.java
index 8239e9410359..e961fc8b8a3a 100644
--- a/odk/examples/DevelopersGuide/Forms/InteractionRequest.java
+++ b/odk/examples/DevelopersGuide/Forms/InteractionRequest.java
@@ -52,12 +52,7 @@ class InteractionRequest implements XInteractionRequest
m_aContinuations = new ArrayList();
}
- /* ------------------------------------------------------------------ */
- public void addContinuation( XInteractionContinuation xCont )
- {
- if ( null != xCont )
- m_aContinuations.add( xCont );
- }
+
/* ------------------------------------------------------------------ */
public Object getRequest( )
diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java
index 21dfb947d048..402ffe2e7fb8 100644
--- a/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java
+++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java
@@ -36,28 +36,5 @@ public class SpreadsheetView extends DocumentViewHelper
super( orb, document, controller );
}
- /** activates the sheet with the given index
- */
- void activateSheet( int sheetIndex )
- {
- try
- {
- // get the sheet to activate
- XSpreadsheetDocument doc = UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, getDocument().getDocument() );
- XIndexAccess sheets = UnoRuntime.queryInterface(
- XIndexAccess.class, doc.getSheets() );
- XSpreadsheet sheet = UnoRuntime.queryInterface(
- XSpreadsheet.class, sheets.getByIndex( sheetIndex ) );
-
- // activate
- XSpreadsheetView view = UnoRuntime.queryInterface(
- XSpreadsheetView.class, getController() );
- view.setActiveSheet( sheet );
- }
- catch( com.sun.star.uno.Exception e )
- {
- }
- }
}
diff --git a/odk/examples/DevelopersGuide/Forms/UNO.java b/odk/examples/DevelopersGuide/Forms/UNO.java
index f777c769cb88..cd292499edc2 100644
--- a/odk/examples/DevelopersGuide/Forms/UNO.java
+++ b/odk/examples/DevelopersGuide/Forms/UNO.java
@@ -73,10 +73,7 @@ public class UNO
return UnoRuntime.queryInterface( XComponent.class, aObject );
}
- public static XTablesSupplier queryTablesSupplier( Object aObject )
- {
- return UnoRuntime.queryInterface( XTablesSupplier.class, aObject );
- }
+
/* replace Foo with the identifier of your choice.
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index 27df9513b953..d332979d2559 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -205,37 +205,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
}
- /**
- * @param _sRegistryPath the path a registryNode
- * @param _sImageName the name of the image
- */
- public String getImageUrl(String _sRegistryPath, String _sImageName) {
- String sImageUrl = "";
- try {
- // retrieve the configuration node of the extension
- XNameAccess xNameAccess = getRegistryKeyContent(_sRegistryPath);
- if (xNameAccess != null){
- if (xNameAccess.hasByName(_sImageName)){
- // get the Image Url and process the Url by the macroexpander...
- sImageUrl = (String) xNameAccess.getByName(_sImageName);
- Object oMacroExpander = this.m_xContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander");
- XMacroExpander xMacroExpander = UnoRuntime.queryInterface(XMacroExpander.class, oMacroExpander);
- sImageUrl = xMacroExpander.expandMacros(sImageUrl);
- sImageUrl = sImageUrl.substring(new String("vnd.sun.star.expand:").length(), sImageUrl.length());
- sImageUrl = sImageUrl.trim();
- sImageUrl += "/" + _sImageName;
- }
- }
- } catch (Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- */
- ex.printStackTrace(System.err);
- }
- return sImageUrl;
- }
+
protected void createDialog(XMultiComponentFactory _xMCF) {
try {
@@ -266,16 +236,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
- public short executeDialogWithembeddedExampleSnippets() {
- if (m_xWindowPeer == null){
- createWindowPeer();
- }
- addRoadmap();
- insertRoadmapItem(0, true, "Introduction", 1);
- insertRoadmapItem(1, true, "Documents", 2);
- xDialog = UnoRuntime.queryInterface(XDialog.class, m_xDialogControl);
- return xDialog.execute();
- }
+
public short executeDialog() {
@@ -329,17 +290,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
}
- public void calculateDialogPosition(XWindow _xWindow) {
- Rectangle aFramePosSize = m_xModel.getCurrentController().getFrame().getComponentWindow().getPosSize();
- Rectangle CurPosSize = _xWindow.getPosSize();
- int WindowHeight = aFramePosSize.Height;
- int WindowWidth = aFramePosSize.Width;
- int DialogWidth = CurPosSize.Width;
- int DialogHeight = CurPosSize.Height;
- int iXPos = ((WindowWidth / 2) - (DialogWidth / 2));
- int iYPos = ((WindowHeight / 2) - (DialogHeight / 2));
- _xWindow.setPosSize(iXPos, iYPos, DialogWidth, DialogHeight, PosSize.POS);
- }
+
@@ -352,23 +303,10 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
return createWindowPeer(null);
}
- public void endExecute() {
- xDialog.endExecute();
- }
- public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) {
- try {
- Object oControlModel = m_xMSFDialogModel.createInstance(ServiceName);
- XMultiPropertySet xControlMultiPropertySet = UnoRuntime.queryInterface(XMultiPropertySet.class, oControlModel);
- xControlMultiPropertySet.setPropertyValues(sProperties, sValues);
- m_xDlgModelNameContainer.insertByName(sName, oControlModel);
- return oControlModel;
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace(System.err);
- return null;
- }
- }
+
+
private XFixedText insertFixedText(XMouseListener _xMouseListener, int _nPosX, int _nPosY, int _nWidth, int _nStep, String _sLabel){
@@ -1094,9 +1032,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
return xFFModelPSet;
}
- public void convertUnits(){
- // iXPixelFactor = (int) (100000/xDevice.getInfo().PixelPerMeterX);
- }
+
private XTextComponent insertFileControl(XTextListener _xTextListener, int _nPosX, int _nPosY, int _nWidth){
@@ -1184,17 +1120,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
return xButton;
}
- /** gets the WindowPeer of a frame
- * @param _xTextDocument the instance of a textdocument
- * @return the windowpeer of the frame
- */
- public XWindowPeer getWindowPeer(XTextDocument _xTextDocument){
- XModel xModel = UnoRuntime.queryInterface(XModel.class, _xTextDocument);
- XFrame xFrame = xModel.getCurrentController().getFrame();
- XWindow xWindow = xFrame.getContainerWindow();
- XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xWindow);
- return xWindowPeer;
- }
+
public XFrame getCurrentFrame(){
XFrame xRetFrame = null;
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu.java b/odk/examples/DevelopersGuide/GUI/UnoMenu.java
index dcedef25482c..5dbb0154484c 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoMenu.java
@@ -152,10 +152,7 @@ public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
return xTopWindow;
}
- public void addMenuBar(XWindow _xWindow){
- XTopWindow xTopWindow = UnoRuntime.queryInterface(XTopWindow.class, _xWindow);
- addMenuBar(xTopWindow, this);
- }
+
public void itemSelected(MenuEvent menuEvent){
// find out which menu item has been triggered,
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
index 44159959398d..7439b31fe898 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
@@ -490,50 +490,7 @@ public class FunctionHelper
- /**
- * Dispatch an URL to given frame.
- * Caller can register himself for following result events for dispatched
- * URL too. Notifications are guaranteed (instead of dispatch())
- * Returning of the dispatch object isn't necessary.
- * Nobody must hold it alive longer the dispatch needs.
- *
- * @param xFrame frame which should be the target of this dispatch
- * @param aURL full parsed and converted office URL for dispatch
- * @param lProperties optional arguments for dispatch
- * @param xListener optional listener which is registered automatically for status events
- * (Note: Deregistration is not supported. Dispatcher does it automatically.)
- */
- public static void executeWithNotification(com.sun.star.frame.XFrame xFrame ,
- com.sun.star.util.URL aURL ,
- com.sun.star.beans.PropertyValue[] lProperties,
- com.sun.star.frame.XDispatchResultListener xListener )
- {
- try
- {
- // Query the frame for right interface which provides access to all available dispatch objects.
- com.sun.star.frame.XDispatchProvider xProvider = UnoRuntime.queryInterface(
- com.sun.star.frame.XDispatchProvider.class,
- xFrame);
- // Ask himn for right dispatch object for given URL.
- // Force THIS frame as target for following dispatch.
- // Attention: The interface XNotifyingDispatch is an optional one!
- com.sun.star.frame.XDispatch xDispatcher = xProvider.queryDispatch(aURL,"",0);
- com.sun.star.frame.XNotifyingDispatch xNotifyingDispatcher = UnoRuntime.queryInterface(
- com.sun.star.frame.XNotifyingDispatch.class,
- xDispatcher);
-
- // Dispatch the URL.
- if(xNotifyingDispatcher!=null)
- xNotifyingDispatcher.dispatchWithNotification(aURL,lProperties,xListener);
- }
- catch(com.sun.star.uno.RuntimeException exUno)
- {
- // Any UNO method of this scope can throw this exception.
- // But there is nothing we can do then.
- exUno.printStackTrace();
- }
- }
@@ -782,78 +739,7 @@ public class FunctionHelper
- /**
- * Try to close the document without any saving of modifications.
- * We can try it only! Controller and/or model of this document
- * can disagree with that. But mostly they doesn't do so.
- *
- * @param xDocument document which should be clcosed
- */
- public static void closeDocument(com.sun.star.lang.XComponent xDocument)
- {
- try
- {
- // Check supported functionality of the document (model or controller).
- com.sun.star.frame.XModel xModel =
- UnoRuntime.queryInterface(
- com.sun.star.frame.XModel.class, xDocument);
- if(xModel!=null)
- {
- // It's a full featured office document.
- // Reset the modify state of it and close it.
- // Note: Model can disgree by throwing a veto exception.
- com.sun.star.util.XModifiable xModify =
- UnoRuntime.queryInterface(
- com.sun.star.util.XModifiable.class, xModel);
-
- xModify.setModified(false);
- xDocument.dispose();
- }
- else
- {
- // It's a document which supports a controller .. or may by a pure
- // window only. If it's at least a controller - we can try to
- // suspend him. But - he can disagree with that!
- com.sun.star.frame.XController xController =
- UnoRuntime.queryInterface(
- com.sun.star.frame.XController.class, xDocument);
-
- if(xController!=null)
- {
- if(xController.suspend(true)==true)
- {
- // Note: Don't dispose the controller - destroy the frame
- // to make it right!
- com.sun.star.frame.XFrame xFrame = xController.getFrame();
- xFrame.dispose();
- }
- }
- }
- }
- catch(com.sun.star.beans.PropertyVetoException exVeto)
- {
- // Can be thrown by "setModified()" call on model.
- // He disagree with our request.
- // But there is nothing to do then. Following "dispose()" call wasn't
- // never called (because we catch it before). Closing failed -that's it.
- exVeto.printStackTrace();
- }
- catch(com.sun.star.lang.DisposedException exDisposed)
- {
- // If an UNO object was already disposed before - he throw this special
- // runtime exception. Of course every UNO call must be look for that -
- // but it's a question of error handling.
- // For demonstration this exception is handled here.
- exDisposed.printStackTrace();
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Every uno call can throw that.
- // Do nothing - closing failed - that's it.
- exRuntime.printStackTrace();
- }
- }
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java
index d6e0563359ef..782a3d2d6d11 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java
@@ -67,18 +67,7 @@ public class OfficeConnect
- /**
- * close connection to remote office if it exist
- */
- public static synchronized void disconnect()
- {
- if(maConnection!=null)
- {
- mxServiceManager=null;
- mxOfficeContext=null;
- maConnection=null;
- }
- }
+
@@ -112,71 +101,9 @@ public class OfficeConnect
- /**
- * create uno components inside remote office process
- * After connection of these process to a running office we have access to
- * remote service manager of it.
- * So we can use it to create all existing services. Use this method to create
- * components by name and get her interface. Casting of it to right target
- * interface is part of your implementation.
- *
- * @param aType describe class type of created service
- * Returned object can be casted directly to this one.
- * Uno query was done by this method automatically.
- * @param sServiceSpecifier name of service which should be created
- * @return the new created service object
- */
- public static synchronized T createRemoteInstance(
- Class aType, String sServiceSpecifier)
- {
- T aResult = null;
- try
- {
- aResult = UnoRuntime.queryInterface(aType,
- mxServiceManager.createInstanceWithContext(
- sServiceSpecifier, mxOfficeContext));
- }
- catch (com.sun.star.uno.Exception ex)
- {
- System.err.println("Couldn't create Service of type "
- + sServiceSpecifier + ": " + ex);
- System.exit(0);
- }
- return aResult;
- }
- /**
- * same as "createRemoteInstance()" but supports additional parameter for
- * initializing created object
- *
- * @param lArguments optional arguments
- * They are used to initialize new created service.
- * @param aType Description of Parameter
- * @param sServiceSpecifier Description of Parameter
- * @return the new create service object
- */
- public static synchronized T createRemoteInstanceWithArguments(
- Class aType, String sServiceSpecifier, Any[] lArguments)
- {
- T aResult = null;
- try
- {
- aResult = UnoRuntime.queryInterface(aType,
- mxServiceManager.createInstanceWithArgumentsAndContext(
- sServiceSpecifier, lArguments, mxOfficeContext));
- }
- catch (com.sun.star.uno.Exception ex)
- {
- System.err.println("Couldn't create Service of type "
- + sServiceSpecifier + ": " + ex);
- System.exit(0);
- }
- return aResult;
- }
-
-
/**
* returns remote component context of the connected office
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java
index c1ab8438467b..45b2d04d04f7 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java
@@ -72,10 +72,7 @@ public class PropChgHelper implements
return xPropSet;
}
- public String[] GetPropNames()
- {
- return aPropNames;
- }
+
public void LaunchEvent( LinguServiceEvent aEvt )
{
diff --git a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
index faecbe5e6513..f49e6a1d314e 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
@@ -71,10 +71,7 @@ public class OfficeConnect
- public static synchronized OfficeConnect getConnection()
- {
- return maConnection;
- }
+
@@ -127,32 +124,7 @@ public class OfficeConnect
- /**
- * same as "createRemoteInstance()" but supports additional parameter for initializing created object
- *
- * @param lArguments optional arguments
- * They are used to initialize new created service.
- * @param aType Description of Parameter
- * @param sServiceSpecifier Description of Parameter
- * @return Description of the Returned Value
- */
- public T createRemoteInstanceWithArguments(Class aType, String sServiceSpecifier, Any[] lArguments)
- {
- T aResult = null;
- try
- {
- aResult = UnoRuntime.queryInterface(
- aType, mxServiceManager.createInstanceWithArgumentsAndContext(
- sServiceSpecifier, lArguments, mxOfficeContext));
- }
- catch (com.sun.star.uno.Exception ex)
- {
- System.err.println("Couldn't create Service of type " + sServiceSpecifier + ": " + ex);
- ex.printStackTrace();
- System.exit(0);
- }
- return aResult;
- }
+
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
index b0092d9d123f..a289359e51b6 100644
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
@@ -274,25 +274,9 @@ class ScriptSelectorPanel extends JPanel {
add(textField, BorderLayout.SOUTH);
}
- public void removeNode(DefaultMutableTreeNode node) {
- MutableTreeNode parent = (MutableTreeNode)(node.getParent());
- if (parent != null) {
- treeModel.removeNodeFromParent(node);
- }
- }
- public void addNode(DefaultMutableTreeNode parent, XBrowseNode xbn) {
- DefaultMutableTreeNode newNode =
- new DefaultMutableTreeNode(xbn) {
- @Override
- public String toString() {
- return ((XBrowseNode)getUserObject()).getName();
- }
- };
- treeModel.insertNodeInto(newNode, parent, parent.getChildCount());
- tree.scrollPathToVisible(new TreePath(newNode.getPath()));
- }
+
private void initNodes(XBrowseNode parent, DefaultMutableTreeNode top) {
if ( parent == null || parent.hasChildNodes() == false )
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
index 109335f3cbea..513bfa1517d4 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
@@ -163,30 +163,9 @@ public class ExampleAddIn
// XExampleAddIn
- public int getIncremented( int nValue )
- {
- return nValue + 1;
- }
- public com.sun.star.sheet.XVolatileResult getCounter(String aName)
- {
- if ( aResults == null )
- {
- // create the table of results, and start a thread to increment
- // all counters
- aResults = new java.util.HashMap();
- ExampleAddInThread aThread = new ExampleAddInThread( aResults );
- aThread.start();
- }
- ExampleAddInResult aResult = aResults.get(aName);
- if ( aResult == null )
- {
- aResult = new ExampleAddInResult(aName);
- aResults.put( aName, aResult );
- }
- return aResult;
- }
+
// XAddIn
diff --git a/odk/examples/java/Inspector/HideableTreeModel.java b/odk/examples/java/Inspector/HideableTreeModel.java
index 7add3d723cd7..6fea28681b7b 100644
--- a/odk/examples/java/Inspector/HideableTreeModel.java
+++ b/odk/examples/java/Inspector/HideableTreeModel.java
@@ -84,9 +84,7 @@ public class HideableTreeModel implements TreeModel {
}
- public void reload() {
- reload(getRoot());
- }
+
private void reload(Object node) {
@@ -101,9 +99,7 @@ public class HideableTreeModel implements TreeModel {
nodeChanged(path.getLastPathComponent());
}
- public void nodeInserted(Object node, Object child) {
- nodeInserted(node, child, -1);
- }
+
public void nodeInserted(Object node, Object child, int index) {
@@ -164,11 +160,7 @@ public class HideableTreeModel implements TreeModel {
}
- public ArrayList getExpandedPaths(JTree tree) {
- ArrayList expandedPaths = new ArrayList();
- addExpandedPaths(tree, tree.getPathForRow(0), expandedPaths);
- return expandedPaths;
- }
+
private void addExpandedPaths(JTree tree, TreePath path, ArrayList pathlist) {
@@ -181,11 +173,7 @@ public class HideableTreeModel implements TreeModel {
}
- public void expandPaths(JTree tree, ArrayList pathlist) {
- for(int i = 0; i < pathlist.size(); i++) {
- tree.expandPath(pathlist.get(i));
- }
- }
+
public boolean isLeaf(Object _oNode) {
@@ -241,23 +229,10 @@ public class HideableTreeModel implements TreeModel {
}
- public boolean isPathToNodeVisible(Object node) {
- Object[] path = getPathToRoot(node);
- for(int i = 0; i < path.length; i++) {
- if(!isNodeVisible(path[i])) {
- return false;
- }
- }
- return true;
- }
- public void ensurePathToNodeVisible(Object node) {
- Object[] path = getPathToRoot(node);
- for(int i = 0; i < path.length; i++) {
- setNodeVisible(path[i], true);
- }
- }
+
+
public Object getChild(Object parent, int index) {
diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java
index a537d9c77941..e28ca5f8a624 100644
--- a/odk/examples/java/Inspector/Inspector.java
+++ b/odk/examples/java/Inspector/Inspector.java
@@ -441,17 +441,6 @@ public class Inspector{
return xFactory;
}
- /**
- * Writes the service information into the given registry key.
- * This method is called by the JavaLoader
- *
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
- return (Factory.writeRegistryServiceInfo(_Inspector.class.getName(), _Inspector.getServiceNames(), regKey)
- && InspectorAddon.__writeRegistryServiceInfo(regKey));
- }
+
}
diff --git a/odk/examples/java/Inspector/Introspector.java b/odk/examples/java/Inspector/Introspector.java
index e3cfc97e47d6..db4c40b2fecb 100644
--- a/odk/examples/java/Inspector/Introspector.java
+++ b/odk/examples/java/Inspector/Introspector.java
@@ -201,15 +201,7 @@ public class Introspector extends WeakBase{
}}
- protected XIdlField[] getFieldsOfType(Type _aType){
- try{
- XIdlClass xIdlClass = mxIdlReflection.forName(_aType.getTypeName());
- return xIdlClass.getFields();
- }
- catch( Exception e ) {
- System.err.println( e );
- return null;
- }}
+
public boolean hasMethods(Object _oUnoObject){
@@ -552,12 +544,7 @@ public class Introspector extends WeakBase{
}
- public static boolean isValid(Object _oObject){
- if (_oObject != null){
- return (!AnyConverter.isVoid(_oObject));
- }
- return false;
- }
+
public static boolean isArray(Object _oObject){
diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java
index edd7c7eb8abb..de41566c6081 100644
--- a/odk/examples/java/Inspector/SourceCodeGenerator.java
+++ b/odk/examples/java/Inspector/SourceCodeGenerator.java
@@ -659,13 +659,7 @@ private class UnoObjectDefinition{
}
- public boolean hasParameterObjects(){
- boolean breturn = false;
- if (m_oParameterObjects != null){
- breturn = m_oParameterObjects.length > 0;
- }
- return breturn;
- }
+
private String getVariableStemName(TypeClass _aTypeClass){
diff --git a/odk/examples/java/Inspector/UnoNode.java b/odk/examples/java/Inspector/UnoNode.java
index 0439554e0108..51e99324ccad 100644
--- a/odk/examples/java/Inspector/UnoNode.java
+++ b/odk/examples/java/Inspector/UnoNode.java
@@ -324,9 +324,7 @@ public class UnoNode{
}
- public static String getNodeDescription(Object _oUnoObject, int _nIndex){
- return getNodeDescription(_oUnoObject) + "[" + (_nIndex + 1) + "]";
- }
+
public static String getNodeDescription(Object _oUnoObject){
diff --git a/odk/examples/java/Inspector/XDialogProvider.java b/odk/examples/java/Inspector/XDialogProvider.java
index e8bfadc1873f..4bcc8e8baf1a 100644
--- a/odk/examples/java/Inspector/XDialogProvider.java
+++ b/odk/examples/java/Inspector/XDialogProvider.java
@@ -56,7 +56,7 @@ public interface XDialogProvider {
public void selectSourceCodeLanguage(int _nLanguage);
- public void paint();
+
// returns one of the constants defined in XLanguageSourceCodeGenerator
public int getLanguage();
diff --git a/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java b/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java
index 630f3d9626c1..6f5f9f46daae 100644
--- a/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java
+++ b/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java
@@ -67,7 +67,7 @@ public interface XLanguageSourceCodeGenerator {
public String getshortTypeDescription();
- public String getunsignedshortTypeDescription();
+
public String getlongTypeDescription();
@@ -85,11 +85,11 @@ public interface XLanguageSourceCodeGenerator {
public String getstringTypeDescription(boolean _bAsHeaderSourceCode);
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode);
+
public String getanyTypeDescription(boolean _bAsHeaderSourceCode);
- public String getArrayDeclaration(String sVariableDeclaration);
+
public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean _bIsArray, TypeClass aTypeClass, boolean _bInitialize);
diff --git a/odk/examples/java/Inspector/XTreePathProvider.java b/odk/examples/java/Inspector/XTreePathProvider.java
index fc29af5eb8c2..37a51b18918d 100644
--- a/odk/examples/java/Inspector/XTreePathProvider.java
+++ b/odk/examples/java/Inspector/XTreePathProvider.java
@@ -26,5 +26,5 @@ public interface XTreePathProvider {
public XTreePathProvider getParentPath();
- public XTreePathProvider pathByAddingChild(XUnoNode _oUnoNode);
+
}
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.java b/odk/examples/java/Spreadsheet/CalcAddins.java
index b044eac50e2a..afe636e13611 100644
--- a/odk/examples/java/Spreadsheet/CalcAddins.java
+++ b/odk/examples/java/Spreadsheet/CalcAddins.java
@@ -90,23 +90,9 @@ public class CalcAddins {
private static final short shortGETMYSECONDVALUE = 1;
-/** TO DO:
- * This is where you implement all methods of your interface. The parameters have to
- * be the same as in your IDL file and their types have to be the correct
- * IDL-to-Java mappings of their types in the IDL file.
- */
- public int getMyFirstValue(
- com.sun.star.beans.XPropertySet xOptions
- ) {
- return 1;
- }
- public int getMySecondValue(
- com.sun.star.beans.XPropertySet xOptions,
- int intDummy
- ) {
- return( 2 + intDummy );
- }
+
+
// Implement method from interface XServiceName
diff --git a/qadevOOo/runner/complexlib/Assurance.java b/qadevOOo/runner/complexlib/Assurance.java
index 74fad940051f..575ec0793f69 100644
--- a/qadevOOo/runner/complexlib/Assurance.java
+++ b/qadevOOo/runner/complexlib/Assurance.java
@@ -55,109 +55,27 @@ public class Assurance
assure(msg, s, false);
}
- /**
- * Assure that two boolean values are equal
- * @param expected specifies the expected boolean value
- * @param actual specifies the actual boolean value
- */
- protected void assureEquals( boolean expected, boolean actual ) {
- assureEquals( "Equality test failed", expected, new Boolean( actual ), false );
- }
- /**
- * Assure that two boolean values are equal
- * @param message the message to print when the equality test fails
- * @param expected specifies the expected boolean value
- * @param actual specifies the actual boolean value
- */
- protected void assureEquals( String message, boolean expected, boolean actual ) {
- assureEquals( message, expected, actual, false );
- }
- /**
- * Assure that two byte values are equal
- * @param expected specifies the expected byte value
- * @param actual specifies the actual byte value
- */
- protected void assureEquals( byte expected, byte actual ) {
- assureEquals( "Equality test failed", new Byte( expected ), new Byte( actual ), false );
- }
- /**
- * Assure that two byte values are equal
- * @param message the message to print when the equality test fails
- * @param expected specifies the expected byte value
- * @param actual specifies the actual byte value
- */
- protected void assureEquals( String message, byte expected, byte actual ) {
- assureEquals( message, new Byte( expected ), new Byte( actual ), false );
- }
- /**
- * Assure that two double values are equal
- * @param expected specifies the expected double value
- * @param actual specifies the actual double value
- */
- protected void assureEquals( double expected, double actual ) {
- assureEquals( "Equality test failed", new Double( expected ), new Double( actual ), false );
- }
- /**
- * Assure that two double values are equal
- * @param message the message to print when the equality test fails
- * @param expected specifies the expected double value
- * @param actual specifies the actual double value
- */
- protected void assureEquals( String message, double expected, double actual ) {
- assureEquals( message, new Double( expected ), new Double( actual ), false );
- }
- /**
- * Assure that two float values are equal
- * @param expected specifies the expected float value
- * @param actual specifies the actual float value
- */
- protected void assureEquals( float expected, float actual ) {
- assureEquals( "Equality test failed", new Float( expected ), new Float( actual ), false );
- }
- /**
- * Assure that two float values are equal
- * @param message the message to print when the equality test fails
- * @param expected specifies the expected float value
- * @param actual specifies the actual float value
- */
- protected void assureEquals( String message, float expected, float actual ) {
- assureEquals( message, new Float( expected ), new Float( actual ), false );
- }
- /**
- * Assure that two short values are equal
- * @param expected specifies the expected short value
- * @param actual specifies the actual short value
- */
- protected void assureEquals( short expected, short actual ) {
- assureEquals( "Equality test failed", new Short( expected ), new Short( actual ), false );
- }
- /**
- * Assure that two short values are equal
- * @param message the message to print when the equality test fails
- * @param expected specifies the expected short value
- * @param actual specifies the actual short value
- */
- protected void assureEquals( String message, short expected, short actual ) {
- assureEquals( message, new Short( expected ), new Short( actual ), false );
- }
- /**
- * Assure that two int values are equal
- * @param expected specifies the expected int value
- * @param actual specifies the actual int value
- */
- protected void assureEquals( int expected, int actual ) {
- assureEquals( "Equality test failed", new Integer( expected ), new Integer( actual ), false );
- }
+
+
+
+
+
+
+
+
+
+
+
/**
* Assure that two int values are equal
@@ -169,33 +87,11 @@ public class Assurance
assureEquals( message, new Integer( expected ), new Integer( actual ), false );
}
- /**
- * Assure that two long values are equal
- * @param expected specifies the expected long value
- * @param actual specifies the actual long value
- */
- protected void assureEquals( long expected, long actual ) {
- assureEquals( "Equality test failed", new Long( expected ), new Long( actual ), false );
- }
- /**
- * Assure that two long values are equal
- * @param message the message to print when the equality test fails
- * @param expected specifies the expected long value
- * @param actual specifies the actual long value
- */
- protected void assureEquals( String message, long expected, long actual ) {
- assureEquals( message, new Long( expected ), new Long( actual ), false );
- }
- /**
- * Assure that two string values are equal
- * @param expected specifies the expected string value
- * @param actual specifies the actual string value
- */
- protected void assureEquals( String expected, String actual ) {
- assureEquals( "Equality test failed", expected, actual, false );
- }
+
+
+
/**
* Assure that two string values are equal
@@ -207,24 +103,9 @@ public class Assurance
assureEquals( message, expected, actual, false );
}
- /**
- * Assure that two object are equal
- * @param expected specifies the expected object value
- * @param actual specifies the actual object value
- */
- protected void assureEquals( Object expected, Object actual ) {
- assureEquals( "Equality test failed", expected, actual, false );
- }
- /**
- * Assure that two objects are equal
- * @param message the message to print when the equality test fails
- * @param expected specifies the expected object value
- * @param actual specifies the actual object value
- */
- protected void assureEquals( String message, Object expected, Object actual ) {
- assureEquals( message, expected, actual, false );
- }
+
+
/**
* assures the two given sequences are of equal length, and have equal content
@@ -239,13 +120,7 @@ public class Assurance
}
}
- /**
- * assures the two given sequences are of equal length, and have equal content
- */
- public void assureEquals( String i_message, T[] i_expected, T[] i_actual )
- {
- assureEquals( i_message, i_expected, i_actual, false );
- }
+
/** invokes a given method on a given object, and assures a certain exception is caught
* @param _message is the message to print when the check fails
@@ -301,49 +176,11 @@ public class Assurance
assureException( _message, _object, _methodName, argClasses, _methodArgs, _expectedExceptionClass );
}
- /** invokes a given method on a given object, and assures a certain exception is caught
- * @param _object is the object to invoke the method on
- * @param _methodName is the name of the method to invoke
- * @param _methodArgs are the arguments to pass to the method. Those implicitly define
- * the classes of the arguments of the method which is called.
- * @param _expectedExceptionClass is the class of the exception to be caught. If this is null,
- * it means that no exception must be throw by invoking the method.
- */
- protected void assureException( final Object _object, final String _methodName, final Object[] _methodArgs,
- final Class> _expectedExceptionClass )
- {
- assureException(
- "did not catch the expected exception (" +
- ( ( _expectedExceptionClass == null ) ? "none" : _expectedExceptionClass.getName() ) +
- ") while calling " + _object.getClass().getName() + "." + _methodName,
- _object, _methodName, _methodArgs, _expectedExceptionClass );
- }
- /** invokes a given method on a given object, and assures a certain exception is caught
- * @param _object is the object to invoke the method on
- * @param _methodName is the name of the method to invoke
- * @param _methodArgs are the arguments to pass to the method
- * @param _argClasses are the classes to assume for the arguments of the methods
- * @param _expectedExceptionClass is the class of the exception to be caught. If this is null,
- * it means that no exception must be throw by invoking the method.
- */
- protected void assureException( final Object _object, final String _methodName, final Class>[] _argClasses,
- final Object[] _methodArgs, final Class> _expectedExceptionClass )
- {
- assureException(
- "did not catch the expected exception (" +
- ( ( _expectedExceptionClass == null ) ? "none" : _expectedExceptionClass.getName() ) +
- ") while calling " + _object.getClass().getName() + "." + _methodName,
- _object, _methodName, _argClasses, _methodArgs, _expectedExceptionClass );
- }
- /**
- * Mark the currently executed method as failed.
- * This function generates "Test did fail." as standard message.
- */
- protected void failed() {
- assure("Test did fail.", false, false);
- }
+
+
+
/**
* Mark the currently executed method as failed.
diff --git a/qadevOOo/runner/convwatch/DBHelper.java b/qadevOOo/runner/convwatch/DBHelper.java
index 12b2651613b0..e6381f027ccf 100644
--- a/qadevOOo/runner/convwatch/DBHelper.java
+++ b/qadevOOo/runner/convwatch/DBHelper.java
@@ -188,44 +188,7 @@ public class DBHelper
aSQLThread.start();
}
- public int QueryIntFromSQL(Connection _aCon, String _sSQL, String _sColumnName)
- throws ValueNotFoundException
- {
- Statement oStmt = null;
- int nValue = 0;
- try
- {
- oStmt = _aCon.createStatement();
- ResultSet oResult = oStmt.executeQuery(_sSQL);
- oResult.next();
-
- try
- {
- if (_sColumnName.length() == 0)
- {
- // take the first row value (started with 1)
- nValue = oResult.getInt(1);
- }
- else
- {
- nValue = oResult.getInt(_sColumnName);
- }
- }
- catch (SQLException e)
- {
- String sError = e.getMessage();
- GlobalLogWriter.get().println("DB: Original SQL error: " + sError);
- throw new ValueNotFoundException("Can't execute SQL: " + _sSQL);
- }
- }
- catch(SQLException e)
- {
- String sError = e.getMessage();
- GlobalLogWriter.get().println("DB: Couldn't execute sql string " + _sSQL + "\n" + sError);
- }
- return nValue;
- }
public String Quote(String _sToQuote)
{
diff --git a/qadevOOo/runner/convwatch/DirectoryHelper.java b/qadevOOo/runner/convwatch/DirectoryHelper.java
index ac0b94de12c7..ee338d3e09d5 100644
--- a/qadevOOo/runner/convwatch/DirectoryHelper.java
+++ b/qadevOOo/runner/convwatch/DirectoryHelper.java
@@ -71,13 +71,7 @@ public class DirectoryHelper
return a.m_aFileList.toArray();
}
- public static Object[] traverse( String _sDirectory, boolean _bRecursiveIsAllowed )
- {
- DirectoryHelper a = new DirectoryHelper();
- a.setRecursiveIsAllowed(_bRecursiveIsAllowed);
- a.traverse_impl(_sDirectory, null);
- return a.m_aFileList.toArray();
- }
+
private void traverse_impl( String afileDirectory, FileFilter _aFileFilter )
{
diff --git a/qadevOOo/runner/convwatch/FileHelper.java b/qadevOOo/runner/convwatch/FileHelper.java
index 221be5fa74be..3cf88eb267b4 100644
--- a/qadevOOo/runner/convwatch/FileHelper.java
+++ b/qadevOOo/runner/convwatch/FileHelper.java
@@ -39,12 +39,7 @@ public class FileHelper
}
- public static void MessageBox(String _sStr)
- {
- String sVersion = System.getProperty("java.version");
- String sOSName = System.getProperty("os.name");
- JOptionPane.showMessageDialog( null, _sStr, sVersion + " " + sOSName + " Hello World Debugger", JOptionPane.INFORMATION_MESSAGE );
- }
+
public static boolean exists(String _sFile)
{
diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java
index 9d2919fcaf95..bc64b148ee62 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -175,13 +175,7 @@ abstract class FilenameHelper_impl implements Filenamer
return FileHelper.isDir(getSystemPath());
}
- /**
- * @return true, if the file really exist.
- */
- public boolean exists()
- {
- return FileHelper.exists(createAbsoluteFilename());
- }
+
/**
* @return the current suffix
diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
index 0f8182b998c7..23e975815837 100644
--- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
+++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
@@ -191,16 +191,7 @@ public class GraphicalDifferenceCheck
return bOk;
}
- /**
- * Used for the comparance of graphical differences.
- * Method compares one document (_sInputFile) with an older document of the same name in the provided directory (_sReferencePath).
- *
- * The path _sOutputPath must be writeable
- */
- public static boolean checkOneFile(String _sInputFile, String _sOutputPath, String _sReferencePath, GraphicalTestArguments _aGTA) throws ConvWatchException
- {
- return checkOneFile( _sInputFile, _sOutputPath, _sReferencePath, null, _aGTA);
- }
+
/**
diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java
index 6425ec96816b..087101c97576 100644
--- a/qadevOOo/runner/convwatch/HTMLOutputter.java
+++ b/qadevOOo/runner/convwatch/HTMLOutputter.java
@@ -206,168 +206,13 @@ public class HTMLOutputter
private final static String DIFFER_BM_TABLETITLE = "Diff file (RB)";
private final static String OK_TABLETITLE = "OK?";
- public void checkSection(String _sDocumentName)
- {
- try
- {
- m_aOut.write( "
Results for the document " + _sDocumentName + "
" + ls);
-
- m_aOut.write( "
Legend: ");
- m_aOut.write( stronghtml(FIRSTGFX_TABLETITLE) + " contains the output printed via 'ghostscript' as a jpeg picture. ");
- m_aOut.write( stronghtml(SECONDGFX_TABLETITLE) + " contains the same document opened within OpenOffice.org also printed via ghostscript as jpeg. ");
- m_aOut.write( stronghtml(DIFFER_TABLETITLE)+" is build via composite from original and new picture. The result should be a whole black picture, if there are no differences. At the moment "+stronghtml(STATUS_TABLETITLE)+" is only ok, if the difference file contains only one color (black).
" );
- m_aOut.write( stronghtml(DIFFER_BM_TABLETITLE) + " is build via composite from original and new picture after the border of both pictures are removed, so differences based on center problems may solved here");
- m_aOut.write( "
");
- m_aOut.write( "
Some words about the percentage value ");
- m_aOut.write( "If a character is on the original page (a) and on the new page this character is moved to an other position only (b) , this means the difference is 100%. ");
- m_aOut.write( "If character (b) is also bigger than character (a) the percentage is grow over the 100% mark. ");
- m_aOut.write( "This tool count only the pixels which are differ to it's background color. It makes no sense to count all pixels, or the difference percentage will most the time in a very low percentage range.");
- m_aOut.write( "
" + ls);
- // the link to the old difference can't offer here
-
- String sBasename = FileHelper.getBasename(m_sFilename);
- String sNew = sBasename.substring(m_sNamePrefix.length());
-
- String sLink;
- sLink = getHREF(sNew, sNew);
- m_aOut.write( tableDataCell(sLink) );
-
- sLink = getHREF(FileHelper.getBasename(_aStatus.m_sNewGfx), FileHelper.getBasename(_aStatus.m_sNewGfx));
- m_aOut.write( tableDataCell(sLink) );
-
- sLink = getHREF(FileHelper.getBasename(_aStatus.m_sDiffGfx), FileHelper.getBasename(_aStatus.m_sDiffGfx));
- m_aOut.write( tableDataCell(sLink) );
-
- String sPercent = String.valueOf(_aStatus.nPercent) + "%";
- m_aOut.write(tableDataCell( sPercent ) );
-
- // is the check positiv, in a defined range
- if (_bCurrentResult)
- {
- m_aOut.write(tableDataCell( "YES" ) );
- }
- else
- {
- m_aOut.write(tableDataCell( "NO" ) );
- }
-
- m_aOut.write( "
" + ls);
- }
- catch (java.io.IOException e)
- {
- }
- }
}
diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java
index 673b8789be46..3c9745fbe198 100644
--- a/qadevOOo/runner/convwatch/INIOutputter.java
+++ b/qadevOOo/runner/convwatch/INIOutputter.java
@@ -98,10 +98,7 @@ public class INIOutputter
}
}
- public void startSection(int _nNumber)
- {
- writeSection( "page" + String.valueOf(_nNumber));
- }
+
public void close()
{
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index 1b3f46942dc5..dc3b55a50774 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -267,91 +267,10 @@ class IniFile
return sValue;
}
- /**
- write back the ini file to the disk, only if there exist changes
- */
- public void store()
- {
- if (m_bListContainUnsavedChanges == false)
- {
- // nothing has changed, so no need to store
- return;
- }
-
- File aFile = new File(m_sFilename);
- if (aFile.exists())
- {
- aFile.delete();
- if (aFile.exists())
- {
- GlobalLogWriter.get().println("Couldn't delete the file " + m_sFilename);
- return;
- }
- }
- try
- {
- RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw");
- for (int i=0; i> 16) & 0xff;
- int green = (rgba >> 8) & 0xff;
- int blue = rgba & 0xff;
- int alpha = (rgba >> 24) & 0xff;
-// (2) now modify red, green, blue and alpha as you like;
-// make sure that each of the four values stays in the
-// interval 0 to 255
-// ...
-// (3) and encode back to an int, e.g. to give it to MemoryImageSource or
-// BufferedImage.setRGB
- rgba = (alpha << 24) | (red << 16) | (green << 8) | blue;
- return 0;
- }
+
private static void countPixel(ImageHelper img, int _w, int _h, CountPixel _aPixelCounter)
{
diff --git a/qadevOOo/runner/graphical/BuildID.java b/qadevOOo/runner/graphical/BuildID.java
index 2a83aa9ce2c3..1e08fb8c20bc 100644
--- a/qadevOOo/runner/graphical/BuildID.java
+++ b/qadevOOo/runner/graphical/BuildID.java
@@ -139,25 +139,8 @@ public class BuildID
return sBuildID;
}
- public static String getMinor(String _sOfficePath)
- {
- final String sOfficePath = getOfficePath(_sOfficePath);
- final String sMinor = "m" + getBuildID(sOfficePath, "ProductMinor");
- return sMinor;
- }
- public static String getCWSName(String _sOfficePath)
- {
- final String sOfficePath = getOfficePath(_sOfficePath);
- final String sBuildID = getBuildID(sOfficePath, "buildid");
- String sCWSName = "MWS";
- int nIdx = sBuildID.indexOf("[CWS:");
- if (nIdx > 0)
- {
- int nIdx2 = sBuildID.indexOf("]", nIdx);
- sCWSName = sBuildID.substring(nIdx + 5, nIdx2);
- }
- return sCWSName;
- }
+
+
}
diff --git a/qadevOOo/runner/graphical/DirectoryHelper.java b/qadevOOo/runner/graphical/DirectoryHelper.java
index a52add895a0b..2acb91154ae8 100644
--- a/qadevOOo/runner/graphical/DirectoryHelper.java
+++ b/qadevOOo/runner/graphical/DirectoryHelper.java
@@ -72,13 +72,7 @@ public class DirectoryHelper
return a.m_aFileList.toArray();
}
- public static Object[] traverse( String _sDirectory, boolean _bRecursiveIsAllowed )
- {
- DirectoryHelper a = new DirectoryHelper();
- a.setRecursiveIsAllowed(_bRecursiveIsAllowed);
- a.traverse_impl(_sDirectory, null);
- return a.m_aFileList.toArray();
- }
+
private void traverse_impl( String afileDirectory, FileFilter _aFileFilter )
{
diff --git a/qadevOOo/runner/graphical/FileHelper.java b/qadevOOo/runner/graphical/FileHelper.java
index bee04eb64622..440e6273743a 100644
--- a/qadevOOo/runner/graphical/FileHelper.java
+++ b/qadevOOo/runner/graphical/FileHelper.java
@@ -44,12 +44,7 @@ public class FileHelper
}
- public static void MessageBox(String _sStr)
- {
- String sVersion = System.getProperty("java.version");
- String sOSName = System.getProperty("os.name");
- JOptionPane.showMessageDialog( null, _sStr, sVersion + " " + sOSName + " Hello World Debugger", JOptionPane.INFORMATION_MESSAGE );
- }
+
public static boolean exists(String _sFile)
{
@@ -66,27 +61,7 @@ public class FileHelper
return false;
}
- public static boolean isDir(String _sDir)
- {
- if (_sDir == null)
- {
- return false;
- }
- try
- {
- File aFile = new File(_sDir);
- if (aFile.exists() && aFile.isDirectory())
- {
- return true;
- }
- }
- catch (NullPointerException e)
- {
- GlobalLogWriter.println("Exception caught. FileHelper.isDir('" + _sDir + "')");
- e.printStackTrace();
- }
- return false;
- }
+
public static String getBasename(String _sFilename)
{
@@ -456,33 +431,7 @@ public class FileHelper
};
return aFileFilter;
}
- /**
- * Within the directory run through, it's possible to say which file extension types should not
- * consider like '*.ini' because it's not a document.
- *
- * @return a FileFilter function
- */
- public static FileFilter getFileFilterINI()
- {
- FileFilter aFileFilter = new FileFilter()
- {
- public boolean accept( File pathname )
- {
- String sPathname = pathname.getName().toLowerCase();
- if (sPathname.endsWith("index.ini"))
- {
- // don't consider the index.ini file
- return false;
- }
- if (sPathname.endsWith(".ini"))
- {
- return true;
- }
- return false;
- }
- };
- return aFileFilter;
- }
+
public static String appendPath(String _sPath, String _sRelativePathToAdd)
{
@@ -616,12 +565,6 @@ public class FileHelper
aIniFile.close();
}
- public static void addBasenameToPostscript(String _sOutputFilename)
- {
- String sIndexFilename = FileHelper.appendPath(_sOutputFilename, "postscript.ini");
- String sBasename = FileHelper.getBasename(_sOutputFilename);
- addBasenameToFile(sIndexFilename, sBasename, "", "", "");
- }
public static void addBasenameToIndex(String _sOutputFilename, String _sBasename, String _sCreator, String _sType, String _sSource)
{
String sIndexFilename = FileHelper.appendPath(_sOutputFilename, "index.ini");
diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java
index b2508b173c38..326365adb832 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -409,10 +409,7 @@ public class IniFile implements Enumeration
insertValue(_sSection, _sKey, String.valueOf(_nValue));
}
- public void insertValue(String _sSection, String _sKey, long _nValue)
- {
- insertValue(_sSection, _sKey, String.valueOf(_nValue));
- }
+
/**
insert a value
diff --git a/qadevOOo/runner/graphical/JPEGCreator.java b/qadevOOo/runner/graphical/JPEGCreator.java
index 6d9c5c698d37..c33b09632850 100644
--- a/qadevOOo/runner/graphical/JPEGCreator.java
+++ b/qadevOOo/runner/graphical/JPEGCreator.java
@@ -31,17 +31,7 @@ public class JPEGCreator extends EnhancedComplexTestCase
return new String[]{"PostscriptOrPDFToJPEG"};
}
- /**
- * test function.
- */
- public void PostscriptOrPDFToJPEG()
- {
- GlobalLogWriter.set(log);
- ParameterHelper aParam = new ParameterHelper(param);
- // run through all documents found in Inputpath
- foreachPSorPDFinInputPath(aParam);
- }
public void checkOneFile(String _sDocumentName, String _sResult, ParameterHelper _aParams) throws OfficeException
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index 2132297f893d..13db6222dbee 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
@@ -162,57 +162,7 @@ public class MSOfficePostscriptCreator implements IOffice
return false;
}
- public void storeToFileWithMSOffice( ParameterHelper _aGTA,
- String _sInputFile,
- String _sOutputFile) throws OfficeException, java.io.IOException
- {
- String sDocumentSuffix = FileHelper.getSuffix(_sInputFile);
- String sFilterName = _aGTA.getExportFilterName();
- ArrayList aStartCommand = new ArrayList();
- if (isWordDocument(sDocumentSuffix))
- {
- aStartCommand = createWordStoreHelper();
- }
- else if (isExcelDocument(sDocumentSuffix))
- {
- aStartCommand = createExcelStoreHelper();
- }
- else if (isPowerPointDocument(sDocumentSuffix))
- {
- }
- else if (sDocumentSuffix.toLowerCase().equals(".xml"))
- {
- // special case, if xml we prefer word, but with DEFAULT_XML_FORMAT_APP=excel it's changeable.
- String sDocFormat = getXMLDocumentFormat(_sInputFile);
- if (sDocFormat.equals("excel"))
- {
- aStartCommand = createExcelStoreHelper();
- }
- else
- {
- aStartCommand = createWordStoreHelper();
- }
- }
- else
- {
- GlobalLogWriter.println("No Microsoft Office document format found.");
- throw new WrongSuffixException("No MS office document format found.");
- }
- if (aStartCommand != null)
- {
- if (sFilterName == null)
- {
-// TODO: hardcoded FilterName in perl script
- sFilterName = ""; // xlXMLSpreadsheet";
- }
-
- aStartCommand.add(_sInputFile);
- aStartCommand.add(sFilterName);
- aStartCommand.add(_sOutputFile);
- realStartCommand(aStartCommand);
- }
- }
/**
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 4408b527a1f6..126c3b78b20a 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -576,74 +576,12 @@ public class OpenOfficePostscriptCreator implements IOffice
}
- /**
- * @return true, if the reference (*.prrn file) based on given output path and given input path exist.
- * If OVERWRITE_REFERENCE is set, always return false.
- */
- public boolean isReferenceExists(ParameterHelper _aGTA,
- String _sAbsoluteOutputPath,
- String _sAbsoluteInputFile)
- {
- if (! FileHelper.exists(_sAbsoluteInputFile))
- {
- return false;
- }
- String sInputFileBasename = FileHelper.getBasename(_sAbsoluteInputFile);
- String sOutputPath;
- if (_sAbsoluteOutputPath != null)
- {
- sOutputPath = _sAbsoluteOutputPath;
- }
- else
- {
- String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
- sOutputPath = sInputPath;
- }
-
- String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
-
- String sAbsolutePrintFilename = FileHelper.appendPath(sOutputPath, sPrintFilename + ".prn");
- if (FileHelper.exists(sAbsolutePrintFilename) && _aGTA.getOverwrite() == false)
- {
- GlobalLogWriter.println("Reference already exist, don't overwrite. Set " + PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE + "=true to force overwrite.");
- return true;
- }
- return false;
- }
// TODO: move this away!
- void showType(String _sInputURL, XMultiServiceFactory _xMSF)
- {
- if (_sInputURL.length() == 0)
- {
- return;
- }
- if (_xMSF == null)
- {
- GlobalLogWriter.println("MultiServiceFactory not set.");
- return;
- }
- XTypeDetection aTypeDetection = null;
- try
- {
- Object oObj = _xMSF.createInstance("com.sun.star.document.TypeDetection");
- aTypeDetection = UnoRuntime.queryInterface(XTypeDetection.class, oObj);
- }
- catch(com.sun.star.uno.Exception e)
- {
- GlobalLogWriter.println("Can't get com.sun.star.document.TypeDetection.");
- return;
- }
- if (aTypeDetection != null)
- {
- String sType = aTypeDetection.queryTypeByURL(_sInputURL);
- GlobalLogWriter.println("Type is: " + sType);
- }
- }
@@ -875,133 +813,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
- public void convertDocument(String _sInputFile, String _sOutputPath, ParameterHelper _aGTA)
- {
- XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory();
- if (xMSF == null)
- {
- GlobalLogWriter.println("MultiServiceFactory in GraphicalTestArgument not set.");
- return;
- }
- String sInputURL = URLHelper.getFileURLFromSystemPath(_sInputFile);
- XComponent aDoc = loadFromURL( _aGTA, sInputURL);
- if (aDoc == null)
- {
- GlobalLogWriter.println("Can't load document '"+ sInputURL + "'");
- return;
- }
-
- if (_sOutputPath == null)
- {
- GlobalLogWriter.println("Outputpath not set.");
- return;
- }
-
- if (! isStoreAllowed())
- {
- GlobalLogWriter.println("It's not allowed to store, check Input/Output path.");
- return;
- }
-
- XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, aDoc );
-
- // store the document in an other directory
- XStorable xStorable = UnoRuntime.queryInterface( XStorable.class, aDoc);
- if (xStorable == null)
- {
- GlobalLogWriter.println("com.sun.star.frame.XStorable is null");
- return;
- }
-
- String sFilterName = _aGTA.getExportFilterName();
-
- ArrayList aPropertyList = new ArrayList();
-
- String sExtension = "";
-
- if (sFilterName != null && sFilterName.length() > 0)
- {
- String sInternalFilterName = getInternalFilterName(sFilterName, xMSF);
- String sServiceName = getServiceNameFromFilterName(sFilterName, xMSF);
-
- GlobalLogWriter.println("Filter detection:");
- // check if service name from file filter is the same as from the loaded document
- boolean bServiceFailed = false;
- if (sServiceName == null || sInternalFilterName == null)
- {
- GlobalLogWriter.println("Given FilterName '" + sFilterName + "' seems to be unknown.");
- bServiceFailed = true;
- }
- if (! xServiceInfo.supportsService(sServiceName))
- {
- GlobalLogWriter.println("Service from FilterName '" + sServiceName + "' is not supported by loaded document.");
- bServiceFailed = true;
- }
- if (bServiceFailed == true)
- {
- GlobalLogWriter.println("Please check '" + PropertyName.DOC_CONVERTER_EXPORT_FILTER_NAME + "' in the property file.");
- return;
- }
-
- if (sInternalFilterName != null && sInternalFilterName.length() > 0)
- {
- // get the FileExtension, by the filter name, if we don't get a file extension
- // we assume the is also no right filter name.
- sExtension = getFileExtension(sInternalFilterName, xMSF);
- if (sExtension == null)
- {
- GlobalLogWriter.println("Can't found an extension for filtername, take it from the source.");
- }
- }
-
- PropertyValue Arg = new PropertyValue();
- Arg.Name = "FilterName";
- Arg.Value = sFilterName;
- aPropertyList.add(Arg);
- showProperty(Arg);
- GlobalLogWriter.println("FilterName is set to: " + sFilterName);
- }
-
- String sOutputURL = "";
- try
- {
- // create the new filename with the extension, which is ok to the file format
- String sInputFileBasename = FileHelper.getBasename(_sInputFile);
- String sInputFileNameNoSuffix = FileHelper.getNameNoSuffix(sInputFileBasename);
- String fs = System.getProperty("file.separator");
- String sOutputFile = _sOutputPath;
- if (! sOutputFile.endsWith(fs))
- {
- sOutputFile += fs;
- }
- if (sExtension != null && sExtension.length() > 0)
- {
- sOutputFile += sInputFileNameNoSuffix + "." + sExtension;
- }
- else
- {
- sOutputFile += sInputFileBasename;
- }
-
- if (FileHelper.exists(sOutputFile) && _aGTA.getOverwrite() == false)
- {
- GlobalLogWriter.println("File already exist, don't overwrite. Set " + PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE + "=true to force overwrite.");
- return;
- }
-
- sOutputURL = URLHelper.getFileURLFromSystemPath(sOutputFile);
-
- GlobalLogWriter.println("Store document as '" + sOutputURL + "'");
- xStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
- GlobalLogWriter.println("Document stored.");
- }
- catch (com.sun.star.io.IOException e)
- {
- GlobalLogWriter.println("Can't store document '" + sOutputURL + "'. Message is :'" + e.getMessage() + "'");
- }
-
- }
private OfficeProvider m_aProvider = null;
private void startOffice()
@@ -1041,12 +853,8 @@ public class OpenOfficePostscriptCreator implements IOffice
}
}
- public void disallowStore()
- {
- }
- public void allowStore()
- {
- }
+
+
public boolean isStoreAllowed()
{
return false;
diff --git a/qadevOOo/runner/graphical/PixelCounter.java b/qadevOOo/runner/graphical/PixelCounter.java
index 0807b26cbdeb..b0b9e41d7e66 100644
--- a/qadevOOo/runner/graphical/PixelCounter.java
+++ b/qadevOOo/runner/graphical/PixelCounter.java
@@ -34,19 +34,7 @@ class CountNotWhite extends CountPixel
{
}
- public void countold(final int pixel)
- {
- // final int alpha = (pixel >> 24) & 0xff;
- final int red = (pixel >> 16) & 0xff;
- final int green = (pixel >> 8) & 0xff;
- final int blue = (pixel ) & 0xff;
- if (red == 0xff && green == 0xff && blue == 0xff)
- {
- return;
- }
- ++m_nCount;
- }
@Override
public void count(final int pixel)
{
@@ -79,19 +67,7 @@ class CountNotBlack extends CountPixel
{
}
- public void countold(final int pixel)
- {
- // final int alpha = (pixel >> 24) & 0xff;
- final int red = (pixel >> 16) & 0xff;
- final int green = (pixel >> 8) & 0xff;
- final int blue = (pixel ) & 0xff;
- if (red == 0x00 && green == 0x00 && blue == 0x00)
- {
- return;
- }
- ++m_nCount;
- }
@Override
public void count(final int pixel)
{
diff --git a/qadevOOo/runner/helper/ConfigHelper.java b/qadevOOo/runner/helper/ConfigHelper.java
index 3d62291baa00..f6029bc0e8a0 100644
--- a/qadevOOo/runner/helper/ConfigHelper.java
+++ b/qadevOOo/runner/helper/ConfigHelper.java
@@ -181,28 +181,10 @@ public class ConfigHelper
}
- public static Object readDirectKey(XMultiServiceFactory xSMGR ,
- String sConfigFile,
- String sRelPath ,
- String sKey )
- throws com.sun.star.uno.Exception
- {
- ConfigHelper aConfig = new ConfigHelper(xSMGR, sConfigFile, true);
- return aConfig.readRelativeKey(sRelPath, sKey);
- }
- public static void writeDirectKey(XMultiServiceFactory xSMGR ,
- String sConfigFile,
- String sRelPath ,
- String sKey ,
- Object aValue )
- throws com.sun.star.uno.Exception
- {
- ConfigHelper aConfig = new ConfigHelper(xSMGR, sConfigFile, false);
- aConfig.writeRelativeKey(sRelPath, sKey, aValue);
- aConfig.flush();
- }
+
+
/**
diff --git a/qadevOOo/runner/helper/ConfigurationRead.java b/qadevOOo/runner/helper/ConfigurationRead.java
index bde788a5e687..e698d47104f3 100644
--- a/qadevOOo/runner/helper/ConfigurationRead.java
+++ b/qadevOOo/runner/helper/ConfigurationRead.java
@@ -71,14 +71,7 @@ public class ConfigurationRead {
this(xMSF, "org.openoffice.Setup");
}
- /**
- * Does the node with this hierarchical name exist?
- * @param name The hierarchical name of a subnode.
- * @return True, if the node exists.
- */
- public boolean hasByHieracrhicalName(String name) {
- return root.hasByHierarchicalName(name);
- }
+
/**
@@ -91,28 +84,7 @@ public class ConfigurationRead {
return names;
}
- /**
- * Get all elements of this node
- * @param name The name of the node
- * @return All elements of this node (as hierarchical names).
- */
- public String[] getSubNodeNames(String name) {
- String[]names = null;
- try {
- Object next = root.getByHierarchicalName(name);
- XNameAccess x = UnoRuntime.queryInterface(
- XNameAccess.class, next);
- names = x.getElementNames();
- for (int i=0; i< names.length; i++) {
- names[i] = name + "/" + names[i];
- }
- }
- catch(Exception e) {
- //just return null, if there are no further nodes
- }
- return names;
- }
/**
* Get contents of a node by its hierarchical name.
diff --git a/qadevOOo/runner/helper/FileTools.java b/qadevOOo/runner/helper/FileTools.java
index 8a859183ebf6..cede7c46059d 100644
--- a/qadevOOo/runner/helper/FileTools.java
+++ b/qadevOOo/runner/helper/FileTools.java
@@ -92,19 +92,7 @@ public class FileTools {
in.close();
out.close();
}
- /**
- * Deletes all files and subdirectories under dir and the directory itself.
- * Returns true if all deletions were successful.
- * If the deletion fails, the method the method continues to delete rest
- * of the files and returns false.
- * @return Returns true if all deletions were successful, else false.
- * @param dir the directory to delete
- */
- public static boolean deleteDir(File dir) {
- // The directory is now empty so delete it
- return cleanDir(dir);
- }
public static boolean cleanDir(File dir)
{
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 43372d224b67..35b32999cb4a 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -576,18 +576,7 @@ public class ProcessHandler
flushInput();
}
- /**
- * This method is useful when the process was executed
- * asynchronously. Waits for process to exit and return
- * its result.
- *
- * @return true if process correctly exited
- * (exit code doesn't affect to this result).
- */
- public boolean waitFor()
- {
- return waitFor(0);
- }
+
/**
* This method is useful when the process was executed
@@ -737,20 +726,7 @@ public class ProcessHandler
}
}
- /**
- * Prints the string specified to sdtin of external
- * command. '\n' is not added so if you need you
- * should terminate the string with '\n'.
- *
- * The method can also be called before the command
- * starts its execution. Then the text is buffered
- * and transferred to command when it will be started.
- */
- public void printInputText(String str)
- {
- stdInBuff += str;
- flushInput();
- }
+
/**
* Returns information about was the command started or
@@ -940,15 +916,5 @@ public class ProcessHandler
}
}
- /**
- * to stop the extra thread, before he will kill a running office. This will stop the thread.
- */
- public void stopWatcher()
- {
- if (m_aWatcher != null)
- {
- m_aWatcher.holdOn();
- shortWait(5000);
- }
- }
+
}
diff --git a/qadevOOo/runner/helper/StringHelper.java b/qadevOOo/runner/helper/StringHelper.java
index 3ed630030e76..6308a0a2eacb 100644
--- a/qadevOOo/runner/helper/StringHelper.java
+++ b/qadevOOo/runner/helper/StringHelper.java
@@ -71,25 +71,7 @@ public class StringHelper
return sNewPath;
}
- public static String doubleQuoteIfNeed(String _sStr)
- {
- if (_sStr.startsWith("\"") && _sStr.endsWith("\""))
- {
- // don't quote twice
- return _sStr;
- }
- if (_sStr.indexOf(" ") == -1)
- {
- // don't quote, if there is no space in name
- return _sStr;
- }
- if (_sStr.indexOf("%") != -1)
- {
- return singleQuote(_sStr);
- }
- return doubleQuote(_sStr);
- }
/**
* Convert a value to a string with a given length, if the len is greater the len of the value string representation
diff --git a/qadevOOo/runner/helper/URLHelper.java b/qadevOOo/runner/helper/URLHelper.java
index c869f1a1d48b..ebf59b01e0eb 100644
--- a/qadevOOo/runner/helper/URLHelper.java
+++ b/qadevOOo/runner/helper/URLHelper.java
@@ -144,84 +144,11 @@ public class URLHelper
- /**
- * The same as getURLWithProtocolFromSystemPath() before but uses string parameter instead
- * of a File types. It exist to supress converting of necessary parameters in the
- * outside code. But of course getURLWithProtocolFromSystemPath(File,File,String) will be
- * a little bit faster then this method ...
- *
- * @param sSystemPath
- * represent the file in system notation
- *
- * @param sBasePath
- * define the base path of the aSystemPath value,
- * which must be replaced with the value of "sServerPath".
- *
- * @param sServerPath
- * Will be used to replace sBasePath.
- *
- * @example
- * System Path = "d:\test\file.txt"
- * Base Path = "d:\test"
- * Server Path = "http://alaska:8000"
- * => "http://alaska:8000/file.txt"
- *
- * @return [String]
- * an url which represent the given system path
- * and uses the given protocol
- */
- public static String getURLWithProtocolFromSystemPath( String sSystemPath, String sBasePath, String sServerPath )
- {
- return getURLWithProtocolFromSystemPath(new File(sSystemPath), new File(sBasePath), sServerPath);
- }
- /**
- * This convert an URL (formated as a string) to a struct com.sun.star.util.URL.
- * It use a special service to do that: the URLTransformer.
- * Because some API calls need it and it's not allowed to set "Complete"
- * part of the util struct only. The URL must be parsed.
- *
- * @param sURL
- * URL for parsing in string notation
- *
- * @return [com.sun.star.util.URL]
- * URL in UNO struct notation
- */
- public static com.sun.star.util.URL parseURL(XURLTransformer xParser, String sURL)
- {
- com.sun.star.util.URL aURL = null;
- if (sURL==null || sURL.equals(""))
- return null;
- try
- {
- // Create special service for parsing of given URL.
-/* com.sun.star.util.XURLTransformer xParser = (com.sun.star.util.XURLTransformer)OfficeConnect.createRemoteInstance(
- com.sun.star.util.XURLTransformer.class,
- "com.sun.star.util.URLTransformer");
-*/
- // Because it's an in/out parameter we must use an array of URL objects.
- com.sun.star.util.URL[] aParseURL = new com.sun.star.util.URL[1];
- aParseURL[0] = new com.sun.star.util.URL();
- aParseURL[0].Complete = sURL;
-
- // Parse the URL
- xParser.parseStrict(aParseURL);
-
- aURL = aParseURL[0];
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Any UNO method of this scope can throw this exception.
- // Reset the return value only.
- aURL = null;
- }
-
- return aURL;
- }
/**
diff --git a/qadevOOo/runner/lib/Parameters.java b/qadevOOo/runner/lib/Parameters.java
index 9ee716eeefd0..1866b2646dac 100644
--- a/qadevOOo/runner/lib/Parameters.java
+++ b/qadevOOo/runner/lib/Parameters.java
@@ -170,47 +170,9 @@ public class Parameters implements XPropertySet {
}
}
- public static String getString(XPropertySet props, String name) {
- try {
- return (String)props.getPropertyValue(name);
- } catch (UnknownPropertyException e) {
- return null;
- } catch (WrappedTargetException e) {
- return null;
- }
- }
- public static Object get(XPropertySet props, String name) {
- try {
- return props.getPropertyValue(name);
- } catch (UnknownPropertyException e) {
- return null;
- } catch (WrappedTargetException e) {
- return null;
- }
- }
- public static Map toMap(XPropertySet props) {
- HashMap result = new HashMap(10);
- XPropertySetInfo setInfo = props.getPropertySetInfo();
- Property[] properties = setInfo.getProperties();
- for (int i = 0; i < properties.length; i++) {
- String name = properties[i].Name;
- Object value;
- try {
- value = props.getPropertyValue(name);
- } catch (WrappedTargetException e) {
- continue;
- } catch (UnknownPropertyException e) {
- continue;
- }
-
- result.put(name, value);
- }
-
- return result;
- }
}
diff --git a/qadevOOo/runner/lib/Status.java b/qadevOOo/runner/lib/Status.java
index 680e499cf8da..fc4a2b4fe9d3 100644
--- a/qadevOOo/runner/lib/Status.java
+++ b/qadevOOo/runner/lib/Status.java
@@ -86,13 +86,7 @@ public class Status extends SimpleStatus {
return new Status( SKIPPED, state );
}
- /**
- * This is a factory method for creating a Status representing that the
- * result of the activity was excluded. It always has FAILED state.
- */
- public static Status excluded() {
- return new Status( EXCLUDED, false );
- }
+
/**
* Creates a Status representing an activity failed for an arbitrary reason.
diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java
index 6b893106c65b..5ca0b9bbead4 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -262,53 +262,6 @@ public class AccessibilityTools {
return null;
}
- /**
- * This methods retunrs the XAccessibleContext of a named Sheet-Cell like "G5".
- * @param xSheetAcc The XAccessibleContext of a Sheet
- * @param cellName The name of a cell like "A5"
- * @return the XAccessiblecontext of the named cell
- */
- public static XAccessibleContext getSheetCell(XAccessibleContext xSheetAcc, String cellName){
-
- int cellIndex = 0;
- int column =0;
- int charMem = 0;
- for (int n=0; n= 'A') && (bytes[0] <= 'Z')){
- charMem = bytes[0]-64;
- column++;
- if ( column == 2 ){
- cellIndex += charMem * 26;
- }
- cellIndex= cellIndex+ (bytes[0]-65);
- } else {
- String sNumb = cellName.substring(n, cellName.length());
- int iNumb = Integer.valueOf(sNumb).intValue();
- cellIndex += (iNumb-1) * 256;
- System.out.println("numb:" + (iNumb-1) * 256);
- }
-
- }
-
- try {
- XAccessibleContext ac = xSheetAcc.getAccessibleChild(cellIndex).getAccessibleContext();
- System.out.println(ac.getAccessibleRole() + "," +
- ac.getAccessibleName() + "(" +
- ac.getAccessibleDescription() + "):" +
- utils.getImplName(ac));
-
- return ac;
- } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
- System.out.println("ERROR: could not get child at index " + cellIndex +"': " + ex.toString());
- return null;
- }
- }
-
public static void printAccessibleTree(PrintWriter log, XAccessible xacc, boolean debugIsActive) {
debug = debugIsActive;
if (debug) printAccessibleTree(log, xacc, "");
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java
index 5f22f5407dd2..7b352179929e 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -280,12 +280,7 @@ public class DBTools {
*/
public DataSourceInfo newDataSourceInfo() { return new DataSourceInfo() ;}
- /**
- * Returns new instance of DataSourceInfo class.
- */
- public DataSourceInfo newDataSourceInfo(Object dataSource) {
- return new DataSourceInfo(dataSource);
- }
+
/**
* Registers the datasource on the specified name in
@@ -324,75 +319,9 @@ public class DBTools {
registerDB(name, dataSource) ;
}
- /**
- * RESERVED. Not used.
- */
- public XConnection connectToTextDB(String contextName,
- String dbDir, String fileExtension)
- throws com.sun.star.uno.Exception {
- try {
- XInterface newSource = (XInterface) xMSF.createInstance
- ("com.sun.star.sdb.DataSource") ;
- XPropertySet xSrcProp = UnoRuntime.queryInterface(XPropertySet.class, newSource);
- xSrcProp.setPropertyValue("URL", "sdbc:text:" + dirToUrl(dbDir));
-
- PropertyValue extParam = new PropertyValue() ;
- extParam.Name = "EXT" ;
- extParam.Value = fileExtension ;
-
- xSrcProp.setPropertyValue("Info", new PropertyValue[] {extParam}) ;
-
- dbContext.registerObject(contextName, newSource) ;
-
- Object handler = xMSF.createInstance("com.sun.star.sdb.InteractionHandler");
- XInteractionHandler xHandler = UnoRuntime.queryInterface(XInteractionHandler.class, handler) ;
-
- XCompletedConnection xSrcCon = UnoRuntime.queryInterface(XCompletedConnection.class, newSource) ;
-
- XConnection con = xSrcCon.connectWithCompletion(xHandler) ;
-
- return con ;
- } finally {
- try {
- dbContext.revokeObject(contextName) ;
- } catch (Exception e) {}
- }
- }
-
- /**
- * Registers DBase database (directory with DBF files) in the
- * global DB context, then connects to it.
- * @param contextName Name under which DB will be registered.
- * @param dbDir The directory with DBF tables.
- * @return Connection to the DB.
- */
- public XConnection connectToDBase(String contextName,
- String dbDir)
- throws com.sun.star.uno.Exception {
-
- try {
- XInterface newSource = (XInterface) xMSF.createInstance
- ("com.sun.star.sdb.DataSource") ;
-
- XPropertySet xSrcProp = UnoRuntime.queryInterface(XPropertySet.class, newSource);
- xSrcProp.setPropertyValue("URL", "sdbc:dbase:" + dirToUrl(dbDir));
-
- dbContext.registerObject(contextName, newSource) ;
-
- XConnection con = connectToSource(newSource) ;
-
- return con ;
- } catch(com.sun.star.uno.Exception e) {
- try {
- dbContext.revokeObject(contextName) ;
- } catch (Exception ex) {}
-
- throw e ;
- }
- }
/**
* Performs connection to DataSource specified.
@@ -461,23 +390,7 @@ public class DBTools {
return src ;
}
- /**
- * Connects to DataSource specially created for testing.
- * This source always has name 'APITestDatabase' and it
- * is registered in subdirectory TestDB of directory
- * docPath which is supposed to be a directory with test
- * documents, but can be any other (it must have subdirectory with DBF
- * tables). If such data source doesn't exists or exists with
- * different URL it is recreated and reregistered. Finally connection
- * performed.
- * @param docPath Path to database TestDB directory.
- * @return Connection to test database.
- */
- public XConnection connectToTestDB(String docPath)
- throws com.sun.star.uno.Exception {
- return connectToSource(registerTestDB(docPath)) ;
- }
/**
* Empties the table in the specified source.
@@ -584,44 +497,9 @@ public class DBTools {
xClose.close() ;
}
- /**
- * Initializes test table specified of the connection specified.
- * Deletes all record from table, and then inserts data from
- * TST_TABLE_VALUES constant array.
- * Test table has some predefined format which includes as much
- * field types as possible. For every column type constants
- * {@link #TST_STRING TST_STRING}, {@link #TST_INT TST_INT}, etc.
- * are declared for column index fast find.
- * @param con Connection to data source where test table exists.
- * @param table Test table name.
- */
- public void initializeTestTable(XConnection con, String table)
- throws com.sun.star.sdbc.SQLException {
- deleteAllRows(con, table) ;
- for (int i = 0; i < TST_TABLE_VALUES.length; i++) {
- addRowToTestTable(con, table, TST_TABLE_VALUES[i], TST_STREAM_LENGTHS[i]) ;
- }
- }
- /**
- * Prints full info about currently registered DataSource's.
- */
- public void printRegisteredDatabasesInfo(PrintWriter out) {
- XEnumerationAccess dbContEA = UnoRuntime.queryInterface(XEnumerationAccess.class, dbContext) ;
-
- XEnumeration xEnum = dbContEA.createEnumeration() ;
-
- out.println("DatabaseContext registered DataSource's :") ;
- while (xEnum.hasMoreElements()) {
- try {
- DataSourceInfo inf = new DataSourceInfo(xEnum.nextElement()) ;
- inf.printInfo(out) ;
- } catch (com.sun.star.container.NoSuchElementException e) {}
- catch (com.sun.star.lang.WrappedTargetException e) {}
- }
- }
/**
* Convert system pathname to SOffice URL string
diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java
index 30bfd8725d43..8e6ad3238cde 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -101,17 +101,7 @@ public class DesktopTools
return xDesktop.getComponents().createEnumeration();
}
- /**
- * returns the current component on the desktop
- * @param xMSF the XMultiServiceFactory
- * @return XComponent of the current component on the desktop
- */
- public static XComponent getCurrentComponent(XMultiServiceFactory xMSF)
- {
- XDesktop xDesktop = UnoRuntime.queryInterface(
- XDesktop.class, createDesktop(xMSF));
- return xDesktop.getCurrentComponent();
- }
+
/**
* returns the current component on the desktop
@@ -460,15 +450,7 @@ public class DesktopTools
}
}
- /**
- * Due to typo deprecated
- * @deprecated
- */
- @Deprecated
- public static void bringWindowToFromt(XModel xModel)
- {
- bringWindowToFront(xModel);
- }
+
/**
* This function brings a document to the front.
diff --git a/qadevOOo/runner/util/DrawTools.java b/qadevOOo/runner/util/DrawTools.java
index acb89d88e26c..4facd805fd34 100644
--- a/qadevOOo/runner/util/DrawTools.java
+++ b/qadevOOo/runner/util/DrawTools.java
@@ -130,21 +130,4 @@ public class DrawTools {
return oShape;
}
- /**
- * creates a XShape and adds it to the documents
- * first drawpage
- * @param oDoc the document
- * @param height the height of the shape
- * @param width the width of the shape
- * @param x the x-position of the shape
- * @param y the y-position of the shape
- * @param kind the kind of the shape ('Ellipse', 'Line' or 'Rectangle')
- */
- public void addShape( XComponent oDoc, int height, int width, int x,
- int y, String kind ) {
-
- getShapes(getDrawPage(oDoc,0)).add(createShape( oDoc, height, width, x,
- y, kind ) );
- }
-
}
diff --git a/qadevOOo/runner/util/DynamicClassLoader.java b/qadevOOo/runner/util/DynamicClassLoader.java
index ff70becefbba..8fdd721f1ea2 100644
--- a/qadevOOo/runner/util/DynamicClassLoader.java
+++ b/qadevOOo/runner/util/DynamicClassLoader.java
@@ -59,23 +59,6 @@ public class DynamicClassLoader {
}
}
- /**
- * Get an instance of a class. The constructor matching to the
- * arguments is used and the arguments are given to this constructor.
- * @param className The class to instantiate.
- * @param ctorArgs Arguments for the constructor.
- * @return The instance of the class.
- */
- public Object getInstance(String className, Object[] ctorArgs)
- throws IllegalArgumentException {
- Class>[] ctorType = new Class[ctorArgs.length];
- for(int i=0; iaDoc Writer document
diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java
index 8a841397ee5c..dd46df9b6bdc 100644
--- a/qadevOOo/runner/util/SOfficeFactory.java
+++ b/qadevOOo/runner/util/SOfficeFactory.java
@@ -99,23 +99,7 @@ public class SOfficeFactory {
} // finished createTextDoc
- /**
- * method which opens a new TextDocument
- *
- * @see XTextDocument
- */
- public XTextDocument createTextDoc(String frameName, PropertyValue[] mediaDescriptor)
- throws com.sun.star.uno.Exception {
- XComponent oDoc = openDoc("swriter", frameName, mediaDescriptor);
-
- if (oDoc != null) {
- DesktopTools.bringWindowToFront(oDoc);
- return UnoRuntime.queryInterface(XTextDocument.class, oDoc);
- } else {
- return null;
- }
- } // finished createTextDoc
/**
* method which opens a new SpreadsheetDocument
@@ -135,23 +119,7 @@ public class SOfficeFactory {
}
} // finished createCalcDoc
- /**
- * method which opens a new SpreadsheetDocument
- *
- * @see XSpreadsheetDocument
- */
- public XSpreadsheetDocument createCalcDoc(String frameName, PropertyValue[] mediaDescriptor)
- throws com.sun.star.uno.Exception {
- XComponent oDoc = openDoc("scalc", frameName, mediaDescriptor);
-
- if (oDoc != null) {
- DesktopTools.bringWindowToFront(oDoc);
- return UnoRuntime.queryInterface(XSpreadsheetDocument.class, oDoc);
- } else {
- return null;
- }
- } // finished createCalcDoc
/**
* method which opens a new DrawDocument
@@ -162,17 +130,7 @@ public class SOfficeFactory {
return openDoc("sdraw", frameName);
} // finished createDrawDoc
- /**
- * method which opens a new ImpressDocument
- */
- /**
- * method which opens a new DrawDocument
- */
- public XComponent createDrawDoc(String frameName, PropertyValue[] mediaDescriptor)
- throws com.sun.star.uno.Exception {
- return openDoc("sdraw", frameName, mediaDescriptor);
- } // finished createDrawDoc
/**
* method which opens a new ImpressDocument
@@ -183,14 +141,7 @@ public class SOfficeFactory {
return openDoc("simpress", frameName);
} // finished createImpressDoc
- /**
- * method which opens a new ImpressDocument
- */
- public XComponent createImpressDoc(String frameName, PropertyValue[] mediaDescriptor)
- throws com.sun.star.uno.Exception {
- return openDoc("simpress", frameName, mediaDescriptor);
- } // finished createImpressDoc
/**
* method which opens a new MathDocument
@@ -201,14 +152,7 @@ public class SOfficeFactory {
return openDoc("smath", frameName);
} // finished createMathDoc
- /**
- * method which opens a new MathDocument
- */
- public XComponent createMathDoc(String frameName, PropertyValue[] mediaDescriptor)
- throws com.sun.star.uno.Exception {
- return openDoc("smath", frameName, mediaDescriptor);
- } // finished createMathDoc
/**
* method which opens a new ChartDocument
@@ -261,19 +205,7 @@ public class SOfficeFactory {
return oTable;
}
- /**
- * creates a simple TextFrame
- * ... to be continued
- */
- public static XTextFrame createTextFrame(XTextDocument xTextDoc)
- {
- FrameDsc tDsc = new FrameDsc();
- InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
-
- XTextFrame oFrame = (XTextFrame) instCreate.getInstance();
- return oFrame;
- }
/**
* creates a simple TextFrame
@@ -289,15 +221,7 @@ public class SOfficeFactory {
return oFrame;
}
- public static void insertString(XTextDocument xTextDoc, String cString)
- {
- XText xText = xTextDoc.getText();
- XText oText = UnoRuntime.queryInterface(
- XText.class, xText);
- XTextCursor oCursor = oText.createTextCursor();
- oText.insertString(oCursor, cString, false);
- }
public static void insertTextContent(XTextDocument xTextDoc,
XTextContent xCont)
@@ -335,33 +259,9 @@ public class SOfficeFactory {
} /// finish createBookmark
- /**
- * the method createReferenceMark
- */
- public static XTextContent createReferenceMark(XTextDocument xTextDoc)
- {
- ReferenceMarkDsc tDsc = new ReferenceMarkDsc();
- InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
- XTextContent oReferenceMark = (XTextContent) instCreate.getInstance();
- return oReferenceMark;
- } /// finish createReferenceMark
-
- /**
- * the method createFootnote
- */
- public static XTextContent createFootnote(XTextDocument xTextDoc)
- {
-
- FootnoteDsc tDsc = new FootnoteDsc();
- InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
-
- XTextContent oFootnote = (XTextContent) instCreate.getInstance();
- return oFootnote;
-
- } /// finish createFootnote
/**
* the method create Index
@@ -403,16 +303,7 @@ public class SOfficeFactory {
return oIA;
}
- public static String getUniqueName(XInterface oInterface, String prefix) {
- XNameAccess oNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oInterface);
- if (oNameAccess == null) {
- return null;
- }
- int i;
- for (i = 0; oNameAccess.hasByName(prefix + i); i++) {
- }
- return prefix + i;
- }
+
public XShape createShape(XComponent oDoc, int height, int width, int x, int y, String kind) {
//possible values for kind are 'Ellipse', 'Line' and 'Rectangle'
@@ -482,45 +373,7 @@ public class SOfficeFactory {
return oInstance;
}
- public XControlShape createControlShape(XComponent oDoc, int height, int width, int x, int y, String kind) {
- Size size = new Size();
- Point position = new Point();
- XControlShape oCShape = null;
- XControlModel aControl = null;
-
- //get MSF
- XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc);
-
- try {
- Object oInt = oDocMSF.createInstance("com.sun.star.drawing.ControlShape");
- Object aCon = oDocMSF.createInstance("com.sun.star.form.component." + kind);
- aControl = UnoRuntime.queryInterface(XControlModel.class, aCon);
- oCShape = UnoRuntime.queryInterface(XControlShape.class, oInt);
- size.Height = height;
- size.Width = width;
- position.X = x;
- position.Y = y;
- oCShape.setSize(size);
- oCShape.setPosition(position);
-
-
- } catch (Exception e) {
- // Some exception occurs.FAILED
- System.out.println("Couldn't create instance " + e);
- }
-
- try {
- oCShape.setControl(aControl);
- } catch (Exception e) {
- // Some exception occurs.FAILED
- System.out.println("Couldn't get Control " + e);
- }
-
-
- return oCShape;
-
- }
public XComponent loadDocument(String fileName)
throws com.sun.star.lang.IllegalArgumentException,
@@ -607,15 +460,5 @@ public class SOfficeFactory {
} // finished openDoc
- // query for XServiceInfo
- public Object queryXServiceInfo(Object oObj) {
- if (oObj != null) {
- UnoRuntime.queryInterface(
- XServiceInfo.class, oObj);
- System.out.println("!!!! XServiceInfo n.a. !!!! ");
- } else {
- System.out.println("Object is empty!!!! ");
- }
- return null;
- } // finish queryXServiceInfo
+
}
diff --git a/qadevOOo/runner/util/SysUtils.java b/qadevOOo/runner/util/SysUtils.java
index 0d289f4d68da..09896ade63e0 100644
--- a/qadevOOo/runner/util/SysUtils.java
+++ b/qadevOOo/runner/util/SysUtils.java
@@ -32,82 +32,15 @@ import com.sun.star.datatransfer.*;
public class SysUtils {
- public static String getJavaPath() {
- String cp = System.getProperty("java.class.path");
- String jh = System.getProperty("java.home");
- String fs = System.getProperty("file.separator");
- jh = jh + fs + "bin" + fs;
- jh = jh + "java -classpath "+cp;
- return jh;
- }
+
private static ArrayList files = new ArrayList();
- public static Object[] traverse( String afileDirectory ) {
- File fileDirectory = new File(afileDirectory);
- // Testing, if the file is a directory, and if so, it throws an exception
- if ( !fileDirectory.isDirectory() ) {
- throw new IllegalArgumentException(
- "not a directory: " + fileDirectory.getName()
- );
- }
- // Getting all files and directories in the current directory
- File[] entries = fileDirectory.listFiles(
- new FileFilter() {
- public boolean accept( File pathname ) {
- return true;
- }
- }
- );
- // Iterating for each file and directory
- for ( int i = 0; i < entries.length; ++i ) {
- // Testing, if the entry in the list is a directory
- if ( entries[ i ].isDirectory() ) {
- // Recursive call for the new directory
- traverse( entries[ i ].getAbsolutePath() );
- } else {
- // adding file to List
- try {
- // Composing the URL by replacing all backslashs
- String stringUrl = "file:///"
- + entries[ i ].getAbsolutePath().replace( '\\', '/' );
- files.add(stringUrl);
- }
- catch( Exception exception ) {
- exception.printStackTrace();
- }
- }
- }
- return files.toArray();
- }
- public static XComponent getActiveComponent(XMultiServiceFactory msf) {
- XComponent ac = null;
- try {
- Object desk = msf.createInstance("com.sun.star.frame.Desktop");
- XDesktop xDesk = UnoRuntime.queryInterface(XDesktop.class,desk);
- ac = xDesk.getCurrentComponent();
- } catch (com.sun.star.uno.Exception e) {
- System.out.println("Couldn't get active Component");
- }
- return ac;
- }
-
- public static XFrame getActiveFrame(XMultiServiceFactory msf) {
- try {
- Object desk = msf.createInstance("com.sun.star.frame.Desktop");
- XDesktop xDesk = UnoRuntime.queryInterface(XDesktop.class,desk);
- return xDesk.getCurrentFrame();
- } catch (com.sun.star.uno.Exception e) {
- System.out.println("Couldn't get active Component");
- }
-
- return null;
- }
/**
* Tries to obtain text data from cliboard if such one exists.
diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java
index c97c6d47c008..2004bca59a8c 100644
--- a/qadevOOo/runner/util/UITools.java
+++ b/qadevOOo/runner/util/UITools.java
@@ -196,180 +196,20 @@ public class UITools {
}
}
- /**
- * Deactivates toggle button via Accessibility
- * @param buttonName The name of the button in the Accessibility tree
- *
- * @return true if the button could be set to deactivated
- */
- public boolean deactivateToggleButton(String buttonName){
- return clickToggleButton(buttonName, false);
- }
-
- /**
- * Activates toggle button via Accessibility
- * @param buttonName The name of the button in the Accessibility tree
- *
- * @return true if the button could be set to activated
- */
- public boolean activateToggleButton(String buttonName){
- return clickToggleButton(buttonName, true);
- }
-
- /**
- * returns the value of named radio button
- * @param buttonName the name of the button to get the value of
- * @throws java.lang.Exception if something fail
- * @return Integer
- */
- public Integer getRadioButtonValue(String buttonName)
- throws java.lang.Exception
- {
- try {
- XInterface xRB =AccessibilityTools.getAccessibleObjectForRole(mXRoot,
- AccessibleRole.RADIO_BUTTON, buttonName);
-
- return (Integer) getValue(xRB);
- } catch (Exception e) {
- throw new Exception("Could not get value from RadioButton '"
- + buttonName + "' : " + e.toString());
- }
- }
-
- /**
- * returns the named graphic
- * @param GraphicName the name of the graphic
- * @return XInterface
- * @throws java.lang.Exception if something fail
- */
- public XInterface getGraphic(String GraphicName) throws java.lang.Exception
- {
- return AccessibilityTools.getAccessibleObjectForRole(mXRoot, AccessibleRole.GRAPHIC,
- GraphicName);
- }
- /**
- * set a named radio button the a given value
- * @param buttonName the name of the button to set
- * @param iValue the value to set
- * @throws java.lang.Exception if something fail
- */
- public void setRadioButtonValue(String buttonName, int iValue)
- throws java.lang.Exception
- {
- try {
- XInterface xRB =AccessibilityTools.getAccessibleObjectForRole(mXRoot, AccessibleRole.RADIO_BUTTON, buttonName);
- if(xRB == null)
- System.out.println("AccessibleObjectForRole couldn't be found for " + buttonName);
- XAccessibleValue oValue = UnoRuntime.queryInterface(XAccessibleValue.class, xRB);
- if(oValue == null)
- System.out.println("XAccessibleValue couldn't be queried for " + buttonName);
- oValue.setCurrentValue(new Integer(iValue));
- } catch (Exception e) {
- e.printStackTrace();
- throw new Exception("Could not set value to RadioButton '"
- + buttonName + "' : " + e.toString());
- }
- }
- /**
- * select an item in nanmed listbox
- * @param ListBoxName the name of the listbox
- * @param nChildIndex the index of the item to set
- * @throws java.lang.Exception if something fail
- */
- public void selectListboxItem(String ListBoxName, int nChildIndex)
- throws java.lang.Exception
- {
- try {
- XAccessibleContext xListBox = null;
- xListBox =AccessibilityTools.getAccessibleObjectForRole(mXRoot,
- AccessibleRole.COMBO_BOX, ListBoxName);
- if (xListBox == null){
- xListBox =AccessibilityTools.getAccessibleObjectForRole(mXRoot,
- AccessibleRole.PANEL, ListBoxName);
- }
- XAccessible xListBoxAccess = UnoRuntime.queryInterface(XAccessible.class, xListBox);
- // if a List is not pulled to be open all entries are not visiblle, therefore the
- // boolean argument
- XAccessibleContext xList =AccessibilityTools.getAccessibleObjectForRole(
- xListBoxAccess, AccessibleRole.LIST, true);
- XAccessibleSelection xListSelect = UnoRuntime.queryInterface(XAccessibleSelection.class, xList);
- xListSelect.selectAccessibleChild(nChildIndex);
- } catch (Exception e) {
- throw new Exception("Could not select item '" +nChildIndex+
- "' in listbox '" + ListBoxName + "' : " + e.toString());
- }
- }
- /**
- * This method returns all entries as XInterface of a list box
- * @param ListBoxName the name of the listbox
- * @return Object[] containing XInterface
- * @throws java.lang.Exception if something fail
- */
- public Object[] getListBoxObjects(String ListBoxName)
- throws java.lang.Exception
- {
- ArrayList Items = new ArrayList();
- try {
- XAccessibleContext xListBox = null;
- XAccessibleContext xList = null;
- xListBox =AccessibilityTools.getAccessibleObjectForRole(mXRoot,
- AccessibleRole.COMBO_BOX, ListBoxName);
- if (xListBox == null){
- xListBox =AccessibilityTools.getAccessibleObjectForRole(mXRoot,
- AccessibleRole.PANEL, ListBoxName);
- }
- if (xListBox == null){
- // get the list of TreeListBox
- xList =AccessibilityTools.getAccessibleObjectForRole(mXRoot,
- AccessibleRole.TREE, ListBoxName);
- // all other list boxes have a children of kind of LIST
- } else {
-
- XAccessible xListBoxAccess = UnoRuntime.queryInterface(XAccessible.class, xListBox);
- // if a List is not pulled to be open all entries are not visiblle, therefore the
- // boolean argument
- xList =AccessibilityTools.getAccessibleObjectForRole(
- xListBoxAccess, AccessibleRole.LIST, true);
- }
-
- for (int i=0;iWindowName
- * @return the named window
- * @throws java.lang.Exception if something fail
- */
- public XWindow getTopWindow(String WindowName, boolean debug) throws java.lang.Exception
- {
- XInterface xToolKit = null;
- try {
- xToolKit = (XInterface) mMSF.createInstance("com.sun.star.awt.Toolkit") ;
- } catch (com.sun.star.uno.Exception e) {
- throw new Exception("Could not toolkit: " + e.toString());
- }
- XExtendedToolkit tk = UnoRuntime.queryInterface(XExtendedToolkit.class, xToolKit);
-
- int count = tk.getTopWindowCount();
-
- XTopWindow retWindow = null;
-
- if (debug) System.out.println("getTopWindow ->");
-
- for (int i=0; i < count ; i++){
- XTopWindow xTopWindow = tk.getTopWindow(i);
- XAccessible xAcc = AccessibilityTools.getAccessibleObject(xTopWindow);
- String accName = xAcc.getAccessibleContext().getAccessibleName();
-
- if (debug){
- System.out.println("AccessibleName: " + accName);
- }
-
- if (WindowName.equals(accName)){
- if (debug) System.out.println("-> found window with name '" + WindowName + "'");
- retWindow = xTopWindow;
- }
- }
- if (debug) {
- if (retWindow == null) System.out.println("could not found window with name '" + WindowName + "'");
- System.out.println("<- getTopWindow ");
- }
- return UnoRuntime.queryInterface(XWindow.class, retWindow);
- }
- public void clickMiddleOfAccessibleObject(short role, String name){
- XAccessibleContext xAcc =AccessibilityTools.getAccessibleObjectForRole(mXRoot, role, name);
- XAccessibleComponent aComp = UnoRuntime.queryInterface(
- XAccessibleComponent.class, xAcc);
- System.out.println(xAcc.getAccessibleRole() + "," +
- xAcc.getAccessibleName() + "(" +
- xAcc.getAccessibleDescription() + "):" +
- utils.getImplName(xAcc));
- if (aComp != null) {
- aComp.getLocationOnScreen();
- String bounds = "(" + aComp.getBounds().X + "," +
- aComp.getBounds().Y + ")" + " (" +
- aComp.getBounds().Width + "," +
- aComp.getBounds().Height + ")";
- System.out.println("The boundary Rectangle is " + bounds);
- try {
- Robot rob = new Robot();
- int x = aComp.getLocationOnScreen().X + (aComp.getBounds().Width / 2);
- int y = aComp.getLocationOnScreen().Y + (aComp.getBounds().Height / 2);
- System.out.println("try to click mouse button on x/y " + x + "/" + y);
- rob.mouseMove(x, y);
- rob.mousePress(InputEvent.BUTTON1_MASK);
- rob.mouseRelease(InputEvent.BUTTON1_MASK);
- } catch (java.awt.AWTException e) {
- System.out.println("couldn't press mouse button");
- }
- }
- }
-
- public void doubleClickMiddleOfAccessibleObject(short role, String name) {
- XAccessibleContext xAcc =AccessibilityTools.getAccessibleObjectForRole(mXRoot, role, name);
- XAccessibleComponent aComp = UnoRuntime.queryInterface(
- XAccessibleComponent.class, xAcc);
-
- System.out.println(xAcc.getAccessibleRole() + "," +
- xAcc.getAccessibleName() + "(" +
- xAcc.getAccessibleDescription() + "):" +
- utils.getImplName(xAcc));
-
- if (aComp != null) {
- aComp.getLocationOnScreen();
- String bounds = "(" + aComp.getBounds().X + "," +
- aComp.getBounds().Y + ")" + " (" +
- aComp.getBounds().Width + "," +
- aComp.getBounds().Height + ")";
- System.out.println("The boundary Rectangle is " + bounds);
- try {
- Robot rob = new Robot();
- int x = aComp.getLocationOnScreen().X + (aComp.getBounds().Width / 2);
- int y = aComp.getLocationOnScreen().Y + (aComp.getBounds().Height / 2);
- System.out.println("try to double click mouse button on x/y " + x + "/" + y);
- rob.mouseMove(x, y);
- rob.mousePress(InputEvent.BUTTON1_MASK);
- rob.mouseRelease(InputEvent.BUTTON1_MASK);
- utils.shortWait(100);
- rob.mousePress(InputEvent.BUTTON1_MASK);
- rob.mouseRelease(InputEvent.BUTTON1_MASK);
- } catch (java.awt.AWTException e) {
- System.out.println("couldn't press mouse button");
- }
-
- }
- }
-
- /**
- * DEPRECATED
- * Since AccessibilityTools handle parameter debugIsActive
- * this function does not work anymore.
- * @deprecated Since AccessibilityTools handle parameter debugIsActive
- * this function does not work anymore.
- * @param log logWriter
- */
- public void printAccessibleTree(PrintWriter log)
- {
- AccessibilityTools.printAccessibleTree(log, mXRoot);
- }
/**
diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java
index f706d9c5878a..ac3c89e275d7 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -98,23 +98,9 @@ public class XMLTools {
attrByName.put(attr.Name, attr) ;
}
- /**
- * Adds an attribute with value specified. As a type of
- * value 'CDATA' string specified.
- * @param name The attribute name.
- * @param value Attribute value.
- */
- public void add(String name, String value) {
- add(name, "CDATA", value) ;
- }
- /**
- * Clears all attributes added before.
- */
- public void clear() {
- attrByName.clear() ;
- attributes.clear() ;
- }
+
+
/***************************************
* XAttributeList methods
@@ -392,12 +378,7 @@ public class XMLTools {
public void addTagEnclosed(String tag, String outerTag) {
tags.put(tag, outerTag) ;
}
- /**
- * Adds a character data which must be contained in the XML data.
- */
- public void addCharacters(String ch) {
- chars.put(ch, "") ;
- }
+
/**
* Adds a character data which must be contained in the XML data and
* must be inside the tag with name outerTag.
@@ -647,9 +628,7 @@ public class XMLTools {
tagSet.add(tag.name) ;
}
- public void addCharacters(String ch) {
- chars.add(new Object[] {ch.trim(), null}) ;
- }
+
public void addCharactersEnclosed(String ch, Tag outerTag) {
chars.add(new Object[] {ch.trim(), outerTag}) ;
@@ -760,36 +739,7 @@ public class XMLTools {
}
}
- /**
- * Creates XDocumentHandler implementation in form
- * of com.sun.star.xml.sax.Writer service, which
- * writes XML data into a com.sun.star.io.Pipe
- * created.
- * @return Single element array which contains the handler
- * contained in Any structure.
- */
- public static Object[] getDocumentHandler(XMultiServiceFactory xMSF) {
- Object[] ret = new Object[1];
- try {
- XInterface Writer = (XInterface) xMSF.createInstance(
- "com.sun.star.xml.sax.Writer");
- XInterface oPipe = (XInterface) xMSF.createInstance
- ( "com.sun.star.io.Pipe" );
- XOutputStream xPipeOutput = UnoRuntime.
- queryInterface(XOutputStream.class, oPipe) ;
- XActiveDataSource xADS = UnoRuntime.queryInterface(XActiveDataSource.class,Writer);
- xADS.setOutputStream(xPipeOutput);
- XDocumentHandler handler = UnoRuntime.queryInterface(XDocumentHandler.class,Writer);
-
- Any arg = new Any(new Type(XDocumentHandler.class),handler);
-
- ret[0] = arg;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace();
- }
- return ret;
- }
public static PropertyValue[] createMediaDescriptor(String[] propNames, Object[] values) {
PropertyValue[] props = new PropertyValue[propNames.length] ;
@@ -863,73 +813,7 @@ public class XMLTools {
oIn.closeInput();
}
- /**
- * Exports document (the whole or a part) into the file specified
- * in XML format.
- * @param xMSF Soffice ServiceManager factory.
- * @param xDoc Document to be exported.
- * @param docType Type of document (for example 'Calc', 'Writer', 'Draw')
- * The type must start with capital letter.
- * @param exportType The type of export specifies if the whole
- * document will be exported or one of its parts (Meta info, Styles, etc.).
- * The following types supported (it also depends of document type) :
- * "" (empty string) - for the whole document ;
- * "Content" - only content exported ;
- * "Meta" - meta document info exported ;
- * "Settings" - view settings of document exported ;
- * "Styles" - document styles exported ;
- * @param fileURL XML file name (in form file:///) to be exported to.
- */
- public static void exportDocument(XMultiServiceFactory xMSF, XComponent xDoc,
- String docType, String exportType, String fileURL)
- throws com.sun.star.uno.Exception {
- XDocumentHandler xDocHandWriter = XMLTools.getFileXMLWriter(xMSF, fileURL) ;
- Any arg = new Any(new Type(XDocumentHandler.class), xDocHandWriter);
- XInterface oExp = (XInterface)xMSF.createInstanceWithArguments(
- "com.sun.star.comp." + docType + ".XML" + exportType + "Exporter",
- new Object[] {arg});
- XExporter xExp = UnoRuntime.queryInterface
- (XExporter.class, oExp) ;
- xExp.setSourceDocument(xDoc) ;
-
- XFilter filter = UnoRuntime.queryInterface(XFilter.class, oExp) ;
- filter.filter(XMLTools.createMediaDescriptor(
- new String[] {"FilterName"},
- new Object[] {"Custom filter"})) ;
- }
-
- /**
- * Imports document (the whole or a part) from the file specified
- * in XML format.
- * @param xMSF Soffice ServiceManager factory.
- * @param xDoc Target document to be imported.
- * @param docType Type of document (for example 'Calc', 'Writer', 'Draw')
- * The type must start with capital letter.
- * @param importType The type of export specifies if the whole
- * document will be exported or one of its parts (Meta info, Styles, etc.).
- * The following types supported (it hardly depends of XML data in file) :
- * "" (empty string) - for the whole document ;
- * "Content" - only content exported ;
- * "Meta" - meta document info exported ;
- * "Settings" - view settings of document exported ;
- * "Styles" - document styles exported ;
- * @param fileURL XML file name (in form file:///) to be imported from.
- */
- public static void importDocument(XMultiServiceFactory xMSF, XComponent xDoc,
- String docType, String importType, String fileURL)
- throws com.sun.star.uno.Exception {
-
- XInterface oImp = (XInterface)xMSF.createInstance(
- "com.sun.star.comp." + docType + ".XML" + importType + "Importer");
- XImporter xImp = UnoRuntime.queryInterface
- (XImporter.class, oImp) ;
- XDocumentHandler xDocHandImp = UnoRuntime.queryInterface
- (XDocumentHandler.class, oImp) ;
-
- xImp.setTargetDocument(xDoc) ;
- parseXMLFile(xMSF, fileURL, xDocHandImp) ;
- }
}
diff --git a/qadevOOo/runner/util/compare/DocComparator.java b/qadevOOo/runner/util/compare/DocComparator.java
index 3521876f10d2..8503fda8254a 100644
--- a/qadevOOo/runner/util/compare/DocComparator.java
+++ b/qadevOOo/runner/util/compare/DocComparator.java
@@ -29,15 +29,13 @@ public interface DocComparator {
public boolean isReferenceExistent() throws IOException;
- public void createReference() throws IOException;
- public boolean compare() throws IOException;
+
+
public boolean isDiffReferenceExistent() throws IOException;
- public void createDiffReference() throws IOException;
-
public boolean compareDiff() throws IOException;
}
diff --git a/qadevOOo/runner/util/compare/GraphicalComparator.java b/qadevOOo/runner/util/compare/GraphicalComparator.java
index f52e8f0bbfd7..30a39d3fdebc 100644
--- a/qadevOOo/runner/util/compare/GraphicalComparator.java
+++ b/qadevOOo/runner/util/compare/GraphicalComparator.java
@@ -51,24 +51,7 @@ class GraphicalComparator implements DocComparator
return a;
}
- /**
- * return a (FileFilter) function, which returns true, if the filename is a '*.prn' file
- */
- FileFilter getTrueIfPRNFile_FileFilter()
- {
- FileFilter aFileFilter = new FileFilter()
- {
- public boolean accept( File pathname )
- {
- if (pathname.getName().endsWith(".prn"))
- {
- return true;
- }
- return false;
- }
- };
- return aFileFilter;
- }
+
/**
* build a new file from _sEntry by
diff --git a/qadevOOo/runner/util/dbg.java b/qadevOOo/runner/util/dbg.java
index 99b0929bfbb4..2d711a1235c9 100644
--- a/qadevOOo/runner/util/dbg.java
+++ b/qadevOOo/runner/util/dbg.java
@@ -83,29 +83,7 @@ public class dbg {
return types;
}
- /**
- * Returns true if a specified target implements the interface with the
- * given name. Note that the comparison is not case sensitive.
- * @param xTarget The implementation which should be analysed.
- * @param ifcName The name of the interface that is tested. The name can
- * be full qualified, such as 'com.sun.star.io.XInputStream', or only
- * consist of the interface name, such as 'XText'.
- * @return True, if xTarget implements the interface named ifcType
- * @see com.sun.star.uno.XInterface
- */
- public static boolean implementsInterface(
- XInterface xTarget, String ifcName) {
- Type[] types = getInterfaceTypes(xTarget);
- if( null != types ) {
- int nLen = types.length;
- for( int i = 0; i < nLen ; i++ ) {
- if(types[i].getTypeName().toLowerCase().endsWith(
- ifcName.toLowerCase()))
- return true;
- }
- }
- return false;
- }
+
/**
* Prints information about an interface type.
@@ -203,18 +181,7 @@ public class dbg {
}
}
- /**
- * Print the names and the values of a sequnze of PropertyValue
- * to to standard out.
- * @param ps The property which should displayed
- * @see com.sun.star.beans.PropertyValue
- */
- public static void printProperyValueSequenzePairs(PropertyValue[] ps){
- for( int i = 0; i < ps.length; i++){
- printProperyValuePairs(ps[i], new PrintWriter(System.out));
- }
- }
/**
* Print the names and the values of a sequenze of PropertyValue
@@ -229,14 +196,7 @@ public class dbg {
}
}
- /**
- * Print the name and the value of a PropertyValue to to standard out.
- * @param ps The property which should displayed
- * @see com.sun.star.beans.PropertyValue
- */
- public static void printProperyValuePairs(PropertyValue ps){
- printProperyValuePairs(ps, new PrintWriter(System.out));
- }
+
/**
* Print the name and the value of a PropertyValue to a print writer.
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 73664ce6989a..332a85deae47 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -215,38 +215,7 @@ public class utils {
return;
}
- /**
- *
- * This method get the version for a given TestBase/platform combination
- *
- */
- public static String getVersion(String aFile, String aPlatform, String aTestbase) {
- if ((aFile == null) || (aPlatform == null) || (aTestbase == null)) {
- return "/";
- }
- File the_file = new File(aFile);
- try {
- RandomAccessFile raf = new RandomAccessFile(the_file, "r");
- String res = "";
- while (!res.equals("[" + aTestbase.toUpperCase() + "]")) {
- res = raf.readLine();
- }
- res = "=/";
- while ((!res.startsWith(aPlatform)) || (res.startsWith("["))) {
- res = raf.readLine();
- }
- raf.close();
- if (res.startsWith("[")) {
- res = "/";
- }
- return res.substring(res.indexOf("=") + 1);
-
- } catch (Exception e) {
- System.out.println("Couldn't find version");
- return "/";
- }
- }
/**
*
@@ -307,24 +276,7 @@ public class utils {
return settingPath;
}
- public static void setOfficeSettingsValue(XMultiServiceFactory msf, String setting, String value) {
- try {
- Object settings = msf.createInstance("com.sun.star.comp.framework.PathSettings");
- XPropertySet pthSettings = null;
- try {
- pthSettings = (XPropertySet) AnyConverter.toObject(
- new Type(XPropertySet.class), settings);
- } catch (com.sun.star.lang.IllegalArgumentException iae) {
- System.out.println("### couldn't get Office Settings");
- }
- pthSettings.setPropertyValue(setting, value);
-
- } catch (Exception e) {
- System.out.println("Couldn't set '" + setting + "' to value '" + value + "'");
- e.printStackTrace();
- }
- }
/**
* This method returns the temp dicrectory of the user.
@@ -570,15 +522,7 @@ public class utils {
return true;
}
- public static void doOverwriteFile(
- XMultiServiceFactory xMsf, String oldF, String newF)
- {
- try {
- overwriteFile_impl(xMsf, oldF, newF);
- } catch (InteractiveAugmentedIOException e) {
- throw new RuntimeException(e);
- }
- }
+
public static boolean hasPropertyByName(XPropertySet props, String aName) {
Property[] list = props.getPropertySetInfo().getProperties();
@@ -687,20 +631,7 @@ public class utils {
return null;
}
- /** returns the path to the office binary folder
- *
- * @param msf The XMultiSeriveFactory
- * @return the path to the office binrary or an empty string on any error
- */
- public static String getOfficeBinPath(XMultiServiceFactory msf) {
- String sysBinDir = "";
- try {
- sysBinDir = utils.getSystemURL(utils.expandMacro(msf, "$SYSBINDIR"));
- } catch (java.lang.Exception e) {
- }
- return sysBinDir;
- }
/**
* Get an array of all property names from the property set. With the include
@@ -871,37 +802,7 @@ public class utils {
}
- /**
- * returns the platform of the office.
- * Since the runner and the office could run on different platform this function delivers the
- * platform the office is running.
- * @param xMSF the XMultiServiceFactory
- * @return unxsols, unxsoli, unxlngi, wntmsci
- */
- public static String getOfficeOS(XMultiServiceFactory xMSF) {
- String platform = "unknown";
- try {
- String theOS = expandMacro(xMSF, "$_OS");
-
- if (theOS.equals("Windows")) {
- platform = "wntmsci";
- } else if (theOS.equals("Linux")) {
- platform = "unxlngi";
- } else {
- if (theOS.equals("Solaris")) {
- String theArch = expandMacro(xMSF, "$_ARCH");
- if (theArch.equals("SPARC")) {
- platform = "unxsols";
- } else if (theArch.equals("x86")) {
- platform = "unxsoli";
- }
- }
- }
- } catch (Exception ex) {
- }
- return platform;
- }
/**
* dispatches given URL to the document XComponent
diff --git a/reportbuilder/Jar_reportbuilder.mk b/reportbuilder/Jar_reportbuilder.mk
index 4dd30307471e..325a1029f897 100644
--- a/reportbuilder/Jar_reportbuilder.mk
+++ b/reportbuilder/Jar_reportbuilder.mk
@@ -46,16 +46,13 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/ImageService \
reportbuilder/java/org/libreoffice/report/InputRepository \
reportbuilder/java/org/libreoffice/report/JobDefinitionException \
- reportbuilder/java/org/libreoffice/report/JobProgressIndicator \
reportbuilder/java/org/libreoffice/report/JobProperties \
reportbuilder/java/org/libreoffice/report/OfficeToken \
reportbuilder/java/org/libreoffice/report/OutputRepository \
reportbuilder/java/org/libreoffice/report/ParameterMap \
- reportbuilder/java/org/libreoffice/report/ReportAddIn \
reportbuilder/java/org/libreoffice/report/ReportEngineMetaData \
reportbuilder/java/org/libreoffice/report/ReportEngineParameterNames \
reportbuilder/java/org/libreoffice/report/ReportExecutionException \
- reportbuilder/java/org/libreoffice/report/ReportExpression \
reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData \
reportbuilder/java/org/libreoffice/report/ReportJob \
reportbuilder/java/org/libreoffice/report/ReportJobDefinition \
diff --git a/reportbuilder/java/org/libreoffice/report/ImageService.java b/reportbuilder/java/org/libreoffice/report/ImageService.java
index 91037841d416..e7d484bea58d 100644
--- a/reportbuilder/java/org/libreoffice/report/ImageService.java
+++ b/reportbuilder/java/org/libreoffice/report/ImageService.java
@@ -24,11 +24,7 @@ import java.io.InputStream;
public interface ImageService
{
- /**
- * @param image
- * @return the mime-type of the image as string.
- */
- String getMimeType(final InputStream image) throws ReportExecutionException;
+
/**
* @param image
@@ -36,12 +32,7 @@ public interface ImageService
*/
String getMimeType(final byte[] image) throws ReportExecutionException;
- /**
- * @param image
- * @returns the dimension in 100th mm.
- * @throws ReportExecutionException
- **/
- Size getImageSize(final InputStream image) throws ReportExecutionException;
+
/**
* @param image
diff --git a/reportbuilder/java/org/libreoffice/report/InputRepository.java b/reportbuilder/java/org/libreoffice/report/InputRepository.java
index bbaec3eaafe2..858210694bbe 100644
--- a/reportbuilder/java/org/libreoffice/report/InputRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/InputRepository.java
@@ -64,7 +64,7 @@ public interface InputRepository
*/
long getVersion(final String name);
- boolean exists(final String name);
+
boolean isReadable(final String name);
diff --git a/reportbuilder/java/org/libreoffice/report/JobProgressIndicator.java b/reportbuilder/java/org/libreoffice/report/JobProgressIndicator.java
deleted file mode 100644
index 2f51de5fae7a..000000000000
--- a/reportbuilder/java/org/libreoffice/report/JobProgressIndicator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.libreoffice.report;
-
-/**
- * Based on
- * http://api.libreoffice.org/docs/common/ref/com/sun/star/task/XStatusIndicator.html
- *
- */
-public interface JobProgressIndicator
-{
-
- /**
- * Updates the progress description.
- *
- * @param string the new description
- */
- void setText(String string);
-
- /**
- * Initializes the progress indicator and sets the progress description to
- * the text given in the parameter text. The progress values
- * passed to this indicator will not exceed the given maxValue.
- * The value range of this indicator is set to 0 to maxValue
- * Stopped indicators must ignore that call.
- *
- * @param string the progress description
- * @param text
- * @param maxValue the maximum value
- * @see JobProgressIndicator#setText(String)
- */
- void start(String text, int maxValue);
-
- /**
- * Updates the value to the specified value. Invalid values must be ignored.
- * Stopped indicators must ignore that call.
- *
- * @param value the new value that should be shown now. This must fit the
- * range [0..maxValue] as defined in {@link JobProgressIndicator#start(String, int)}.
- */
- void setValue(int value);
-
- /**
- * Stop the progress. A progress indicator cannot be destructed before end()
- * has been called.
- */
- void end();
-
- /**
- * Clear progress value and description. Calling of setValue(0) and
- * setText("") should do the same. Stopped indicators must ignore this call.
- */
- void reset();
-}
diff --git a/reportbuilder/java/org/libreoffice/report/OutputRepository.java b/reportbuilder/java/org/libreoffice/report/OutputRepository.java
index ae1653225401..b7be98d4dd8a 100644
--- a/reportbuilder/java/org/libreoffice/report/OutputRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/OutputRepository.java
@@ -55,7 +55,7 @@ public interface OutputRepository
boolean existsStorage(final String name);
- boolean isWritable(final String name);
+
void closeOutputRepository();
}
diff --git a/reportbuilder/java/org/libreoffice/report/ParameterMap.java b/reportbuilder/java/org/libreoffice/report/ParameterMap.java
index c1d8fae9a931..4facd66ef260 100644
--- a/reportbuilder/java/org/libreoffice/report/ParameterMap.java
+++ b/reportbuilder/java/org/libreoffice/report/ParameterMap.java
@@ -19,17 +19,6 @@ package org.libreoffice.report;
public interface ParameterMap
{
-
- /**
- * Adds a property to this properties collection. If a property with the given name
- * exist, the property will be replaced with the new value. If the value is null, the
- * property will be removed.
- *
- * @param key the property key.
- * @param value the property value.
- */
- public void put(final String key, final Object value);
-
/**
* Retrieves the value stored for a key in this properties collection.
*
@@ -39,21 +28,5 @@ public interface ParameterMap
*/
Object get(final String key);
- /**
- * Retrieves the value stored for a key in this properties collection, and returning the
- * default value if the key was not stored in this properties collection.
- *
- * @param key the property key.
- * @param defaultValue the default value to be returned when the key is not stored in
- * this properties collection.
- * @return The stored value, or the default value if the key does not exist in this
- * collection.
- */
- Object get(final String key, final Object defaultValue);
-
String[] keys();
-
- void clear();
-
- int size();
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportAddIn.java b/reportbuilder/java/org/libreoffice/report/ReportAddIn.java
deleted file mode 100644
index 60c15b80d5a1..000000000000
--- a/reportbuilder/java/org/libreoffice/report/ReportAddIn.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.libreoffice.report;
-
-/**
- * A report add-in defines a set of expressions, which can
- * be used in the reporting.
- *
- * Each expression must provide meta-data to support GUI implementors.
- * Expressions are assumed to be statefull, if they are not, they are
- * free to be implemented as stateless expression.
- */
-public interface ReportAddIn
-{
-
- int getExpressionCount();
-
- ReportExpression createExpression(int expression);
-
- ReportExpressionMetaData getMetaData(int expression);
-}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java b/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java
index f38693b9bfcf..d99b2da9bc8d 100644
--- a/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java
+++ b/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java
@@ -20,28 +20,15 @@ package org.libreoffice.report;
public interface ReportEngineMetaData
{
- /**
- * Checks, whether a certain output type is available.
- * Feed the mime-type of the output type in and you'll get
- * a true or false back.
- *
- * @param mimeType
- * @return true, if the output type is supported; false otherwise.
- */
- boolean isOutputSupported(String mimeType);
- /**
- * Lists all supported output parameters for the given mime-type.
- * This listing can be used to build a generic user interface for
- * configuring a certain output.
- */
- String[] getOutputParameters(String mimeType);
+
+
Class getParameterType(String parameter);
- boolean isMandatory(String parameter);
- boolean isEnumeration(String parameter);
- Object[] getEnumerationValues(String parameter);
+
+
+
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportExpression.java b/reportbuilder/java/org/libreoffice/report/ReportExpression.java
deleted file mode 100644
index d9fdeb2d4b64..000000000000
--- a/reportbuilder/java/org/libreoffice/report/ReportExpression.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.libreoffice.report;
-
-/**
- * Expressions are simple computation components.
- *
- * Expressions are always assumed to be immutable. They are not allowed to
- * change their state and it is not guaranteed, in which order they get called.
- * If the expression has been called before, the last computed value will be
- * available from the datarow.
- *
- * This construct allows us to write expressions in the form
- * "Sum := Sum + Column".
- *
- * Multiple calls to getValue on the same expression instance must return the
- * same value (assuming that the datarow passed in is the same).
- */
-public interface ReportExpression
-{
-
- void setParameters(Object[] parameters);
-
- Object getParameters();
-
- Object getValue(DataRow row);
-}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java b/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
index b4c359e5502c..3b58c7a8ce11 100644
--- a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
+++ b/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
@@ -22,17 +22,17 @@ import java.util.Locale;
public interface ReportExpressionMetaData
{
- int getParameterCount();
- String getParameterName(int param);
- String getParameterDisplayName(int param, Locale locale);
- String getParameterDescription(int param, Locale locale);
- String getName();
- String getDisplayName(Locale l);
- String getDescription(Locale l);
+
+
+
+
+
+
+
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportJob.java b/reportbuilder/java/org/libreoffice/report/ReportJob.java
index 1bbcdec436ee..450845155ff1 100644
--- a/reportbuilder/java/org/libreoffice/report/ReportJob.java
+++ b/reportbuilder/java/org/libreoffice/report/ReportJob.java
@@ -55,27 +55,4 @@ public interface ReportJob
void execute()
throws ReportExecutionException, IOException;
- /**
- * Interrupt the job.
- */
- void interrupt();
-
- /**
- * Queries the jobs execution status.
- *
- * @return true, if the job is currently running, false otherwise.
- */
- boolean isRunning();
-
- /**
- * Queries the jobs result status.
- *
- * @return true, if the job is finished (or has been interrupted), false
- * if the job waits for activation.
- */
- boolean isFinished();
-
- void addProgressIndicator(JobProgressIndicator indicator);
-
- void removeProgressIndicator(JobProgressIndicator indicator);
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
index bbd915c87222..fc4e689dc844 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
@@ -17,8 +17,6 @@
*/
package org.libreoffice.report.pentaho;
-import org.libreoffice.report.ReportAddIn;
-import org.libreoffice.report.ReportExpression;
import org.libreoffice.report.ReportExpressionMetaData;
import org.libreoffice.report.pentaho.expressions.SumExpression;
@@ -26,14 +24,14 @@ import org.libreoffice.report.pentaho.expressions.SumExpression;
* This class is a dummy implementation. Ignore it for now, we may extend this
* one later.
*/
-public class PentahoReportAddIn implements ReportAddIn
+public class PentahoReportAddIn
{
public PentahoReportAddIn()
{
}
- public ReportExpression createExpression(final int expression)
+ public SumExpression createExpression(final int expression)
{
return (expression == 0) ? new SumExpression() : null;
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
index b7c480467305..0a8586b56d2f 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
@@ -21,7 +21,6 @@ import org.libreoffice.report.DataSourceFactory;
import org.libreoffice.report.ImageService;
import org.libreoffice.report.InputRepository;
import org.libreoffice.report.JobDefinitionException;
-import org.libreoffice.report.JobProgressIndicator;
import org.libreoffice.report.JobProperties;
import org.libreoffice.report.OutputRepository;
import org.libreoffice.report.ParameterMap;
@@ -77,7 +76,6 @@ public class PentahoReportJob implements ReportJob
private static final Log LOGGER = LogFactory.getLog(PentahoReportJob.class);
private boolean finished;
- private final List listeners;
private final DataSourceFactory dataSourceFactory;
private final OutputRepository outputRepository;
private final JobProperties jobProperties;
@@ -104,7 +102,6 @@ public class PentahoReportJob implements ReportJob
}
this.definition = definition;
- this.listeners = new ArrayList();
this.jobProperties = definition.getProcessingParameters().copy();
this.dataSourceFactory = (DataSourceFactory) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY);
@@ -182,11 +179,6 @@ public class PentahoReportJob implements ReportJob
return tempReport;
}
- public void addProgressIndicator(final JobProgressIndicator indicator)
- {
- listeners.add(indicator);
- }
-
/**
* Interrupt the job.
*/
@@ -206,10 +198,7 @@ public class PentahoReportJob implements ReportJob
return finished;
}
- public void finish()
- {
- finished = true;
- }
+
/**
* Queries the jobs execution status.
@@ -221,11 +210,6 @@ public class PentahoReportJob implements ReportJob
return !finished;
}
- public void removeProgressIndicator(final JobProgressIndicator indicator)
- {
- listeners.remove(indicator);
- }
-
private void collectGroupExpressions(final Node[] nodes, final List