diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-19 16:03:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-05 08:23:29 +0200 |
commit | 43cc8ad33e815522e2b23ac87a4a9c4526cd85c9 (patch) | |
tree | b042266508f8b084bc7bbe9cc57250a971311099 /forms | |
parent | cfcbe2e44e33f4a60e70006ff5e1cbb9aa2adceb (diff) |
java: remove dead code
found by UCDetector
Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
Diffstat (limited to 'forms')
-rw-r--r-- | forms/qa/integration/forms/FormComponent.java | 58 | ||||
-rw-r--r-- | forms/qa/integration/forms/SpreadsheetDocument.java | 70 | ||||
-rw-r--r-- | forms/qa/org/openoffice/xforms/XMLDocument.java | 7 |
3 files changed, 4 insertions, 131 deletions
diff --git a/forms/qa/integration/forms/FormComponent.java b/forms/qa/integration/forms/FormComponent.java index 301472760f29..1861c084e0cf 100644 --- a/forms/qa/integration/forms/FormComponent.java +++ b/forms/qa/integration/forms/FormComponent.java @@ -24,15 +24,12 @@ import com.sun.star.container.XIndexAccess; import com.sun.star.container.XChild; import com.sun.star.container.XNamed; import com.sun.star.drawing.XDrawPage; -import com.sun.star.lang.XServiceInfo; public class FormComponent { private final Object m_component; private final XNameAccess m_nameAccess; private final XIndexAccess m_indexAccess; - private final XChild m_child; - private final XNamed m_named; /* ------------------------------------------------------------------ */ private FormComponent() @@ -40,8 +37,6 @@ public class FormComponent m_component = null; m_nameAccess = null; m_indexAccess = null; - m_child = null; - m_named = null; } /* ------------------------------------------------------------------ */ @@ -54,9 +49,9 @@ public class FormComponent m_nameAccess = (XNameAccess)m_component; m_indexAccess = UnoRuntime.queryInterface( XIndexAccess.class, m_component ); - m_child = UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XChild.class, m_component ); - m_named = UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XNamed.class, m_component ); } @@ -68,9 +63,9 @@ public class FormComponent XNameAccess.class, m_component ); m_indexAccess = UnoRuntime.queryInterface( XIndexAccess.class, m_component ); - m_child = UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XChild.class, m_component ); - m_named = UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XNamed.class, m_component ); } @@ -101,20 +96,6 @@ public class FormComponent } /* ------------------------------------------------------------------ */ - public String[] getElementNames() - { - return ( m_nameAccess != null ) ? m_nameAccess.getElementNames() : new String[]{}; - } - - - - /* ------------------------------------------------------------------ */ - public int getCount() - { - return ( m_indexAccess != null ) ? m_indexAccess.getCount() : 0; - } - - /* ------------------------------------------------------------------ */ public FormComponent getByIndex( int index ) { try @@ -130,35 +111,4 @@ public class FormComponent return new FormComponent(); } - /* ------------------------------------------------------------------ */ - public com.sun.star.uno.Type getElementType( ) - { - if ( m_indexAccess != null ) - return m_indexAccess.getElementType(); - else if ( m_nameAccess != null ) - return m_nameAccess.getElementType(); - return new com.sun.star.uno.Type( String.class ); - } - - - - /* ------------------------------------------------------------------ */ - public FormComponent getParent() - { - return ( m_child != null ) ? new FormComponent( m_child.getParent() ) : new FormComponent(); - } - - /* ------------------------------------------------------------------ */ - public String getName() - { - return ( m_named != null ) ? m_named.getName() : ""; - } - - /* ------------------------------------------------------------------ */ - public String getImplementationName() - { - XServiceInfo si = UnoRuntime.queryInterface( - XServiceInfo.class, m_component ); - return ( si != null ) ? si.getImplementationName() : ""; - } } diff --git a/forms/qa/integration/forms/SpreadsheetDocument.java b/forms/qa/integration/forms/SpreadsheetDocument.java index d8aaaf8e92b9..2db38ab92300 100644 --- a/forms/qa/integration/forms/SpreadsheetDocument.java +++ b/forms/qa/integration/forms/SpreadsheetDocument.java @@ -22,12 +22,9 @@ import com.sun.star.uno.*; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XComponent; import com.sun.star.table.XCellRange; -import com.sun.star.table.CellAddress; -import com.sun.star.table.CellRangeAddress; import com.sun.star.container.XIndexAccess; import com.sun.star.sheet.XSpreadsheetDocument; import com.sun.star.sheet.XSpreadsheets; -import com.sun.star.beans.NamedValue; public class SpreadsheetDocument extends DocumentHelper { @@ -68,71 +65,4 @@ public class SpreadsheetDocument extends DocumentHelper ); } - /* ------------------------------------------------------------------ */ - /** creates a value binding for a given cell - */ - public com.sun.star.form.binding.XValueBinding createCellBinding( short sheet, short column, short row ) - { - return createCellBinding( sheet, column, row, false ); - } - - /* ------------------------------------------------------------------ */ - /** creates a value binding which can be used to exchange a list box selection <em>index</em> with a cell - */ - public com.sun.star.form.binding.XValueBinding createListIndexBinding( short sheet, short column, short row ) - { - return createCellBinding( sheet, column, row, true ); - } - - /* ------------------------------------------------------------------ */ - /** creates a value binding for a given cell, with or without support for integer value exchange - */ - private com.sun.star.form.binding.XValueBinding createCellBinding( short sheet, short column, short row, boolean supportIntegerValues ) - { - com.sun.star.form.binding.XValueBinding cellBinding = null; - try - { - CellAddress address = new CellAddress( sheet, column, row ); - Object[] initParam = new Object[] { new NamedValue( "BoundCell", address ) }; - cellBinding = UnoRuntime.queryInterface( - com.sun.star.form.binding.XValueBinding.class, - createInstanceWithArguments( - supportIntegerValues ? "com.sun.star.table.ListPositionCellBinding" - : "com.sun.star.table.CellValueBinding", - initParam - ) - ); - } - catch( com.sun.star.uno.Exception e ) - { - System.err.println( e ); - e.printStackTrace( System.err ); - } - return cellBinding; - } - - /* ------------------------------------------------------------------ */ - /** creates a source of list entries associated with a (one-column) cell range - */ - public com.sun.star.form.binding.XListEntrySource createListEntrySource( short sheet, short column, - short topRow, short bottomRow ) - { - com.sun.star.form.binding.XListEntrySource entrySource = null; - try - { - CellRangeAddress rangeAddress = new CellRangeAddress( sheet, column, - topRow, column, bottomRow ); - Object[] initParam = new Object[] { new NamedValue( "CellRange", rangeAddress ) }; - entrySource = UnoRuntime.queryInterface( - com.sun.star.form.binding.XListEntrySource.class, - createInstanceWithArguments( - "com.sun.star.table.CellRangeListSource", initParam ) ); - } - catch( com.sun.star.uno.Exception e ) - { - System.err.println( e ); - e.printStackTrace( System.err ); - } - return entrySource; - } } diff --git a/forms/qa/org/openoffice/xforms/XMLDocument.java b/forms/qa/org/openoffice/xforms/XMLDocument.java index d16ab5bd6047..d4dfcbc21812 100644 --- a/forms/qa/org/openoffice/xforms/XMLDocument.java +++ b/forms/qa/org/openoffice/xforms/XMLDocument.java @@ -42,13 +42,6 @@ public class XMLDocument extends integration.forms.DocumentHelper } /* ------------------------------------------------------------------ */ - public XMLDocument( XMultiServiceFactory _orb, XComponent _document ) - { - super( _orb, _document ); - impl_initialize( _document ); - } - - /* ------------------------------------------------------------------ */ private void impl_initialize( XComponent _document ) { XFormsSupplier formsSupplier = UnoRuntime.queryInterface( XFormsSupplier.class, |