[Libreoffice-commits] core.git: javaunohelper/test qadevOOo/Jar_OOoRunnerLight.mk qadevOOo/Jar_OOoRunner.mk qadevOOo/runner toolkit/test wizards/com wizards/Jar_commonwizards.mk

Noel Grandin noel at peralex.com
Thu Dec 11 00:01:23 PST 2014


 javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java |    5 -
 qadevOOo/Jar_OOoRunner.mk                                         |    2 
 qadevOOo/Jar_OOoRunnerLight.mk                                    |    2 
 qadevOOo/runner/convwatch/FilenameHelper.java                     |   25 +-----
 qadevOOo/runner/graphical/EnhancedComplexTestCase.java            |    7 +
 qadevOOo/runner/graphical/IDocument.java                          |   27 ------
 qadevOOo/runner/helper/CwsDataExchangeImpl.java                   |   15 ++-
 qadevOOo/runner/share/CwsDataExchange.java                        |   40 ----------
 toolkit/test/accessibility/MessageInterface.java                  |    5 -
 toolkit/test/accessibility/Print.java                             |    5 -
 wizards/Jar_commonwizards.mk                                      |    2 
 wizards/com/sun/star/wizards/common/ParaStyled.java               |    2 
 wizards/com/sun/star/wizards/common/TemplateElement.java          |   24 ------
 wizards/com/sun/star/wizards/table/TableWizard.java               |    6 -
 wizards/com/sun/star/wizards/ui/WizardDialog.java                 |   24 ------
 wizards/com/sun/star/wizards/ui/XCompletion.java                  |   30 -------
 wizards/com/sun/star/wizards/ui/event/DataAware.java              |    4 -
 17 files changed, 26 insertions(+), 199 deletions(-)

New commits:
commit 373affe59c9646d65c744ff7e3ed00425ccf9eb8
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Dec 11 08:10:33 2014 +0200

    java: remove some unnecessary interfaces
    
    Change-Id: Ie2da7cbbd1733881ff2da6fa095c37c21cf19fe8
    Reviewed-on: https://gerrit.libreoffice.org/13435
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java
index 07200b6..8e07a2b 100644
--- a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java
+++ b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java
@@ -108,9 +108,6 @@ public class WeakBase_Test
     }
 }
 
-interface Aint
-{
-}
 class OtherClass extends WeakBase implements XBridgeSupplier2
 {
 
@@ -120,7 +117,7 @@ class OtherClass extends WeakBase implements XBridgeSupplier2
     }
 }
 
