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 | |
parent | 347926e8e57c1825261daa46c1886aa2ebf9571b (diff) |
java: remove dead methods
found by UCDetector
Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'bean')
-rw-r--r-- | bean/Jar_officebean.mk | 1 | ||||
-rw-r--r-- | bean/com/sun/star/beans/ContainerFactory.java | 7 | ||||
-rw-r--r-- | bean/com/sun/star/beans/LocalOfficeConnection.java | 13 | ||||
-rw-r--r-- | bean/com/sun/star/beans/LocalOfficeWindow.java | 2 | ||||
-rw-r--r-- | bean/com/sun/star/beans/OfficeConnection.java | 20 | ||||
-rw-r--r-- | bean/com/sun/star/beans/OfficeWindow.java | 46 | ||||
-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 |
10 files changed, 7 insertions, 292 deletions
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 @@ -159,19 +159,6 @@ public class LocalOfficeConnection } /** - * 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. */ public void dispose() 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. <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. |