From 34bcf9b498bccb5c924f4cec850ff15d88df6f07 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Aug 2014 10:08:31 +0200 Subject: java: remove dead methods found by UCDetector Change-Id: I219caa8e680dba5a395541a778df6144841c4dde --- forms/qa/complex/forms/CheckOGroupBoxModel.java | 5 +-- forms/qa/integration/forms/DocumentHelper.java | 21 +---------- forms/qa/integration/forms/DocumentType.java | 17 ++------- forms/qa/integration/forms/DocumentViewHelper.java | 30 ---------------- forms/qa/integration/forms/FormComponent.java | 18 ++-------- forms/qa/integration/forms/FormLayer.java | 41 +--------------------- forms/qa/org/openoffice/xforms/Instance.java | 39 ++------------------ forms/qa/org/openoffice/xforms/Model.java | 5 +-- 8 files changed, 11 insertions(+), 165 deletions(-) (limited to 'forms/qa') 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