[Libreoffice-commits] core.git: 4 commits - forms/qa framework/qa nlpsolver/ThirdParty qadevOOo/runner reportbuilder/java wizards/com xmerge/source

Noel Grandin noel at peralex.com
Wed Aug 13 04:35:28 PDT 2014


 forms/qa/integration/forms/MasterDetailForms.java                                    |   33 ----
 framework/qa/complex/loadAllDocuments/StatusIndicator.java                           |   14 --
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java  |    2 
 nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java |    1 
 qadevOOo/runner/convwatch/FilenameHelper.java                                        |    2 
 qadevOOo/runner/convwatch/GraphicalTestArguments.java                                |    2 
 qadevOOo/runner/graphical/PropertyName.java                                          |    7 -
 reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java               |    2 
 wizards/com/sun/star/wizards/common/NumericalHelper.java                             |    2 
 wizards/com/sun/star/wizards/text/TextDocument.java                                  |    2 
 wizards/com/sun/star/wizards/ui/UIConsts.java                                        |   14 --
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java   |   70 ----------
 12 files changed, 11 insertions(+), 140 deletions(-)

New commits:
commit 5ce80c9728ac53ef4e1c8f68d6ef4b7be1f7bf1c
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 11 09:40:12 2014 +0200

    remove dead java constants
    
    found by UCDetector
    
    Change-Id: I1f8f5ba4f3ab1a1ef134dd0988f913dab7501351