-class SomeClass extends OtherClass implements Aint,XReference
+class SomeClass extends OtherClass implements XReference
 {
 
     public void dispose()
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index e7709e5..1dd5fbe 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -100,7 +100,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
     qadevOOo/runner/graphical/GlobalLogWriter \
     qadevOOo/runner/graphical/GraphicalComparator \
     qadevOOo/runner/graphical/HTMLResult \
-    qadevOOo/runner/graphical/IDocument \
     qadevOOo/runner/graphical/ImageHelper \
     qadevOOo/runner/graphical/IniFile \
     qadevOOo/runner/graphical/IOffice \
@@ -164,7 +163,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
     qadevOOo/runner/org/openoffice/Runner \
     qadevOOo/runner/org/openoffice/RunnerService \
     qadevOOo/runner/share/ComplexTest \
-    qadevOOo/runner/share/CwsDataExchange \
     qadevOOo/runner/share/DescEntry \
     qadevOOo/runner/share/DescGetter \
     qadevOOo/runner/share/LogWriter \
diff --git a/qadevOOo/Jar_OOoRunnerLight.mk b/qadevOOo/Jar_OOoRunnerLight.mk
index 17220c8..ec35391 100644
--- a/qadevOOo/Jar_OOoRunnerLight.mk
+++ b/qadevOOo/Jar_OOoRunnerLight.mk
@@ -97,7 +97,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunnerLight,\
     qadevOOo/runner/graphical/GlobalLogWriter \
     qadevOOo/runner/graphical/GraphicalComparator \
     qadevOOo/runner/graphical/HTMLResult \
-    qadevOOo/runner/graphical/IDocument \
     qadevOOo/runner/graphical/ImageHelper \
     qadevOOo/runner/graphical/IniFile \
     qadevOOo/runner/graphical/IOffice \
@@ -161,7 +160,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunnerLight,\
     qadevOOo/runner/org/openoffice/Runner \
     qadevOOo/runner/org/openoffice/RunnerService \
     qadevOOo/runner/share/ComplexTest \
-    qadevOOo/runner/share/CwsDataExchange \
     qadevOOo/runner/share/DescEntry \
     qadevOOo/runner/share/DescGetter \
     qadevOOo/runner/share/LogWriter \
diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java
index 56a3b5dd..ffe4622 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -16,30 +16,17 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-/**
- * Helper class to hold a Filename or a FileURL
- * Something like File in Java,
- * with some more extensions direct to ConvWatch and its name conventions
- *
- *
- */
 package convwatch;
 
 import helper.URLHelper;
 import helper.StringHelper;
 
-interface Filenamer
-{
-    String getSuffix();
-    String getFileURL();
-    String getAbsoluteSystemFilename();
-    String getFilename();
-    String getSystemPath();
-}
-
-
-
-abstract class FilenameHelper_impl implements Filenamer
+/**
+ * Helper class to hold a Filename or a FileURL
+ * Something like File in Java,
+ * with some more extensions direct to ConvWatch and its name conventions
+ */
+abstract class FilenameHelper_impl
 {
     private String fs;                                   // file separator like '/'
     private String m_sPath;
diff --git a/qadevOOo/runner/graphical/EnhancedComplexTestCase.java b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
index 6f61d4f..758edda 100644
--- a/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
@@ -19,13 +19,18 @@
 package graphical;
 
 import complexlib.ComplexTestCase;
+
 import java.io.File;
 import java.io.FileFilter;
 import java.util.ArrayList;
 
-abstract public class EnhancedComplexTestCase extends ComplexTestCase implements IDocument
+abstract public class EnhancedComplexTestCase extends ComplexTestCase
 {
 
+    /**
+     * Call this for each document
+     */
+    protected abstract void checkOneFile(String _sDocument, String _sResult, ParameterHelper _aParams) throws OfficeException;
 
 private void callEntry(String _sEntry, ParameterHelper _aParam)
 {
diff --git a/qadevOOo/runner/graphical/IDocument.java b/qadevOOo/runner/graphical/IDocument.java
deleted file mode 100644
index 99105b3..0000000
--- a/qadevOOo/runner/graphical/IDocument.java
+++ /dev/null
@@ -1,27 +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 graphical;
-
-public interface IDocument
-{
-    /**
-     * Call this for each document
-     */
-    void checkOneFile(String _sDocument, String _sResult, ParameterHelper _aParams) throws OfficeException;
-}
diff --git a/qadevOOo/runner/helper/CwsDataExchangeImpl.java b/qadevOOo/runner/helper/CwsDataExchangeImpl.java
index 3af899f..d9887e1 100644
--- a/qadevOOo/runner/helper/CwsDataExchangeImpl.java
+++ b/qadevOOo/runner/helper/CwsDataExchangeImpl.java
@@ -22,16 +22,15 @@ import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
 import lib.TestParameters;
-import share.CwsDataExchange;
 import share.LogWriter;
 import util.PropertyName;
 import util.utils;
 
 /**
- * Implementation of the interface CwsDataExchange
- * @see share.CwsDataExchange
+ * Exchange information to the EIS database
+ *
  */
-public class CwsDataExchangeImpl implements CwsDataExchange
+public class CwsDataExchangeImpl
 {
 
     private final TestParameters param;
@@ -47,6 +46,10 @@ public class CwsDataExchangeImpl implements CwsDataExchange
         mDebug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
     }
 
+    /**
+     * Returns all module names which are added to the specified childworkspace
+     * @return a String array of all added modules
+     */
     public ArrayList<String> getModules()
     {
         // the cwstouched command send its version information to StdErr.
@@ -97,6 +100,10 @@ public class CwsDataExchangeImpl implements CwsDataExchange
         return moduleNames;
     }
 
+    /**
+     * Set the test status of cws related UnoAPI tests to the EIS dabase
+     * @param status the status of the UnoAPI test
+     */
     public void setUnoApiCwsStatus(boolean status)
     {
 
diff --git a/qadevOOo/runner/share/CwsDataExchange.java b/qadevOOo/runner/share/CwsDataExchange.java
deleted file mode 100644
index c59c54c..0000000
--- a/qadevOOo/runner/share/CwsDataExchange.java
+++ /dev/null
@@ -1,40 +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 share;
-
-import java.util.ArrayList;
-
-/**
- * Exchange information to the EIS database
- *
- */
-public interface CwsDataExchange {
-
-    /**
-     * Retunrs all module names which are added to the specified childworkspace
-     * @return a String array of all added modules
-     */
-    ArrayList<String> getModules();
-
-    /**
-     * Set the test status of cws related UnoAPI tests to the EIS dabase
-     * @param status the status of the UnoAPI test
-     */
-    void setUnoApiCwsStatus(boolean status);
-}
diff --git a/toolkit/test/accessibility/MessageInterface.java b/toolkit/test/accessibility/MessageInterface.java
deleted file mode 100644
index ad189bb..0000000
--- a/toolkit/test/accessibility/MessageInterface.java
+++ /dev/null
@@ -1,5 +0,0 @@
-interface MessageInterface
-{
-    void    message   (String text);
-}
-
diff --git a/toolkit/test/accessibility/Print.java b/toolkit/test/accessibility/Print.java
deleted file mode 100644
index e4d21dc..0000000
--- a/toolkit/test/accessibility/Print.java
+++ /dev/null
@@ -1,5 +0,0 @@
-interface Print
-{
-    void    print   (String text);
-    void    println (String text);
-}
diff --git a/wizards/Jar_commonwizards.mk b/wizards/Jar_commonwizards.mk
index 0e5ac5f..098a96d 100644
--- a/wizards/Jar_commonwizards.mk
+++ b/wizards/Jar_commonwizards.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\
 	wizards/com/sun/star/wizards/common/NamedValueCollection       \
 	wizards/com/sun/star/wizards/common/ParaStyled       \
 	wizards/com/sun/star/wizards/common/PlaceholderTextElement       \
-	wizards/com/sun/star/wizards/common/TemplateElement       \
 	wizards/com/sun/star/wizards/common/TextElement       \
 	wizards/com/sun/star/wizards/db/DBMetaData					\
 	wizards/com/sun/star/wizards/db/CommandMetaData				\
@@ -89,7 +88,6 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\
 	wizards/com/sun/star/wizards/ui/UnoDialog					\
 	wizards/com/sun/star/wizards/ui/UnoDialog2					\
 	wizards/com/sun/star/wizards/ui/XFieldSelectionListener			\
-	wizards/com/sun/star/wizards/ui/XCompletion					\
 	wizards/com/sun/star/wizards/document/Control					\
 	wizards/com/sun/star/wizards/document/DatabaseControl				\
 	wizards/com/sun/star/wizards/document/FormHandler				\
diff --git a/wizards/com/sun/star/wizards/common/ParaStyled.java b/wizards/com/sun/star/wizards/common/ParaStyled.java
index 495423b..492a75b 100644
--- a/wizards/com/sun/star/wizards/common/ParaStyled.java
+++ b/wizards/com/sun/star/wizards/common/ParaStyled.java
@@ -21,7 +21,7 @@ package com.sun.star.wizards.common;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.text.*;
 
-class ParaStyled implements TemplateElement
+class ParaStyled
 {
 
     private String paraStyle;
diff --git a/wizards/com/sun/star/wizards/common/TemplateElement.java b/wizards/com/sun/star/wizards/common/TemplateElement.java
deleted file mode 100644
index 07fc84f..0000000
--- a/wizards/com/sun/star/wizards/common/TemplateElement.java
+++ /dev/null
@@ -1,24 +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.wizards.common;
-
-interface TemplateElement
-{
-
-}
diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java
index 20af479..a5456c6 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -125,9 +125,6 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener
     }
 
 
-    /* (non-Javadoc)
-     * @see com.sun.star.wizards.ui.XCompletion#iscompleted(int)
-     */
     public boolean iscompleted(int _ndialogpage)
     {
         switch (_ndialogpage)
@@ -149,9 +146,6 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener
     }
 
 
-    /* (non-Javadoc)
-     * @see com.sun.star.wizards.ui.XCompletion#setcompleted(int, boolean)
-     */
     public void setcompleted(int _ndialogpage, boolean _biscompleted)
     {
         boolean bScenarioiscompleted = _biscompleted;
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 3218dae..4e10c13 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -44,7 +44,7 @@ import com.sun.star.wizards.ui.event.XActionListenerAdapter;
 import com.sun.star.wizards.ui.event.XItemListenerAdapter;
 import com.sun.star.wizards.ui.event.XWindowListenerAdapter;
 
-public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeListener, XTerminateListener, XCompletion
+public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeListener, XTerminateListener
 {
 
     private static final int iButtonWidth = 50;
@@ -359,28 +359,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
     }
 
 
-    /* (non-Javadoc)
-     * @see com.sun.star.wizards.ui.XCompletion#iscompleted(int)
-     */
-    public boolean iscompleted(int _ndialogpage)
-    {
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see com.sun.star.wizards.ui.XCompletion#setcompleted(int, boolean)
-     */
-    public void setcompleted(int _ndialogpage, boolean _biscompleted)
-    {
-    }
-
-    /* (non-Javadoc)
-     * @see com.sun.star.wizards.ui.XCompletion#setmodified(int, java.lang.Object, java.lang.Object)
-     */
-    public void setmodified(int _ndialogpage, Object ooldValue, Object onewValue)
-    {
-    }
-
     public void drawNaviBar()
     {
 
diff --git a/wizards/com/sun/star/wizards/ui/XCompletion.java b/wizards/com/sun/star/wizards/ui/XCompletion.java
deleted file mode 100644
index f51f096..0000000
--- a/wizards/com/sun/star/wizards/ui/XCompletion.java
+++ /dev/null
@@ -1,30 +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.wizards.ui;
-
-public interface XCompletion
-{
-
-    void setcompleted(int _ndialogpage, boolean _biscompleted);
-
-    boolean iscompleted(int _ndialogpage);
-
-
-
-
-}
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java
index cc34373..001f245 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.java
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java
@@ -114,10 +114,6 @@ public abstract class DataAware {
         enableControls(ui);
     }
 
-    public interface Listener {
-        void eventPerformed(Object event);
-    }
-
     /**
      * compares the two given objects.
      * This method is null safe and returns true also if both are null...


More information about the Libreoffice-commits mailing list