summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-13 10:08:31 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 10:24:10 +0200
commit34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch)
tree4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /forms
parent347926e8e57c1825261daa46c1886aa2ebf9571b (diff)
java: remove dead methods
found by UCDetector Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'forms')
-rw-r--r--forms/qa/complex/forms/CheckOGroupBoxModel.java5
-rw-r--r--forms/qa/integration/forms/DocumentHelper.java21
-rw-r--r--forms/qa/integration/forms/DocumentType.java17
-rw-r--r--forms/qa/integration/forms/DocumentViewHelper.java30
-rw-r--r--forms/qa/integration/forms/FormComponent.java18
-rw-r--r--forms/qa/integration/forms/FormLayer.java41
-rw-r--r--forms/qa/org/openoffice/xforms/Instance.java39
-rw-r--r--forms/qa/org/openoffice/xforms/Model.java5
8 files changed, 11 insertions, 165 deletions
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<xForm.getCount(); ++i )
- {
- XPropertySet xControlProps = dbfTools.queryPropertySet( xForm.getByIndex( i ) );
- if ( FormComponentType.FIXEDTEXT != ((Short)xControlProps.getPropertyValue( "ClassId" )).shortValue() )
- {
- XControlModel xControlModel = UnoRuntime.queryInterface(
- XControlModel.class, xControlProps );
- // set the focus to this control
- grabControlFocus( xControlModel );
- // outta here
- break;
- }
- }
-
- // Note that we simply took the first control model from the hierarchy. This does state nothing
- // about the location of the respective control in the view. A control model is tied to a control
- // shape, and the shapes are where the geometry information such as position and size is hung up.
- // So you could easily have a document where the first control model is bound to a shape which
- // has a greater ordinate than any other control model.
- }
}
diff --git a/forms/qa/integration/forms/FormComponent.java b/forms/qa/integration/forms/FormComponent.java
index 51f92a142aba..89b8f91b83c7 100644
--- a/forms/qa/integration/forms/FormComponent.java
+++ b/forms/qa/integration/forms/FormComponent.java
@@ -108,13 +108,7 @@ public class FormComponent
return new String[]{};
}
- /* ------------------------------------------------------------------ */
- public boolean hasByName( String name )
- {
- if ( m_nameAccess != null )
- return m_nameAccess.hasByName( name );
- return false;
- }
+
/* ------------------------------------------------------------------ */
public int getCount()
@@ -150,15 +144,7 @@ public class FormComponent
return new com.sun.star.uno.Type( String.class );
}
- /* ------------------------------------------------------------------ */
- public boolean hasElements()
- {
- if ( m_indexAccess != null )
- return m_indexAccess.hasElements();
- else if ( m_nameAccess != null )
- return m_nameAccess.hasElements();
- return false;
- }
+
/* ------------------------------------------------------------------ */
public FormComponent getParent()
diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java
index 4c5ccbea5ba8..67c2c266696c 100644
--- a/forms/qa/integration/forms/FormLayer.java
+++ b/forms/qa/integration/forms/FormLayer.java
@@ -276,29 +276,7 @@ public class FormLayer
return null;
}
- /* ------------------------------------------------------------------ */
- /** retrieves the radio button model with the given name and the given tag
- * @param form
- * the parent form of the radio button model to find
- * @param name
- * the name of the radio button
- * @param tag
- * the tag of the radio button
- */
- public XPropertySet getRadioModelByTag( XPropertySet form, String name, String tag ) throws com.sun.star.uno.Exception, java.lang.Exception
- {
- XIndexAccess indexAccess = UnoRuntime.queryInterface( XIndexAccess.class, form );
- for ( int i=0; i<indexAccess.getCount(); ++i )
- {
- XPropertySet control = dbfTools.queryPropertySet( indexAccess.getByIndex( i ) );
-
- if ( ((String)control.getPropertyValue( "Name" )).equals( name ) )
- if ( ((String)control.getPropertyValue( "Tag" )).equals( tag ) )
- return control;
- }
- return null;
- }
/* ------------------------------------------------------------------ */
/** retrieves a control model with a given (integer) access path
@@ -320,24 +298,7 @@ public class FormLayer
return controlModel;
}
- /* ------------------------------------------------------------------ */
- /** retrieves a control model with a given (string) access path
- */
- public XPropertySet getControlModel( String[] _accessPath ) throws com.sun.star.uno.Exception
- {
- XNameAccess nameAcc = m_document.getFormComponentTreeRoot();
- XPropertySet controlModel = null;
- int i=0;
- while ( ( nameAcc != null ) && ( i < _accessPath.length ) )
- {
- controlModel = UnoRuntime.queryInterface( XPropertySet.class,
- nameAcc.getByName( _accessPath[i] ) );
- nameAcc = UnoRuntime.queryInterface( XNameAccess.class,
- controlModel );
- ++i;
- }
- return controlModel;
- }
+
/* ------------------------------------------------------------------ */
/** simulates a user's text input into a control given by control model
diff --git a/forms/qa/org/openoffice/xforms/Instance.java b/forms/qa/org/openoffice/xforms/Instance.java
index e9614bb5c0e7..e60a8e4ec448 100644
--- a/forms/qa/org/openoffice/xforms/Instance.java
+++ b/forms/qa/org/openoffice/xforms/Instance.java
@@ -47,18 +47,7 @@ public class Instance
return createElement( m_domInstance, _elementName, null );
}
- /** creates a new element in the instance
- *
- * The element will be inserted immediately below a given XNode.
- *
- * @param _parentElement the node whose child shall be created
- * @param _elementName the name of the to-be-created element
- * @return the node of the newly created element
- */
- public XNode createElement( XNode _parentElement, String _elementName ) throws DOMException
- {
- return createElement( _parentElement, _elementName, null );
- }
+
/** creates a new element in the instance
*
@@ -115,31 +104,9 @@ public class Instance
throw new NoSuchElementException();
}
- /** creates an attribute for the root node of the instance
- *
- * @param _attribName
- * the name of the to-be-created attribute
- * @return
- * the DOM node, which has already been inserted into the DOM tree
- */
- public XNode createAttribute( String _attribName ) throws DOMException
- {
- return createAttribute( m_domInstance, _attribName, null );
- }
- /** creates an attribute for the root node of the instance
- *
- * @param _attribName
- * the name of the to-be-created attribute
- * @param _initialNodeValue
- * the initial value to set at the node. Might be null, in this case no value is set.
- * @return
- * the DOM node, which has already been inserted into the DOM tree
- */
- public XNode createAttribute( String _attribName, String _initialNodeValue ) throws DOMException
- {
- return createAttribute( m_domInstance, _attribName, _initialNodeValue );
- }
+
+
/** creates an attribute for the given node
*
diff --git a/forms/qa/org/openoffice/xforms/Model.java b/forms/qa/org/openoffice/xforms/Model.java
index ff3829c9e745..c8e5c880042a 100644
--- a/forms/qa/org/openoffice/xforms/Model.java
+++ b/forms/qa/org/openoffice/xforms/Model.java
@@ -38,10 +38,7 @@ public class Model
m_model );
}
- protected XModel getXModel()
- {
- return m_model;
- }
+
protected XFormsUIHelper1 getUIHelper()
{