diff --git a/framework/qa/complex/loadAllDocuments/StatusIndicator.java b/framework/qa/complex/loadAllDocuments/StatusIndicator.java
index 691b4c7..c682c4f 100644
--- a/framework/qa/complex/loadAllDocuments/StatusIndicator.java
+++ b/framework/qa/complex/loadAllDocuments/StatusIndicator.java
@@ -31,20 +31,6 @@ package complex.loadAllDocuments;
 public class StatusIndicator implements com.sun.star.task.XStatusIndicator
 {
 
-
-    /**
-     * @const SHOWSTATUS_NO         don't show the status - but save information about using of this indicator object
-     * @const SHOWSTATUS_LOG        the possible set protocol object will be used (it covers STDOUT, STDERR automatically too)
-     * @const SHOWSTATUS_DIALOG     the status will be shown inside a java dialog
-     * @const SHOWSTATUS_LINK       the status will be notified to interested listener (one listener only!)
-     */
-    public static final int SHOWSTATUS_NO       =   0;
-    public static final int SHOWSTATUS_LOG      =   1;
-    public static final int SHOWSTATUS_DIALOG   =   4;
-    public static final int SHOWSTATUS_LINK     =   8;
-
-
-
     private boolean         m_bWasUsed  ;
 
 
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java
index 7bfe6df..be7f00c 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java
@@ -16,5 +16,4 @@ public class CompareValue {
   public static final int LARGER_THAN = 2;
   public static final int EQUAL_TO = 1;
   public static final int LESS_THAN = 0;
-  public static final int INVALID = -1;
 }
diff --git a/qadevOOo/runner/graphical/PropertyName.java b/qadevOOo/runner/graphical/PropertyName.java
index 66f4d46..1c25b75 100644
--- a/qadevOOo/runner/graphical/PropertyName.java
+++ b/qadevOOo/runner/graphical/PropertyName.java
@@ -33,13 +33,6 @@ public interface PropertyName
     final public static String DOC_COMPARATOR_HTML_OUTPUT_PREFIX =         "DOC_COMPARATOR_HTML_OUTPUT_PREFIX";
 
 
-    final public static String DOC_CONVERTER_EXPORT_FILTER_NAME =          "DOC_CONVERTER_EXPORT_FILTER_NAME";
-
-
-
-
-
-
     final public static String OFFICE_VIEWABLE =                           "OFFICE_VIEWABLE";
 
     final public static String NO_SMALL_PICTURES = "NoSmallPictures";
diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.java b/wizards/com/sun/star/wizards/ui/UIConsts.java
index 9c4d77c..058b785 100644
--- a/wizards/com/sun/star/wizards/ui/UIConsts.java
+++ b/wizards/com/sun/star/wizards/ui/UIConsts.java
@@ -27,9 +27,7 @@ public interface UIConsts
     public static final int RID_QUERY = 2300;
     public static final int RID_REPORT = 2400;
     public static final int RID_TABLE = 2600;
-    public static final int RID_IMG_REPORT = 1000;
     public static final int RID_IMG_FORM = 1100;
-    public static final int RID_IMG_WEB = 1200;
     public static final Integer INVISIBLESTEP = 99;
     public static final String INFOIMAGEURL = "private:resource/dbu/image/19205";
     public static final String INFOIMAGEURL_HC = "private:resource/dbu/image/19230";
@@ -38,23 +36,13 @@ public interface UIConsts
      * high tabindex because on every step their taborder must appear at the end
      */
     public static final short SOFIRSTWIZARDNAVITABINDEX = 30000;
-    public static final Integer INTEGER_8 = 8;
     public static final Integer INTEGER_12 = 12;
-    public static final Integer INTEGER_14 = 14;
-    public static final Integer INTEGER_16 = 16;
-    public static final Integer INTEGER_40 = 40;
-    public static final Integer INTEGER_50 = 50;
     /**Steps of the QueryWizard
      *
      */
-    public static final int SOFIELDSELECTIONPAGE = 1;
-    public static final int SOSORTINGPAGE = 2;
-    public static final int SOFILTERPAGE = 3;
-    public static final int SOAGGREGATEPAGE = 4;
     public static final int SOGROUPSELECTIONPAGE = 5;
     public static final int SOGROUPFILTERPAGE = 6;
     public static final int SOTITLESPAGE = 7;
-    public static final int SOSUMMARYPAGE = 8;
     public static final Integer[] INTEGERS = new Integer[]
     {
         0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
@@ -71,11 +59,9 @@ public interface UIConsts
         public static final int RADIOBUTTON = 6;
         public static final int DATEFIELD = 7;
         public static final int EDITCONTROL = 8;
-        public static final int FILECONTROL = 9;
         public static final int FIXEDLINE = 10;
         public static final int FIXEDTEXT = 11;
         public static final int FORMATTEDFIELD = 12;
-        public static final int GROUPBOX = 13;
         public static final int HYPERTEXT = 14;
         public static final int NUMERICFIELD = 15;
         public static final int PATTERNFIELD = 16;
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java
index 6aae065..94c1f35 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java
@@ -72,42 +72,6 @@ public interface OfficeConstants {
     /** Element tag for <i>office:settings</i>. */
     public final static String TAG_OFFICE_SETTINGS = "office:settings";
 
- //Adding
-
-    /** Element tag for <i>text:variable-set</i>. */
-    public final static String TAG_TEXT_VARIABLE_SET = "text:variable-set";
-
-  /** Element tag for <i>text:variable-get</i>. */
-    public final static String TAG_TEXT_VARIABLE_GET = "text:variable-get";
-/** Element tag for <i>text:expression</i>. */
-    public final static String TAG_TEXT_EXPRESSION = "text:expression";
-
-
-
-/** Element tag for <i>text:page-variable-get</i>. */
-    public final static String TAG_TEXT_PAGE_VARIABLE_GET = "text:page-variable-get";
-/** Element tag for <i>text:sequence</i>. */
-    public final static String TAG_TEXT_SEQUENCE = "text:sequence";
-
-     /** Element tag for <i>text:text-input</i>. */
-    public final static String TAG_TEXT_VARIABLE_INPUT = "text:variable-input";
-     /** Element tag for <i>text:time</i>. */
-     public final static String TAG_TEXT_TIME = "text:time";
-
-
-
-
-    /** Element tag for <i>text:subject</i>. */
-     public final static String TAG_TEXT_SUBJECT = "text:subject";
-
-
-
-
-
-
-
-//end adding
-
     /** Element tag for <i>office:font-decls</i>. */
     public final static String TAG_OFFICE_FONT_DECLS = "office:font-decls";
 
@@ -138,9 +102,6 @@ public interface OfficeConstants {
     /** Element tag for <i>text:p</i>. */
     public final static String TAG_PARAGRAPH = "text:p";
 
-    /** Element tag for <i>text:</i>. */
-    public final static String TAG_TEXT = "text:";
-
     /** Element tag for <i>text:h</i>. */
     public final static String TAG_HEADING = "text:h";
 
@@ -159,12 +120,6 @@ public interface OfficeConstants {
     /** Element tag for <i>text:a</i>. */
     public final static String TAG_HYPERLINK = "text:a";
 
-    /** Element tag for <i>text:bookmark</i>. */
-    public final static String TAG_BOOKMARK = "text:bookmark";
-
-    /** Element tag for <i>text:bookmark-start</i>. */
-    public final static String TAG_BOOKMARK_START = "text:bookmark-start";
-
     /** Element tag for <i>text:unordered-list</i>. */
     public final static String TAG_UNORDERED_LIST = "text:unordered-list";
 
@@ -180,12 +135,6 @@ public interface OfficeConstants {
     /** Attribute tag for <i>text:c</i> of element <i>text:s</i>. */
     public final static String ATTRIBUTE_SPACE_COUNT = "text:c";
 
-    /**
-     * Attribute tag for <i>text:style-name</i> of element
-     *  <i>text:style-name</i>.
-     */
-    public final static String ATTRIBUTE_TEXT_STYLE_NAME = "text:style-name";
-
     /** Element tag for <i>table:table</i>. */
     public final static String TAG_TABLE = "table:table";
 
@@ -391,26 +340,7 @@ public interface OfficeConstants {
     /** StarWriter XML MIME type. */
     public final static String SXW_MIME_TYPE = "application/vnd.sun.xml.writer";
 
-    /** StarWriter XML Template MIME type. */
-    public final static String STW_MIME_TYPE = "application/vnd.sun.xml.writer.template";
-
     /** StarCalc XML MIME type. */
     public final static String SXC_MIME_TYPE = "application/vnd.sun.xml.calc";
 
-    /** StarCalc XML Template MIME type. */
-    public final static String STC_MIME_TYPE = "application/vnd.sun.xml.calc.template";
-
-    /** StarImpress XML MIME type. */
-    public final static String SXI_MIME_TYPE = "application/vnd.sun.xml.impress";
-
-    /** StarImpress XML Template MIME type. */
-    public final static String STI_MIME_TYPE = "application/vnd.sun.xml.impress.template";
-
-    /** StarDraw XML MIME type. */
-    public final static String SXD_MIME_TYPE = "application/vnd.sun.xml.draw";
-
-    /** StarMath XML MIME type. */
-    public final static String SXM_MIME_TYPE = "application/vnd.sun.xml.math";
-
-
 }
commit 4a4127d2c4d9e70b7747ae7683f94a1f046893b3
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 11 09:31:08 2014 +0200

    make some java methods private
    
    found by UCDetector
    
    Change-Id: Ic2edbc85194731116aac34064238d11ef1926a98

diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java
index bc64b14..8d7fcb0 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -56,7 +56,7 @@ abstract class FilenameHelper_impl implements Filenamer
         {
             m_nNumber = _n;
         }
-    void initMember()
+    private void initMember()
         {
             fs = System.getProperty("file.separator");
         }
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java
index 7ca37cc..7bbbd7c 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java
@@ -330,7 +330,7 @@ public final class SOFormulaParser extends ComponentBase
      * This method is a simple helper function to used in the static component initialisation functions as well as
      * in getSupportedServiceNames.
      */
-    public static String[] getServiceNames()
+    private static String[] getServiceNames()
     {
         return new String[]
                 {
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index 3e9778d..12efa62 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -124,7 +124,7 @@ public class NumericalHelper
      * @return a short
      * @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted
      */
-    public static short toShort(Object aValue)
+    private static short toShort(Object aValue)
             throws com.sun.star.lang.IllegalArgumentException
     {
         short retValue = 0;
commit 5ca7fa8db244f225d680f86d6eceefa69eb35b6d
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 11 09:29:35 2014 +0200

    make some java fields private
    
    found by UCDetector
    
    Change-Id: Ib4cf18be134c3177cb123191e963bb43b7e6de93

diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
index 1a5d252..bdbf51b 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java
@@ -25,7 +25,7 @@ import net.adaptivebox.global.*;
 public class EvalElement {
 
   //The weight for each response (target)
-  public double weight = 1;
+  private double weight = 1;
   /**
    * The expected range of the response value, forms the following objective:
    *
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index b9b195a..a6f506e 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -84,7 +84,7 @@ public class GraphicalTestArguments
     private TestParameters m_aCurrentParams;
 
     private int m_nMaxPages = 0;                           // default is 0 (print all pages)
-    String m_sOnlyPage = "";                       // default is "", there is no page which we want to print only.
+    private String m_sOnlyPage = "";                       // default is "", there is no page which we want to print only.
 
     private int m_nResolutionInDPI = 0;
 
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java
index a604f2f..181314a 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.java
+++ b/wizards/com/sun/star/wizards/text/TextDocument.java
@@ -74,7 +74,7 @@ public class TextDocument
     public XComponent xComponent;
     public com.sun.star.text.XTextDocument xTextDocument;
 
-    public com.sun.star.document.XDocumentProperties m_xDocProps;
+    private com.sun.star.document.XDocumentProperties m_xDocProps;
     public com.sun.star.task.XStatusIndicator xProgressBar;
     public com.sun.star.frame.XFrame xFrame;
     public XText xText;
commit 01c042471d35ecaeb7362c64436e090c7164a140
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 11 09:24:11 2014 +0200

    remove unnecessary use of Java reflection
    
    Change-Id: I1cbbd8ee34684ec0fd74cd59529276b31eb7d1c2

diff --git a/forms/qa/integration/forms/MasterDetailForms.java b/forms/qa/integration/forms/MasterDetailForms.java
index b45d604..e824ac5 100644
--- a/forms/qa/integration/forms/MasterDetailForms.java
+++ b/forms/qa/integration/forms/MasterDetailForms.java
@@ -21,7 +21,6 @@ package integration.forms;
 import com.sun.star.beans.NamedValue;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.XIndexContainer;
-import java.lang.reflect.Method;
 
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.lang.XMultiServiceFactory;
@@ -156,16 +155,14 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
             loadDetail.addLoadListener( this );
 
             // wait until the detail form is loaded
-            operateMasterAndWaitForDetailForm( loadMaster.getClass().getMethod( "load", new Class[] {} ), loadMaster, new Object[] { } );
+            loadMaster.load();
+            impl_waitForLoadedEvent();
 
             // okay, now the master form should be on the first record
             assure( "wrong form state after loading (ID1)", m_masterResult.getInt(1) == 1 );
             assure( "wrong form state after loading (ID2)", m_masterResult.getInt(2) == 1 );
             assure( "wrong form state after loading (value)", m_masterResult.getString(3).equals( "First Record" ) );
 
-            // the "XResultSet.next" method
-            Method methodNext = m_masterResult.getClass().getMethod( "next" , new Class[] {} );
-
             // the values in the linked fields should be identical
             int expectedDetailRowCounts[] = { 2, 1 };
             do
@@ -178,7 +175,9 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
                 assure( "wrong number of records in detail form, for master form at pos " + masterPos,
                         ((Integer)m_detailForm.getPropertyValue( "RowCount" )).intValue() == expectedDetailRowCounts[ masterPos - 1 ] );
 
-                operateMasterAndWaitForDetailForm( methodNext, m_masterResult, new Object[] {} );
+                if (!m_masterResult.next())
+                    return;
+                impl_waitForLoadedEvent();
             }
             while ( !m_masterResult.isAfterLast() );
             assure( "wrong number of records in master form", 2 == ((Integer)m_masterForm.getPropertyValue( "RowCount" )).intValue() );
@@ -341,28 +340,6 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
         return column;
     }
 
-    /* ------------------------------------------------------------------ */
-    /** executes an operation on the master, and waits until the detail form has been (re)loaded aferwards
-     */
-    private void operateMasterAndWaitForDetailForm( Method _masterMethod, Object _masterInterface, Object[] _methodParameters ) throws SQLException
-    {
-        Object result;
-        try
-        {
-            result = _masterMethod.invoke( _masterInterface, _methodParameters );
-        }
-        catch( java.lang.Exception e )
-        {
-            throw new SQLException( "invoking " + _masterMethod.getName() + " failed",new Object(), "", 0, new Object() );
-        }
-
-        if ( _masterMethod.getReturnType().getName().equals( "boolean" ) )
-            if ( !((Boolean)result).booleanValue() )
-                return;
-
-        impl_waitForLoadedEvent();
-    }
-
     private void impl_waitForLoadedEvent()
     {
         synchronized( m_waitForLoad )


More information about the Libreoffice-commits mailing list