diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:08:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 10:24:10 +0200 |
commit | 34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch) | |
tree | 4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /bean/com/sun/star/comp | |
parent | 347926e8e57c1825261daa46c1886aa2ebf9571b (diff) |
java: remove dead methods
found by UCDetector
Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'bean/com/sun/star/comp')
-rw-r--r-- | bean/com/sun/star/comp/beans/ContainerFactory.java | 7 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/Controller.java | 8 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/OOoBean.java | 187 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/OfficeConnection.java | 8 |
4 files changed, 3 insertions, 207 deletions
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. <p> @@ -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. |