summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-19 16:03:41 +0200
committerNoel Grandin <noel@peralex.com>2015-01-05 08:23:29 +0200
commit43cc8ad33e815522e2b23ac87a4a9c4526cd85c9 (patch)
treeb042266508f8b084bc7bbe9cc57250a971311099
parentNeed <boost/functional/hash.hpp> for boost::hash (diff)
downloadcore-43cc8ad33e815522e2b23ac87a4a9c4526cd85c9.tar.gz
core-43cc8ad33e815522e2b23ac87a4a9c4526cd85c9.zip
java: remove dead code
found by UCDetector Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
-rw-r--r--bean/qa/complex/bean/ScreenComparer.java4
-rw-r--r--connectivity/JunitTest_complex.mk1
-rw-r--r--connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java1
-rw-r--r--connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java1
-rw-r--r--connectivity/org/hsqldb/lib/FileSystemRuntimeException.java21
-rw-r--r--connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java98
-rw-r--r--connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java2
-rw-r--r--connectivity/qa/connectivity/tools/CsvDatabase.java5
-rw-r--r--connectivity/qa/connectivity/tools/DbaseDatabase.java4
-rw-r--r--connectivity/qa/connectivity/tools/QueryDefinition.java16
-rw-r--r--connectivity/qa/connectivity/tools/sdb/Connection.java7
-rw-r--r--dbaccess/qa/complex/dbaccess/DatabaseApplication.java10
-rw-r--r--forms/qa/integration/forms/FormComponent.java58
-rw-r--r--forms/qa/integration/forms/SpreadsheetDocument.java70
-rw-r--r--forms/qa/org/openoffice/xforms/XMLDocument.java7
-rw-r--r--framework/JunitTest_framework_complex.mk3
-rw-r--r--framework/qa/complex/dispatches/Interceptor.java12
-rw-r--r--framework/qa/complex/framework/recovery/TimeoutThread.java33
-rw-r--r--framework/qa/complex/loadAllDocuments/StreamSimulator.java433
-rw-r--r--framework/qa/complex/loadAllDocuments/TestDocument.java32
-rw-r--r--javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java3
-rw-r--r--javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java3
-rw-r--r--javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java2
-rw-r--r--jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java2
-rw-r--r--nlpsolver/Jar_EvolutionarySolver.mk10
-rw-r--r--nlpsolver/Jar_nlpsolver.mk1
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalStruct.java3
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicArray.java31
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java14
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicTag.java21
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java19
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java30
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java277
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java47
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/OutputMethods.java34
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/PenaltyComparator.java41
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/SRComparator.java41
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java4
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java4
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/UnconstrainedProblemEncoder.java40
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java5
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/ModalState.java38
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java4
-rw-r--r--qadevOOo/runner/org/openoffice/RunnerService.java51
-rw-r--r--qadevOOo/testdocs/qadevlibs/source/test/Job.java2
-rw-r--r--reportbuilder/Jar_reportbuilder.mk4
-rw-r--r--reportbuilder/java/org/libreoffice/report/DataSourceException.java29
-rw-r--r--reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java36
-rw-r--r--reportbuilder/java/org/libreoffice/report/SOImageService.java13
-rw-r--r--reportbuilder/java/org/libreoffice/report/StorageRepository.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java45
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java34
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java39
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java19
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java69
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java14
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java7
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java12
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java4
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java4
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java11
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java10
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java10
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java21
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java20
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java20
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java57
-rw-r--r--reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java54
-rw-r--r--reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java113
-rw-r--r--svl/qa/complex/passwordcontainer/Test01.java1
-rw-r--r--svl/qa/complex/passwordcontainer/Test02.java1
-rw-r--r--svl/qa/complex/passwordcontainer/Test03.java1
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/Settings.java17
-rw-r--r--toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java8
-rw-r--r--toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java5
-rw-r--r--toolkit/test/accessibility/AccTreeNode.java37
-rw-r--r--toolkit/test/accessibility/AccessibilityTree.java5
-rw-r--r--toolkit/test/accessibility/AccessibilityTreeModel.java21
-rw-r--r--toolkit/test/accessibility/AccessibleCellHandler.java6
-rw-r--r--toolkit/test/accessibility/AccessibleContextHandler.java2
-rw-r--r--toolkit/test/accessibility/AccessibleEditableTextHandler.java6
-rw-r--r--toolkit/test/accessibility/AccessibleHyperlinkHandler.java8
-rw-r--r--toolkit/test/accessibility/AccessibleHypertextHandler.java8
-rw-r--r--toolkit/test/accessibility/AccessibleTableHandler.java6
-rw-r--r--toolkit/test/accessibility/AccessibleTreeCellRenderer.java108
-rw-r--r--toolkit/test/accessibility/AccessibleTreeNode.java5
-rw-r--r--toolkit/test/accessibility/CanvasShape.java28
-rw-r--r--toolkit/test/accessibility/EventLogger.java47
-rw-r--r--toolkit/test/accessibility/FrameActionListener.java32
-rw-r--r--toolkit/test/accessibility/HelpWindow.java14
-rw-r--r--toolkit/test/accessibility/InformationWriter.java406
-rw-r--r--toolkit/test/accessibility/MessageArea.java11
-rw-r--r--toolkit/test/accessibility/NodeHandler.java10
-rw-r--r--toolkit/test/accessibility/NodeMap.java13
-rw-r--r--toolkit/test/accessibility/OfficeConnection.java8
-rw-r--r--toolkit/test/accessibility/Options.java10
-rw-r--r--toolkit/test/accessibility/SimpleOffice.java251
-rw-r--r--toolkit/test/accessibility/TextLogger.java59
-rw-r--r--toolkit/test/accessibility/TextUpdateListener.java144
-rw-r--r--toolkit/test/accessibility/ov/SelectionView.java244
-rw-r--r--unotest/source/java/org/openoffice/test/UnoApiTest.java7
-rw-r--r--unotest/source/java/org/openoffice/test/tools/DocumentType.java18
-rw-r--r--unotest/source/java/org/openoffice/test/tools/OfficeDocument.java112
-rw-r--r--unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java31
-rw-r--r--unotest/source/java/org/openoffice/test/tools/SpreadsheetView.java28
-rw-r--r--unotools/qa/complex/tempfile/Test01.java3
-rw-r--r--unotools/qa/complex/tempfile/TestHelper.java10
-rw-r--r--wizards/Jar_commonwizards.mk3
-rw-r--r--wizards/com/sun/star/wizards/common/Properties.java22
-rw-r--r--wizards/com/sun/star/wizards/common/SystemDialog.java3
-rw-r--r--wizards/com/sun/star/wizards/common/TerminateWizardException.java32
-rw-r--r--wizards/com/sun/star/wizards/db/CommandMetaData.java38
-rw-r--r--wizards/com/sun/star/wizards/db/DBMetaData.java5
-rw-r--r--wizards/com/sun/star/wizards/db/FieldColumn.java10
-rw-r--r--wizards/com/sun/star/wizards/document/FormHandler.java20
-rw-r--r--wizards/com/sun/star/wizards/document/OfficeDocument.java19
-rw-r--r--wizards/com/sun/star/wizards/form/FormControlArranger.java5
-rw-r--r--wizards/com/sun/star/wizards/form/FormDocument.java7
-rw-r--r--wizards/com/sun/star/wizards/query/QueryWizard.java6
-rw-r--r--wizards/com/sun/star/wizards/report/ReportFinalizer.java11
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextDocument.java7
-rw-r--r--wizards/com/sun/star/wizards/report/ReportWizard.java11
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java1
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java4
-rw-r--r--wizards/com/sun/star/wizards/table/Finalizer.java5
-rw-r--r--wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java5
-rw-r--r--wizards/com/sun/star/wizards/table/ScenarioSelector.java6
-rw-r--r--wizards/com/sun/star/wizards/ui/AggregateComponent.java7
-rw-r--r--wizards/com/sun/star/wizards/ui/ButtonList.java81
-rw-r--r--wizards/com/sun/star/wizards/ui/CommandFieldSelection.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/FieldSelection.java5
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog.java11
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.java37
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAware.java170
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAwareFields.java488
-rw-r--r--xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java6
149 files changed, 21 insertions, 4969 deletions
diff --git a/bean/qa/complex/bean/ScreenComparer.java b/bean/qa/complex/bean/ScreenComparer.java
index 164e302f8002..d7b70a8288c5 100644
--- a/bean/qa/complex/bean/ScreenComparer.java
+++ b/bean/qa/complex/bean/ScreenComparer.java
@@ -61,10 +61,6 @@ class ScreenComparer
m_imgDiff = null;
}
- public Rectangle getLocation()
- {
- return m_rect;
- }
public void grabOne() throws Exception
{
grabOne(m_rect);
diff --git a/connectivity/JunitTest_complex.mk b/connectivity/JunitTest_complex.mk
index 545c599375bb..f8b39075a78f 100644
--- a/connectivity/JunitTest_complex.mk
+++ b/connectivity/JunitTest_complex.mk
@@ -41,7 +41,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,connectivity_complex,\
connectivity/qa/complex/connectivity/dbase/DBaseNumericFunctions \
connectivity/qa/complex/connectivity/dbase/DBaseSqlTests \
connectivity/qa/complex/connectivity/dbase/DBaseStringFunctions \
- connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData \
connectivity/qa/complex/connectivity/hsqldb/TestCacheSize \
connectivity/qa/connectivity/tools/AbstractDatabase \
connectivity/qa/connectivity/tools/CRMDatabase \
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java
index eefb37124d5c..6a53d110e661 100644
--- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java
+++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageAccess.java
@@ -18,6 +18,7 @@
package com.sun.star.sdbcx.comp.hsqldb;
+@SuppressWarnings("ucd")
public class StorageAccess implements org.hsqldb.lib.Storage {
String key;
String name;
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java
index 0e0fff54208d..9c184750aa92 100644
--- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java
+++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java
@@ -20,6 +20,7 @@ package com.sun.star.sdbcx.comp.hsqldb;
import org.hsqldb.lib.FileAccess;
import org.hsqldb.lib.FileSystemRuntimeException;
+@SuppressWarnings("ucd")
public class StorageFileAccess implements org.hsqldb.lib.FileAccess{
static { NativeLibraries.load(); }
diff --git a/connectivity/org/hsqldb/lib/FileSystemRuntimeException.java b/connectivity/org/hsqldb/lib/FileSystemRuntimeException.java
index 5830d5eb48f2..6b3d289a6d4d 100644
--- a/connectivity/org/hsqldb/lib/FileSystemRuntimeException.java
+++ b/connectivity/org/hsqldb/lib/FileSystemRuntimeException.java
@@ -34,29 +34,8 @@ public class FileSystemRuntimeException extends java.lang.RuntimeException {
public static final int fileAccessRemoveElementFailed = 1;
public static final int fileAccessRenameElementFailed = 2;
- private final int errorCode;
-
- public FileSystemRuntimeException(int _errorCode) {
- super();
- errorCode = _errorCode;
- }
-
- public FileSystemRuntimeException(String _message, int _errorCode) {
- super(_message);
- errorCode = _errorCode;
- }
-
- public FileSystemRuntimeException(String _message, java.lang.Throwable _cause, int _errorCode) {
- super(_message, _cause);
- errorCode = _errorCode;
- }
-
public FileSystemRuntimeException(java.lang.Throwable _cause, int _errorCode) {
super(_cause);
- errorCode = _errorCode;
}
- public final int getErrorCode() {
- return errorCode;
- }
}
diff --git a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java b/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java
deleted file mode 100644
index 66a252d7ea4c..000000000000
--- a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java
+++ /dev/null
@@ -1,98 +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 complex.connectivity.hsqldb;
-
-import complex.connectivity.HsqlDriverTest;
-import java.sql.*;
-import java.lang.reflect.Method;
-
-
-public class DatabaseMetaData {
-
- private final java.sql.DatabaseMetaData m_xMD;
- private final HsqlDriverTest m_TestCase;
-
- /** Creates a new instance of DatabaseMetaData */
- public DatabaseMetaData(HsqlDriverTest _testCase,java.sql.DatabaseMetaData _xmd) {
- m_TestCase = _testCase;
- m_xMD = _xmd;
- }
-
- protected void assure(String _sText,boolean btest){
- m_TestCase.assurePublic(_sText,btest);
- }
-
- protected void testMethod(String sName,Class<?>[] params,Object[] objParams,int nCount){
- try {
- System.out.println("test method " + sName);
-
- Method aGet = ((Object)m_xMD).getClass().getDeclaredMethod(sName, params);
- if ( aGet != null ){
- ResultSet rs = (ResultSet)aGet.invoke(m_xMD, objParams);
- ResultSetMetaData rsMD = rs.getMetaData();
-
- assure( sName + " returns wrong column count" , rsMD.getColumnCount() == nCount);
- rs.close();
- }
- else
- assure( sName + " returns wrong column count" , false);
- } catch( java.lang.NoSuchMethodException ex ) {
- assure("Method " + sName + " could not be found!",false);
- } catch( java.lang.IllegalAccessException ex ) {
- assure("IllegalAccessException!",false);
- } catch( SQLException ex ) {
- assure("SQLException occurred: " + ex.getMessage() ,false);
- } catch( java.lang.reflect.InvocationTargetException ex ) {
- assure("IllegalAccessException!",false);
- }
- }
-
- public void test() {
-
- try {
- ResultSet rs = m_xMD.getTables(null, null, "TESTCASE", null);
- while (rs.next()) {
- String catalog = rs.getString(1);
- if (rs.wasNull())
- catalog = null;
-
- String schema = rs.getString(2);
- if (rs.wasNull())
- schema = null;
-
- String table = rs.getString(3);
- String type = rs.getString(4);
- System.out.println("Catalog: " + catalog + " Schema: " + schema
- + " Table: " + table + " Type: " + type);
- System.out
- .println("------------------ Columns ------------------");
- ResultSet rsColumns = m_xMD.getColumns(catalog, schema, table,
- "%");
- while (rsColumns.next()) {
- System.out.println("Column: " + rsColumns.getString(4)
- + " Type: " + rsColumns.getInt(5) + " TypeName: "
- + rsColumns.getString(6));
- }
-
- }
- rs.close();
- } catch (Exception e) {
-
- }
- }
-}
diff --git a/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java b/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java
index ba9dcdf06dd8..b2b5944f0fa9 100644
--- a/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java
+++ b/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java
@@ -82,7 +82,6 @@ public class TestCacheSize {
// type of the big table {MEMORY | CACHED | TEXT}
private String tableType = "CACHED";
private int cacheScale = 17;
- int cacheSizeScale = 8;
// script format {TEXT, BINARY, COMPRESSED}
private String logType = "TEXT";
@@ -109,7 +108,6 @@ public class TestCacheSize {
private XStatement sStatement;
private XConnection cConnection;
- XDataSource ds;
private XDriver drv;
private com.sun.star.beans.PropertyValue[] info;
diff --git a/connectivity/qa/connectivity/tools/CsvDatabase.java b/connectivity/qa/connectivity/tools/CsvDatabase.java
index b2c3a179325e..abb016c90a7c 100644
--- a/connectivity/qa/connectivity/tools/CsvDatabase.java
+++ b/connectivity/qa/connectivity/tools/CsvDatabase.java
@@ -28,9 +28,4 @@ public class CsvDatabase extends FlatFileDatabase
super( i_orb, "flat" );
}
-
- protected CsvDatabase( final XMultiServiceFactory i_orb, final String i_existingDocumentURL ) throws Exception
- {
- super( i_orb, i_existingDocumentURL, "flat" );
- }
}
diff --git a/connectivity/qa/connectivity/tools/DbaseDatabase.java b/connectivity/qa/connectivity/tools/DbaseDatabase.java
index f3f883144e89..9a1dc844815c 100644
--- a/connectivity/qa/connectivity/tools/DbaseDatabase.java
+++ b/connectivity/qa/connectivity/tools/DbaseDatabase.java
@@ -29,8 +29,4 @@ public class DbaseDatabase extends FlatFileDatabase
}
- protected DbaseDatabase( final XMultiServiceFactory i_orb, final String i_existingDocumentURL ) throws Exception
- {
- super( i_orb, i_existingDocumentURL, "dbase" );
- }
}
diff --git a/connectivity/qa/connectivity/tools/QueryDefinition.java b/connectivity/qa/connectivity/tools/QueryDefinition.java
index b939fdbb22e3..fc3cba3820a8 100644
--- a/connectivity/qa/connectivity/tools/QueryDefinition.java
+++ b/connectivity/qa/connectivity/tools/QueryDefinition.java
@@ -18,11 +18,9 @@
package connectivity.tools;
-import com.sun.star.beans.PropertyVetoException;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.beans.XPropertySet;
import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.IllegalArgumentException;
public class QueryDefinition
{
@@ -48,18 +46,4 @@ public class QueryDefinition
return command;
}
- /** retrieves the command underlying the query definition
- *
- * This method is a mere wrapped around the <code>getPropertyValue( "Command" )</code> call
- */
- public void setCommand( String _command ) throws WrappedTargetException
- {
- try
- {
- m_queryDef.setPropertyValue( "Command", _command );
- }
- catch (UnknownPropertyException e) { }
- catch (PropertyVetoException e) { }
- catch (IllegalArgumentException e) { }
- }
}
diff --git a/connectivity/qa/connectivity/tools/sdb/Connection.java b/connectivity/qa/connectivity/tools/sdb/Connection.java
index a1617fbf3a95..d713de379264 100644
--- a/connectivity/qa/connectivity/tools/sdb/Connection.java
+++ b/connectivity/qa/connectivity/tools/sdb/Connection.java
@@ -22,7 +22,6 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.XSingleSelectQueryComposer;
import com.sun.star.sdbc.SQLException;
import com.sun.star.sdbc.XConnection;
-import com.sun.star.sdbc.XDatabaseMetaData;
import com.sun.star.sdbc.XPreparedStatement;
import com.sun.star.sdbc.XStatement;
import com.sun.star.sdbcx.XTablesSupplier;
@@ -74,12 +73,6 @@ public class Connection
}
public
- XDatabaseMetaData getMetaData() throws SQLException
- {
- return m_connection.getMetaData();
- }
-
- public
void close() throws SQLException
{
m_connection.close();
diff --git a/dbaccess/qa/complex/dbaccess/DatabaseApplication.java b/dbaccess/qa/complex/dbaccess/DatabaseApplication.java
index dd32327e4e64..71d90a613514 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseApplication.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseApplication.java
@@ -52,21 +52,11 @@ public class DatabaseApplication
documentUI.connect();
}
- public XOfficeDatabaseDocument getDatabaseDocument()
- {
- return databaseDocument;
- }
-
public XDatabaseDocumentUI getDocumentUI()
{
return documentUI;
}
- public DatabaseAccess getDb()
- {
- return db;
- }
-
public void store()
{
// store the doc in a new location
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,
diff --git a/framework/JunitTest_framework_complex.mk b/framework/JunitTest_framework_complex.mk
index 55b2eea8b964..a36105334d82 100644
--- a/framework/JunitTest_framework_complex.mk
+++ b/framework/JunitTest_framework_complex.mk
@@ -36,8 +36,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,framework_complex,\
framework/qa/complex/disposing/GetServiceWhileDisposingOffice \
framework/qa/complex/path_substitution/PathSubstitutionTest \
framework/qa/complex/loadAllDocuments/InteractionHandler \
- framework/qa/complex/loadAllDocuments/StreamSimulator \
- framework/qa/complex/loadAllDocuments/TestDocument \
framework/qa/complex/loadAllDocuments/CheckXComponentLoader \
framework/qa/complex/loadAllDocuments/StatusIndicator \
framework/qa/complex/broken_document/TestDocument \
@@ -46,7 +44,6 @@ $(eval $(call gb_JunitTest_add_sourcefiles,framework_complex,\
framework/qa/complex/framework/autosave/AutoSave \
framework/qa/complex/framework/autosave/Protocol \
framework/qa/complex/framework/autosave/ConfigHelper \
- framework/qa/complex/framework/recovery/TimeoutThread \
framework/qa/complex/framework/recovery/KlickButtonThread \
framework/qa/complex/framework/recovery/RecoveryTools \
framework/qa/complex/framework/recovery/RecoveryTest \
diff --git a/framework/qa/complex/dispatches/Interceptor.java b/framework/qa/complex/dispatches/Interceptor.java
index 0dfc9f1e3a98..a6653d195e98 100644
--- a/framework/qa/complex/dispatches/Interceptor.java
+++ b/framework/qa/complex/dispatches/Interceptor.java
@@ -240,18 +240,6 @@ public class Interceptor implements XDispatch,
}
-
- /** set a new list of URL's, which should be used on registration time
- (that's why it's necessary to call this impl-method before the interceptor
- is used at the OOo API!) to optimize the interception chain.
- */
- public synchronized void setURLs4InterceptionInfo(String[] lURLs)
- {
- m_lURLs4InterceptionInfo = lURLs;
- }
-
-
-
/** set a new list of URL's, which should be blocked by this interceptor.
(that's why it's necessary to call this impl-method before the interceptor
is used at the OOo API!)
diff --git a/framework/qa/complex/framework/recovery/TimeoutThread.java b/framework/qa/complex/framework/recovery/TimeoutThread.java
deleted file mode 100644
index 239e48e10bd0..000000000000
--- a/framework/qa/complex/framework/recovery/TimeoutThread.java
+++ /dev/null
@@ -1,33 +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 complex.framework.recovery;
-
-public class TimeoutThread extends Thread{
- public int timeOut = 0;
- /** Creates a new instance of TimeoutThread */
- public TimeoutThread(int timeOut) {
- this.timeOut = timeOut;
- }
-
- @Override
- public void run(){
- util.utils.shortWait(timeOut);
- }
-
-}
diff --git a/framework/qa/complex/loadAllDocuments/StreamSimulator.java b/framework/qa/complex/loadAllDocuments/StreamSimulator.java
deleted file mode 100644
index 34fed390dc5e..000000000000
--- a/framework/qa/complex/loadAllDocuments/StreamSimulator.java
+++ /dev/null
@@ -1,433 +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 complex.loadAllDocuments;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.ucb.XSimpleFileAccess;
-import com.sun.star.lang.XMultiServiceFactory;
-
-/**
- * Simulates an input and output stream and
- * implements the interfaces XInputStream, XOutputStream.
- * So it can be used for testing loading/saving of documents
- * using streams instead of URLs.
- */
-public class StreamSimulator implements com.sun.star.io.XInputStream ,
- com.sun.star.io.XOutputStream ,
- com.sun.star.io.XSeekable
-{
-
- /**
- * the internal input stream for reading
- */
- private com.sun.star.io.XInputStream m_xInStream ;
- /**
- * the internal input stream for writing
- */
- private com.sun.star.io.XOutputStream m_xOutStream ;
- /**
- * points at runtime to m_xInStream or m_xOutStream and make it seekable
- */
- private com.sun.star.io.XSeekable m_xSeek ;
- /**
- * indicates, that the input stream interface was used
- */
- public boolean m_bInWasUsed ;
- /**
- * indicates, that the output stream interface was used
- */
- public boolean m_bOutWasUsed ;
-
- /**
- * construct a new instance of this class
- * It set the name of the correspojnding file on disk, which
- * should be source or target for the following operations on
- * this object. And it regulate if it should function as
- * input or output stream.
- *
- * @param sFileName
- * name of the file on disk
- * Will be used as source (if param bInput==true)
- * or as target (if param bInput==false).
- *
- * @param bInput
- * it specify, which interface should work at this object.
- * <TRUE/> => we simulate an input stream
- * <FALSE/> => we simulate an output stream
- *
- * @throw com.sun.star.io.NotConnectedException
- * in case the internal streams to the file on disk couldn't
- * be established.
- * They are necessary. Otherwhise this simulator can't
- * really work.
- */
- public StreamSimulator(XMultiServiceFactory xMSF,
- String sFileName, boolean bInput)
- throws com.sun.star.io.NotConnectedException
- {
- m_bInWasUsed = false ;
- m_bOutWasUsed = false ;
-
- try
- {
- XSimpleFileAccess xHelper = UnoRuntime.queryInterface(XSimpleFileAccess.class,
- xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"));
-
- if (xHelper == null)
- throw new com.sun.star.io.NotConnectedException(
- "ucb helper not available. Can't create streams.");
-
- if (bInput)
- {
- m_xInStream = xHelper.openFileRead(sFileName);
- m_xSeek = UnoRuntime.queryInterface(
- com.sun.star.io.XSeekable.class,
- m_xInStream);
- }
- else
- {
- m_xOutStream = xHelper.openFileWrite(sFileName);
- m_xSeek = UnoRuntime.queryInterface(
- com.sun.star.io.XSeekable.class,
- m_xOutStream);
- }
- }
- catch(com.sun.star.uno.Exception exUno)
- {
- throw new com.sun.star.io.NotConnectedException(exUno);
- }
- }
-
- /**
- * following methods simulates the XInputStream.
- * The notice all actions inside the internal protocol
- * and try to map all necessary functions to the internal
- * open in-stream.
- */
- public int readBytes(byte[][] lData, int nBytesToRead )
- throws com.sun.star.io.NotConnectedException,
- com.sun.star.io.BufferSizeExceededException,
- com.sun.star.io.IOException
- {
- m_bInWasUsed = true;
-
- if (m_xInStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- int nRead = 0;
- try
- {
- nRead = m_xInStream.readBytes(lData,nBytesToRead);
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.BufferSizeExceededException exBuffer ) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
-
-
- return nRead;
- }
-
- public int readSomeBytes(byte[][] lData, int nMaxBytesToRead)
- throws com.sun.star.io.NotConnectedException,
- com.sun.star.io.BufferSizeExceededException ,
- com.sun.star.io.IOException
- {
- m_bInWasUsed = true;
-
- if (m_xInStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- int nRead = 0;
- try
- {
- nRead = m_xInStream.readSomeBytes(lData,nMaxBytesToRead);
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.BufferSizeExceededException exBuffer ) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
-
- return nRead;
- }
-
-
-
- public void skipBytes(int nBytesToSkip)
- throws com.sun.star.io.NotConnectedException,
- com.sun.star.io.BufferSizeExceededException ,
- com.sun.star.io.IOException
- {
- m_bInWasUsed = true;
-
- if (m_xInStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- try
- {
- m_xInStream.skipBytes(nBytesToSkip);
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.BufferSizeExceededException exBuffer ) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
- }
-
- public int available() throws com.sun.star.io.NotConnectedException,
- com.sun.star.io.IOException
- {
- m_bInWasUsed = true;
-
- if (m_xInStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- int nAvailable = 0;
- try
- {
- nAvailable = m_xInStream.available();
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
-
- return nAvailable;
- }
-
-
-
- public void closeInput() throws com.sun.star.io.NotConnectedException,
- com.sun.star.io.IOException
- {
- m_bInWasUsed = true;
-
- if (m_xInStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- try
- {
- m_xInStream.closeInput();
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
- }
-
- /**
- * following methods simulates the XOutputStream.
- * The notice all actions inside the internal protocol
- * and try to map all necessary functions to the internal
- * open out-stream.
- */
- public void writeBytes(byte[] lData)
- throws com.sun.star.io.NotConnectedException,
- com.sun.star.io.BufferSizeExceededException ,
- com.sun.star.io.IOException
- {
- m_bOutWasUsed = true;
-
- if (m_xOutStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- try
- {
- m_xOutStream.writeBytes(lData);
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.BufferSizeExceededException exBuffer ) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
-
- }
-
-
-
- public void flush() throws com.sun.star.io.NotConnectedException ,
- com.sun.star.io.BufferSizeExceededException ,
- com.sun.star.io.IOException
- {
- m_bOutWasUsed = true;
-
- if (m_xOutStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- try
- {
- m_xOutStream.flush();
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.BufferSizeExceededException exBuffer ) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
- }
-
-
-
- public void closeOutput() throws com.sun.star.io.NotConnectedException ,
- com.sun.star.io.BufferSizeExceededException,
- com.sun.star.io.IOException
- {
- m_bOutWasUsed = true;
-
- if (m_xOutStream == null)
- {
- throw new com.sun.star.io.NotConnectedException("stream not open");
- }
-
- try
- {
- m_xOutStream.closeOutput();
- }
- catch (com.sun.star.io.NotConnectedException exConnect) {
- }
- catch (com.sun.star.io.BufferSizeExceededException exBuffer ) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
- }
-
- /**
- * following methods simulates the XSeekable.
- * The notice all actions inside the internal protocol
- * and try to map all necessary functions to the internal
- * open stream.
- */
- public void seek(long nLocation )
- throws com.sun.star.lang.IllegalArgumentException,
- com.sun.star.io.IOException
- {
- if (m_xInStream != null)
- m_bInWasUsed = true;
- else
- if (m_xOutStream != null)
- m_bOutWasUsed = true;
-
- if (m_xSeek == null)
- {
- throw new com.sun.star.io.IOException("stream not seekable");
- }
-
- try
- {
- m_xSeek.seek(nLocation);
- }
- catch (com.sun.star.lang.IllegalArgumentException exArg ) {
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
- }
-
- public long getPosition() throws com.sun.star.io.IOException
- {
-
- if (m_xInStream != null)
- m_bInWasUsed = true;
- else
- if (m_xOutStream != null)
- m_bOutWasUsed = true;
-
- if (m_xSeek == null)
- {
- throw new com.sun.star.io.IOException("stream not seekable");
- }
-
- long nPos = 0;
- try
- {
- nPos = m_xSeek.getPosition();
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
-
- return nPos;
- }
-
-
-
- public long getLength() throws com.sun.star.io.IOException
- {
-
- if (m_xInStream != null)
- m_bInWasUsed = true;
- else
- if (m_xOutStream != null)
- m_bOutWasUsed = true;
-
- if (m_xSeek == null)
- {
- throw new com.sun.star.io.IOException("stream not seekable");
- }
-
- long nLen = 0;
- try
- {
- nLen = m_xSeek.getLength();
- }
- catch (com.sun.star.io.IOException exIO ) {
- }
- catch (com.sun.star.uno.RuntimeException exRuntime) {
- }
-
- return nLen;
- }
-}
diff --git a/framework/qa/complex/loadAllDocuments/TestDocument.java b/framework/qa/complex/loadAllDocuments/TestDocument.java
deleted file mode 100644
index b09d17252c71..000000000000
--- a/framework/qa/complex/loadAllDocuments/TestDocument.java
+++ /dev/null
@@ -1,32 +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 complex.loadAllDocuments;
-
-import java.io.File;
-import org.openoffice.test.OfficeFileUrl;
-
-final class TestDocument
-{
- public static String getUrl(String name)
- {
- return OfficeFileUrl.getAbsolute(new File("testdocuments", name));
- }
-
- private TestDocument() {}
-}
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java b/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java
index 1217b0274a9a..6f8d415e0337 100644
--- a/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java
+++ b/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java
@@ -24,9 +24,6 @@ public class AWeakBase extends WeakBase implements XEventListener
{
public int nDisposingCalled= 0;
- public AWeakBase(int i)
- {
- }
public AWeakBase()
{
}
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java
index 1e1359c919cf..41149ba61a18 100644
--- a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java
+++ b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java
@@ -1624,7 +1624,6 @@ XPropertiesChangeListener
int nChangeCalled;
int nPropertiesChange;
int nVetoCalled;
- private int nDisposingCalled;
boolean bVeto= false;
PropertyChangeEvent evt;
PropertyChangeEvent[] arEvt;
@@ -1646,7 +1645,6 @@ XPropertiesChangeListener
public void disposing( /*IN*/EventObject Source )
{
- nDisposingCalled++;
}
public void reset()
@@ -1654,7 +1652,6 @@ XPropertiesChangeListener
nChangeCalled= 0;
nPropertiesChange= 0;
nVetoCalled= 0;
- nDisposingCalled= 0;
evt= null;
arEvt= null;
bVeto= false;
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java b/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java
index cfce044c5f06..c021d52defaa 100644
--- a/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java
+++ b/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java
@@ -62,10 +62,8 @@ public class ProxyProvider
class Proxy implements IQueryInterface, XEventListener
{
private String oid;
- Type type;
Proxy(String oid, Type t) {
this.oid = oid;
- this.type = t;
}
public String getOid() {
diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java
index e84bd2a5f497..8525105d09dc 100644
--- a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java
+++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java
@@ -99,8 +99,6 @@ class TestBridge implements IBridge {
public void release() {}
- public void reset() throws IOException {}
-
public void dispose() throws InterruptedException, IOException {}
}
diff --git a/nlpsolver/Jar_EvolutionarySolver.mk b/nlpsolver/Jar_EvolutionarySolver.mk
index ba8f23f4398a..5dad01a717bb 100644
--- a/nlpsolver/Jar_EvolutionarySolver.mk
+++ b/nlpsolver/Jar_EvolutionarySolver.mk
@@ -24,21 +24,12 @@ $(eval $(call gb_Jar_set_packageroot,EvolutionarySolver,net/adaptivebox))
$(eval $(call gb_Jar_set_manifest,EvolutionarySolver,$(SRCDIR)/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/Manifest.mf))
$(eval $(call gb_Jar_add_sourcefiles,EvolutionarySolver,\
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/SRComparator \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/BCHComparator \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/IGoodnessCompareEngine \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/PenaltyComparator \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicArray \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/OutputMethods \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/IUpdateCycleEngine \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicTag \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalStruct \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/IEncodeEngine \
@@ -46,7 +37,6 @@ $(eval $(call gb_Jar_add_sourcefiles,EvolutionarySolver,\
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignDim \
- nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/UnconstrainedProblemEncoder \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library \
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/ILibEngine \
diff --git a/nlpsolver/Jar_nlpsolver.mk b/nlpsolver/Jar_nlpsolver.mk
index 5dca8ac42e95..b7749e2d4189 100644
--- a/nlpsolver/Jar_nlpsolver.mk
+++ b/nlpsolver/Jar_nlpsolver.mk
@@ -40,7 +40,6 @@ $(eval $(call gb_Jar_add_sourcefiles,nlpsolver,\
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Button \
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/LabeledControl \
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/Label \
- nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/ModalState \
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/DummyEvolutionarySolverStatusDialog \
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/IEvolutionarySolverStatusDialog \
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno \
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalStruct.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalStruct.java
index 6eed75dc3167..15760e23a39e 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalStruct.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalStruct.java
@@ -32,9 +32,6 @@ public class EvalStruct {
public EvalStruct(int elemsNum) {
evalElems = new EvalElement[elemsNum];
}
- public int getSize() {
- return evalElems.length;
- }
public void setElemAt(EvalElement dim, int index) {
evalElems[index] = dim;
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicArray.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicArray.java
deleted file mode 100644
index 4718f6ce62da..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicArray.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Description: basic operations on Arrays
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Oct. 9, 2002
- *
- */
-
-package net.adaptivebox.global;
-
-public class BasicArray {
- public static double getMinValue(double[] v) {
- double mv = Double.MAX_VALUE;
- for (int i=0; i<v.length; i++) {
- if (v[i]<mv) {
- mv=v[i];
- }
- }
- return mv;
- }
- public static double getMaxValue(double[] v) {
- double mv = -Double.MAX_VALUE;
- for (int i=0; i<v.length; i++) {
- if (v[i]>mv) {
- mv=v[i];
- }
- }
- return mv;
- }
-
-}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
index f7b8dfdb6f2d..31ab19f800e4 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicBound.java
@@ -37,13 +37,6 @@ public class BasicBound {
return Math.abs(maxValue-minValue);
}
- public boolean isSatisfyCondition(double child){
- if(child > maxValue || child < minValue) {
- return(false);
- }
- return(true);
- }
-
public double boundAdjust(double value){
if(value > maxValue) {
value = maxValue;
@@ -66,13 +59,6 @@ public class BasicBound {
- public double randomAdjust (double value){
- if(value > maxValue || value < minValue) {
- value = getRandomValue();
- }
- return value;
- }
-
public double getRandomValue(){
return RandomGenerator.doubleRangeRandom(minValue, maxValue);
}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicTag.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicTag.java
deleted file mode 100644
index 0bb5cc663817..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/BasicTag.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Description: defines some static constant values.
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Sep 22, 2000 xiaofengxie@tsinghua.org.cn
- *
- * @version 1.0
- * @Since MAOS1.0
- */
-
-package net.adaptivebox.global;
-
-
-public class BasicTag {
-
- public static final String DOT_TAG = ".";
-
- public static final String FILE_SEP_TAG = System.getProperty("file.separator");
-
-}
-
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java
deleted file mode 100644
index a48796a55109..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/CompareValue.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Description: Global value for comparison.
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Jun 15, 2002
- * Xiaofeng Xie Feb 18, 2004
- *
- * @version 1.0
- * @Since MAOS1.0
- */
-
-
-package net.adaptivebox.global;
-
-public class CompareValue {
- public static final int LARGER_THAN = 2;
- public static final int EQUAL_TO = 1;
- public static final int LESS_THAN = 0;
-}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java
deleted file mode 100644
index 741f201e5a11..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalCompare.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Description: Global package for comparison.
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Jun 15, 2002 xiaofengxie@tsinghua.org.cn
- *
- *
- * @version 1.0
- * @Since MAOS1.0
- */
-
-
-package net.adaptivebox.global;
-
-public class GlobalCompare {
-
-/* compare the data1 and data2, if data1=data2, return 0
- * if data1 < data2, return LESS_THAN, else if data1 > data2, LARGER_THAN
- **/
- static public int compare(double data1, double data2) {
- if (data1 < data2)
- return CompareValue.LESS_THAN;
- else if (data1 > data2)
- return CompareValue.LARGER_THAN;
- else
- return CompareValue.EQUAL_TO;
- }
-
-
-}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java
deleted file mode 100644
index 707dd7e1d214..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * Description: Global package for file operations.
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Jun 15, 2002
- *
- * @version 1.0
- * @Since MAOS1.0
- */
-
-
-package net.adaptivebox.global;
-
-import java.io.*;
-import java.util.*;
-
-public class GlobalFile {
-
-// used by the createTempDir to give an index of temp number.
- private static int counter = -1;
-
-/**
- * Create a temp directory in the given directory.
- * @param prefix the prefix for the directory.
- * @param directory the directory that the temp dirctory placed.
- * @return If a temp directory is created, return a File Object, else
- * return null.
- */
- public static File createTempDir(String prefix, String directory)
- {
- File f = null;
- String tempDir;
- boolean isCreated = false;
- do {
- if (counter == -1) {
- counter = new Random().nextInt() & 0xffff;
- }
- counter++;
- if (prefix == null)
- throw new NullPointerException();
- if (prefix.length() < 3)
- throw new IllegalArgumentException("Prefix string too short");
- if (directory == null) {
- tempDir = prefix + counter;
- } else {
- tempDir = getFileLocation(directory, prefix + counter);
- }
- f = new File(tempDir);
- isCreated = f.mkdir();
- } while (!isCreated);
- return f;
- }
-
-/**
- * Add the given text string to the end of a given file.
- * @param inStr The string to be added.
- * @param fileStr the name of the file to be added.
- */
- public static void addStringToFile(String inStr, String fileStr) throws Exception {
-
- RandomAccessFile raFile = new RandomAccessFile(fileStr,"rw");
- raFile.seek(raFile.length());
- raFile.writeBytes(inStr);
- raFile.close();
- }
-
- public static Object loadObjectFromFile(String fileName) throws Exception {
- FileInputStream fis = new FileInputStream(fileName);
- ObjectInputStream ois = new ObjectInputStream(fis);
- Object obj = ois.readObject();
- ois.close();
- return obj;
- }
-
- public static void saveObjectToFile(String fileName, Object obj) throws Exception {
- FileOutputStream ostream = new FileOutputStream(fileName);
- ObjectOutputStream p = new ObjectOutputStream(ostream);
- p.writeObject(obj);
- p.flush();
- ostream.close();
- }
-
-/**
- * Save the given text string to a given file.
- * @param inStr The string to be saved.
- * @param fileStr the name of the file to be saved.
- */
- public static void saveStringToFile(String inStr, String fileStr) throws Exception{
- new File(new File(fileStr).getParent()).mkdirs();
- FileOutputStream pspOutputStream = null;
- try {
- pspOutputStream = new FileOutputStream(new File(fileStr));
- pspOutputStream.write(inStr.getBytes());
- } finally {
- if (pspOutputStream != null)
- pspOutputStream.close();
- }
- }
-
-/**
- * Load text string from a given file.
- * @param fileStr the name of the file to be loaded.
- * @return A text string that is the content of the file. if the given file is
- * not exist, then return null.
- */
- public static String getStringFromFile(String fileStr) throws Exception {
- String getStr = null;
- FileInputStream pspInputStream = null;
- try {
- pspInputStream = new FileInputStream(fileStr);
- byte[] pspFileBuffer = new byte[pspInputStream.available()];
- pspInputStream.read(pspFileBuffer);
-
- getStr = new String(pspFileBuffer);
- } finally {
- if (pspInputStream != null)
- pspInputStream.close();
- }
- return getStr;
- }
-
-/**
- * Load curve data from a specified file.
- * @param fileName the name of the file to be loaded.
- * @return An ArrayList that include the curve data.
- */
- public static ArrayList<ArrayList<Double>> getCurveDataFromFile(String fileName) {
- File file = new File(fileName);
- if(!file.exists()){
- return null;
- }
- //open data file
- FileInputStream inStream = null;
- BufferedReader inReader = null;
- try{
- inStream = new FileInputStream(file);
- inReader = new BufferedReader(new InputStreamReader(inStream));
- }catch(Exception e){
- return null;//Data file open error.
- }
- ArrayList<Double> xaxes = new ArrayList<Double>(1);
- ArrayList<Double> yaxes = new ArrayList<Double>(1);
- try{
- StringTokenizer st;
- String s;
- boolean start = false;
- while(inReader.ready()){
- st = new StringTokenizer(inReader.readLine());
- over:{
- while(!st.hasMoreTokens()){//Justify blank lines.
- if(inReader.ready()){
- st = new StringTokenizer(inReader.readLine());
- }else
- break over;
- }
- s = st.nextToken();
- if((!start)&&(!s.startsWith("@")))
- break over;
- if(!start){
- start = true;
- break over;
- }
- if(s.startsWith("#")||s.startsWith("$")||s.startsWith("/")) break over;//Justify comment line.
- Double xaxis = null;
- Double yaxis = null;
- try{
- xaxis = Double.valueOf(s);
- xaxes.add(xaxis);
- }catch(NumberFormatException e){
- inReader.close();
- inStream.close();
- return null;//Data file data format error.
- }
- s = st.nextToken();
- try{
- yaxis = Double.valueOf(s);
- yaxes.add(yaxis);
- }catch(NumberFormatException e){
- inReader.close();
- inStream.close();
- return null;//Data file data format error.
- }
- }
- }
- inReader.close();
- }catch(Exception e){
- return null;//Uncertain data file error.
- }
- ArrayList<ArrayList<Double>> curveData = new ArrayList<ArrayList<Double>>(2);
- curveData.add(xaxes);
- curveData.add(yaxes);
- return curveData;
- }
-
-/**
- * Get a full path of a given file name and a directory name.
- * @param fileName the name of the file.
- * @param dir the name of directory.
- * @return The full path.
- */
- public static String getFileLocation(String dir, String fileName) {
- String realDir = dir;
- while (realDir.length()>0 && (realDir.endsWith("/")||realDir.endsWith("\\"))) {
- realDir = dir.substring(0, dir.length()-1);
- }
- return realDir+BasicTag.FILE_SEP_TAG+fileName;
- }
-
- public static String getFileName(String nameBody, String suffix) {
- if (suffix==null || suffix.trim().length()==0) {
- return nameBody;
- }
- String fileName = nameBody;
- if(nameBody.endsWith(".")) {
- return fileName+suffix;
- } else {
- return nameBody+"."+suffix;
- }
- }
-
- public static String getFileLocation(String dir, String fileNameBody, String fileNameSuffix) {
- String filename = getFileName(fileNameBody, fileNameSuffix);
- return getFileLocation(dir, filename);
- }
-
- public static void clear(String fileStr) throws Exception {
- File file = new File(fileStr);
- if(file.isFile()) {
- file.delete();
- return;
- }
- String[] fileNames = file.list();
- if (fileNames==null) {
- return;
- }
- for (int i=0; i<fileNames.length; i++) {
- String newFileName = GlobalFile.getFileLocation(fileStr,fileNames[i]);
- clear(newFileName);
- }
- file.delete();
- }
-
- public static String getFilePrefix(String fileStr) {
- int index = fileStr.lastIndexOf(BasicTag.DOT_TAG);
- if(index==-1) index = fileStr.length();
- return fileStr.substring(0, index);
- }
-
- public static String getFileSuffix(String fileStr) {
- String[] subNames = GlobalString.tokenize(fileStr, BasicTag.DOT_TAG);
- int subNameLen = subNames.length;
- if(subNameLen==1) return "";
- else return subNames[subNameLen-1];
- }
-
- public static String createTempImageFile(String origFile) throws Exception {
- return createTempImageFile(origFile, "img", ".inf");
- }
-
- public static String createTempImageFile(String origFile, String prefix, String suffix) throws Exception {
- File outputFile = createTempFile(prefix, suffix);
- outputFile.deleteOnExit();
- copyFile(outputFile.getAbsolutePath(), origFile);
- return outputFile.getAbsolutePath();
- }
-
- public static void copyFile(String imgFile, String origFile) throws Exception {
- String fileContent = GlobalFile.getStringFromFile(origFile);
- GlobalFile.saveStringToFile(fileContent, imgFile);
- }
-
- public static File createTempFile(String prefix, String suffix) throws Exception {
- String realSuffix = suffix;
- if (!realSuffix.startsWith(".")) realSuffix = "."+suffix;
- return File.createTempFile(prefix, realSuffix);
- }
-}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java
deleted file mode 100644
index d7dafebb091a..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Description: operations for the a text string.
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Feb 22, 2001
- * Xiaofeng Xie May 12, 2004
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * Please acknowledge the author(s) if you use this code in any way.
- *
- * @version 1.0
- * @Since MAOS1.0
- */
-
-package net.adaptivebox.global;
-
-import java.util.*;
-
-public class GlobalString {
-
- /**
- * Tokenize a String with given key.
- *
- * @param input the String to be tokenized.
- * @param tokenKey the delimiters.
- * @return a String array that include the elements of input string that
- * divided by the tokenKey.
- */
- public static String[] tokenize(String input, String tokenKey) {
- ArrayList<String> v = new ArrayList<String>();
- StringTokenizer t = new StringTokenizer(input, tokenKey);
- while (t.hasMoreTokens()) {
- v.add(t.nextToken());
- }
- return v.toArray(new String[v.size()]);
- }
-
-} \ No newline at end of file
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/OutputMethods.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/OutputMethods.java
deleted file mode 100644
index 19dfab7a2a7b..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/OutputMethods.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Description: Output methods for Array
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Feb 22, 2001
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * Please acknowledge the author(s) if you use this code in any way.
- *
- * @version 1.0
- * @Since MAOS1.0
- */
-
-package net.adaptivebox.global;
-
-
-public class OutputMethods {
-
- public static void outputVector(double[] vector){
- for(int i=0;i<vector.length;i++){
- System.out.print(vector[i]+" \t");
- }
- System.out.println("");
- }
-} \ No newline at end of file
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/PenaltyComparator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/PenaltyComparator.java
deleted file mode 100644
index 54ff61ce7dec..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/PenaltyComparator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Description: For comparison of goodness in landscape with penalty method.
- *
- * @Applied domain: efficiently for ridge class feasible space (SF), such as
- * the problem with equality constraints
- *
- * Author Create/Modi Note
- * Xiaofeng Xie May 29, 2004
- *
- * @version 1.0
- *
- * [1] Runarsson T P, Yao X. Stochastic ranking for constrained evolutionary
- * optimization. IEEE Trans. on Evolutionary Computation. 2000, 4 (3): 284-294
- *
- */
-
-package net.adaptivebox.goodness;
-
-import net.adaptivebox.global.*;
-
-public class PenaltyComparator implements IGoodnessCompareEngine {
- public double Rg = 0;
-
- public PenaltyComparator() {}
-
- public PenaltyComparator(double rg) {
- this.Rg = rg;
- }
-
- public double calcPenaltyValue(double fit1, double fit2) {
- return fit1+Rg*fit2;
- }
- /**
- * check the magnitude of two array, the frontial is more important
- * Stoch ranking: array size = 2
- **/
- public int compare(double[] fit1, double[] fit2) {
- return GlobalCompare.compare(calcPenaltyValue(fit1[1], fit1[0]), calcPenaltyValue(fit2[1], fit2[0]));
- }
-
-}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/SRComparator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/SRComparator.java
deleted file mode 100644
index 5b2e82305d2b..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/SRComparator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Description: For comparison of goodness in landscape with stoch. ranking.
- *
- * Author Create/Modi Note
- * Xiaofeng Xie May 29, 2004
- *
- * [1] Runarsson T P, Yao X. Stochastic ranking for constrained evolutionary
- * optimization. IEEE Trans. on Evolutionary Computation. 2000, 4 (3): 284-294
- *
- */
-
-package net.adaptivebox.goodness;
-
-import net.adaptivebox.global.*;
-
-public class SRComparator implements IGoodnessCompareEngine, IUpdateCycleEngine {
- public double Pf = 0.5;
-
- public SRComparator() {}
-
- public SRComparator(double pf) {
- this.Pf = pf;
- }
-
- public void updateCycle(int t) {
- Pf *=0.995;
- }
-
- /**
- * check the magnitude of two array, the frontial is more important
- * Stoch ranking: array size = 2
- **/
- public int compare(double[] fit1, double[] fit2) {
- if((fit1[0]==fit2[0])||Pf>Math.random()) {
- return GlobalCompare.compare(fit1[1], fit2[1]);
- } else {
- return GlobalCompare.compare(fit1[0], fit2[0]);
- }
- }
-
-}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java
index d4c202c989fc..cca7f0d4a069 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java
@@ -32,10 +32,6 @@ public class Library {
private final SearchPoint[] libPoints;
private int gIndex = -1;
- public Library(SearchPoint[] points){
- this.libPoints = points;
- }
-
public Library(int number, ProblemEncoder problemEncoder){
libPoints = new SearchPoint[number];
for (int i=0; i<number; i++) {
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
index bc32c1c8d78b..b7b055a1412d 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java
@@ -53,10 +53,6 @@ public abstract class ProblemEncoder {
return designSpace;
}
- public EvalStruct getEvalStruct() {
- return evalStruct;
- }
-
//set the default information for each dimension of search space (S)
protected void setDefaultXAt(int i, double min, double max, double grain) {
DesignDim dd = new DesignDim();
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/UnconstrainedProblemEncoder.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/UnconstrainedProblemEncoder.java
deleted file mode 100644
index 60b3644ffa5c..000000000000
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/UnconstrainedProblemEncoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Description: For unconstrained function
- *
- * Author Create/Modi Note
- * Xiaofeng Xie Dec 28, 2001
- * Xiaofeng Xie Mar 02, 2003
- * Xiaofeng Xie May 11, 2004
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * Please acknowledge the author(s) if you use this code in any way.
- *
- * @version 1.0
- * @Since MAOS1.0
- */
-
-package net.adaptivebox.problem;
-
-import net.adaptivebox.global.*;
-
-public abstract class UnconstrainedProblemEncoder extends ProblemEncoder {
- protected UnconstrainedProblemEncoder(int NX) throws Exception {
- super(NX, 1);
- setDefaultYAt(0, BasicBound.MINDOUBLE, BasicBound.MINDOUBLE);
- }
-
- @Override
- protected double calcTargetAt(int index, double[] VX) {
- return calcTarget(VX);
- }
- abstract public double calcTarget(double[] VX);
-}
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java
index 1c36dd3d5910..7e7629af8e10 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/DesignSpace.java
@@ -72,11 +72,6 @@ public class DesignSpace {
for(int i=0;i<tempX.length;i++) tempX[i] = dimProps[i].paramBound.getRandomValue(); //Global.RandomGenerator.doubleRangeRandom(9.8, 10);
}
- public double[] getFreshGene() {
- double[] tempX = new double[this.getDimension()];
- initializeGene(tempX);
- return tempX;
- }
public void getMappingPoint(double[] point) {
for(int i=0; i<getDimension(); i++) {
point[i] = dimProps[i].paramBound.annulusAdjust(point[i]);
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/ModalState.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/ModalState.java
deleted file mode 100644
index 3f2fd198686d..000000000000
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/ModalState.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2009 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package com.sun.star.comp.Calc.NLPSolver.dialogs;
-
-/**
- * The ModalState is used to represent the state of the dialog when it closes.
- * "Exit" indicates no significant change (for example when the user presses
- * Cancel or simply closes the dialog). "OK" indicates for example, that the
- * user pressed the OK button.
- */
-public enum ModalState {
- Exit
-}
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
index 2af5b1176046..7de59c4b0f12 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
@@ -65,10 +65,6 @@ public abstract class BaseControl {
properties = UnoRuntime.queryInterface(XPropertySet.class, unoModel);
}
- public Object getUnoControl() {
- return unoControl;
- }
-
public void setParentControl(BaseControl parentControl) {
//TODO : remove from existing parentControl
try {
diff --git a/qadevOOo/runner/org/openoffice/RunnerService.java b/qadevOOo/runner/org/openoffice/RunnerService.java
index 82f240c738a0..f04133ff446d 100644
--- a/qadevOOo/runner/org/openoffice/RunnerService.java
+++ b/qadevOOo/runner/org/openoffice/RunnerService.java
@@ -315,54 +315,3 @@ public class RunnerService implements XJob, XServiceInfo,
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qadevOOo/testdocs/qadevlibs/source/test/Job.java b/qadevOOo/testdocs/qadevlibs/source/test/Job.java
index c763b95d3507..86e9a42dbf97 100644
--- a/qadevOOo/testdocs/qadevlibs/source/test/Job.java
+++ b/qadevOOo/testdocs/qadevlibs/source/test/Job.java
@@ -37,11 +37,9 @@ public class Job {
Object oDoc = null;
String actionType = null;
String actionParm = null;
- private XMultiServiceFactory oMSF = null;
public _Implementation(XMultiServiceFactory xMSF) {
- oMSF = xMSF;
}
// XServiceInfo
diff --git a/reportbuilder/Jar_reportbuilder.mk b/reportbuilder/Jar_reportbuilder.mk
index 325a1029f897..36deed8832a6 100644
--- a/reportbuilder/Jar_reportbuilder.mk
+++ b/reportbuilder/Jar_reportbuilder.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/ReportEngineMetaData \
reportbuilder/java/org/libreoffice/report/ReportEngineParameterNames \
reportbuilder/java/org/libreoffice/report/ReportExecutionException \
- reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData \
reportbuilder/java/org/libreoffice/report/ReportJob \
reportbuilder/java/org/libreoffice/report/ReportJobDefinition \
reportbuilder/java/org/libreoffice/report/ReportJobFactory \
@@ -69,7 +68,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/pentaho/DefaultNameGenerator \
reportbuilder/java/org/libreoffice/report/pentaho/OfficeNamespaces \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoFormulaContext \
- reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob \
@@ -83,7 +81,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/pentaho/StarReportDataFactory \
reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule \
reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression \
- reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData \
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/AbstractReportElementLayoutController \
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FixedTextLayoutController \
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility \
@@ -226,7 +223,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/util/DefaultJobProperties \
reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap \
reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition \
- reportbuilder/java/org/libreoffice/report/util/ManifestWriter \
))
$(eval $(call gb_Jar_add_packagefiles,reportbuilder,,\
diff --git a/reportbuilder/java/org/libreoffice/report/DataSourceException.java b/reportbuilder/java/org/libreoffice/report/DataSourceException.java
index 06c1ef9c6a7f..5990b030f623 100644
--- a/reportbuilder/java/org/libreoffice/report/DataSourceException.java
+++ b/reportbuilder/java/org/libreoffice/report/DataSourceException.java
@@ -36,19 +36,6 @@ public class DataSourceException extends Exception
}
/**
- * Constructs a new exception with the specified detail message. The cause is
- * not initialized, and may subsequently be initialized by a call to {@link
- * #initCause}.
- *
- * @param message the detail message. The detail message is saved for later
- * retrieval by the {@link #getMessage()} method.
- */
- public DataSourceException(String message)
- {
- super(message);
- }
-
- /**
* Constructs a new exception with the specified detail message and cause.
* <p>Note that the detail message associated with <code>cause</code> is
* <i>not</i> automatically incorporated in this exception's detail message.
@@ -65,20 +52,4 @@ public class DataSourceException extends Exception
super(message, cause);
}
- /**
- * Constructs a new exception with the specified cause and a detail message of
- * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains
- * the class and detail message of <tt>cause</tt>). This constructor is useful
- * for exceptions that are little more than wrappers for other throwables (for
- * example, {@link java.security.PrivilegedActionException}).
- *
- * @param cause the cause (which is saved for later retrieval by the {@link
- * #getCause()} method). (A <tt>null</tt> value is permitted,
- * and indicates that the cause is nonexistent or unknown.)
- * @since 1.4
- */
- public DataSourceException(Throwable cause)
- {
- super(cause);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java b/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
deleted file mode 100644
index dd5919c7503d..000000000000
--- a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
+++ /dev/null
@@ -1,36 +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 org.libreoffice.report;
-
-public interface ReportExpressionMetaData
-{
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
diff --git a/reportbuilder/java/org/libreoffice/report/SOImageService.java b/reportbuilder/java/org/libreoffice/report/SOImageService.java
index 7070038bc11d..3cfdf35268a0 100644
--- a/reportbuilder/java/org/libreoffice/report/SOImageService.java
+++ b/reportbuilder/java/org/libreoffice/report/SOImageService.java
@@ -28,12 +28,9 @@ import com.sun.star.io.XInputStream;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter;
-import com.sun.star.lib.uno.adapter.InputStreamToXInputStreamAdapter;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import java.io.InputStream;
-
public class SOImageService implements ImageService
{
@@ -62,11 +59,6 @@ public class SOImageService implements ImageService
}
}
- public Size getImageSize(final InputStream image) throws ReportExecutionException
- {
- return getImageSize(new InputStreamToXInputStreamAdapter(image));
- }
-
private Size getImageSize(final XInputStream image) throws ReportExecutionException
{
final Size dim = new Size();
@@ -163,11 +155,6 @@ public class SOImageService implements ImageService
return null;
}
- public String getMimeType(final InputStream image) throws ReportExecutionException
- {
- return getMimeType(new InputStreamToXInputStreamAdapter(image));
- }
-
public String getMimeType(final byte[] image) throws ReportExecutionException
{
return getMimeType(new ByteArrayToXInputStreamAdapter(image));
diff --git a/reportbuilder/java/org/libreoffice/report/StorageRepository.java b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
index 1ccfc5253f77..8b6d08c458a2 100644
--- a/reportbuilder/java/org/libreoffice/report/StorageRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
@@ -147,11 +147,6 @@ public class StorageRepository implements InputRepository, OutputRepository
return false;
}
- public boolean isWritable(final String name)
- {
- return true;
- }
-
public Object getId()
{
return "1";
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
deleted file mode 100644
index 0be99672893d..000000000000
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
+++ /dev/null
@@ -1,45 +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 org.libreoffice.report.pentaho;
-
-import org.libreoffice.report.ReportExpressionMetaData;
-import org.libreoffice.report.pentaho.expressions.SumExpression;
-
-/**
- * This class is a dummy implementation. Ignore it for now, we may extend this
- * one later.
- */
-public class PentahoReportAddIn
-{
-
- public SumExpression createExpression(final int expression)
- {
- return (expression == 0) ? new SumExpression() : null;
- }
-
- public int getExpressionCount()
- {
- return 1;
- }
-
- public ReportExpressionMetaData getMetaData(final int expression)
- {
- // todo implement me
- return null;
- }
-}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java
index 05fa691273fe..4f5aa81c4b2b 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java
@@ -35,11 +35,6 @@ public class PentahoReportEngine
this.metaData = new PentahoReportEngineMetaData();
}
- public ReportEngineMetaData getMetaData()
- {
- return metaData;
- }
-
public ReportJobDefinition createJobDefinition()
{
return new DefaultReportJobDefinition(metaData);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java
index e73c263cca83..f63617acc15f 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java
@@ -92,43 +92,9 @@ public class PentahoReportEngineMetaData
enumerationValues.add(CONTENT_TYPE, PentahoReportEngineMetaData.DEBUG);
}
- public Object[] getEnumerationValues(final String parameter)
- {
- return enumerationValues.toArray(parameter);
- }
-
public Class getParameterType(final String parameter)
{
return parameterTypes.get(parameter);
}
- public boolean isEnumeration(final String parameter)
- {
- return enumerationValues.containsKey(parameter);
- }
-
- /**
- * Checks, whether a certain output type is available. Feed the mime-type of the output
- * type in and you'll get a true or false back.
- *
- * @return true, if the output type is supported; false otherwise.
- */
- public boolean isOutputSupported(final String mimeType)
- {
- return enumerationValues.containsValue(CONTENT_TYPE, mimeType.toLowerCase());
- }
-
- /**
- * Lists all supported output parameters for the given mime-type. This listing can be
- * used to build a generic user interface for configuring a certain output.
- */
- public String[] getOutputParameters(final String mimeType)
- {
- return new String[0];
- }
-
- public boolean isMandatory(final String parameter)
- {
- return mandatoryParameters.contains(parameter);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
index fba3625785a5..9e0e429b0b92 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
@@ -73,7 +73,6 @@ public class PentahoReportJob implements ReportJob
{
private static final Log LOGGER = LogFactory.getLog(PentahoReportJob.class);
- private boolean finished;
private final DataSourceFactory dataSourceFactory;
private final OutputRepository outputRepository;
private final JobProperties jobProperties;
@@ -82,15 +81,9 @@ public class PentahoReportJob implements ReportJob
private final String outputName;
private final ImageService imageService;
private final InputRepository inputRepository;
- private final ReportJobDefinition definition;
private final List masterValues;
private final List detailColumns;
- public ReportJobDefinition getDefinition()
- {
- return definition;
- }
-
public PentahoReportJob(final ReportJobDefinition definition)
throws JobDefinitionException
{
@@ -99,7 +92,6 @@ public class PentahoReportJob implements ReportJob
throw new NullPointerException();
}
- this.definition = definition;
this.jobProperties = definition.getProcessingParameters().copy();
this.dataSourceFactory = (DataSourceFactory) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY);
@@ -176,37 +168,6 @@ public class PentahoReportJob implements ReportJob
return tempReport;
}
- /**
- * Interrupt the job.
- */
- public void interrupt()
- {
- // hey, not yet ..
- }
-
- /**
- * Queries the jobs result status.
- *
- * @return true, if the job is finished (or has been interrupted), false if the job
- * waits for activation.
- */
- public boolean isFinished()
- {
- return finished;
- }
-
-
-
- /**
- * Queries the jobs execution status.
- *
- * @return true, if the job is currently running, false otherwise.
- */
- public boolean isRunning()
- {
- return !finished;
- }
-
private void collectGroupExpressions(final Node[] nodes, final List<Object[]> expressions, final FormulaParser parser, final Expression reportFunctions[])
{
for (int i = 0; i < nodes.length; i++)
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java
index b54a41baf506..7e26958a8bfd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java
@@ -21,6 +21,7 @@ import org.pentaho.reporting.libraries.base.boot.AbstractModule;
import org.pentaho.reporting.libraries.base.boot.ModuleInitializeException;
import org.pentaho.reporting.libraries.base.boot.SubSystem;
+@SuppressWarnings("ucd")
public class StarReportModule extends AbstractModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
index 1ded22876316..531fe440e27f 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
@@ -17,26 +17,7 @@
*/
package org.libreoffice.report.pentaho.expressions;
-import org.libreoffice.report.DataRow;
-
public class SumExpression
{
- private Object[] parameters;
-
- public Object getParameters()
- {
- return parameters;
- }
-
- public Object getValue(final DataRow row)
- {
-
- return null;
- }
-
- public void setParameters(final Object[] parameters)
- {
- this.parameters = parameters;
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java
deleted file mode 100644
index fbfa73c0d168..000000000000
--- a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java
+++ /dev/null
@@ -1,69 +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 org.libreoffice.report.pentaho.expressions;
-
-import org.libreoffice.report.ReportExpressionMetaData;
-
-import java.util.Locale;
-
-
-public class SumExpressionMetaData implements ReportExpressionMetaData
-{
-
- public String getDescription(final Locale l)
- {
- // todo implement me
- return null;
- }
-
- public String getDisplayName(final Locale l)
- {
- // todo implement me
- return null;
- }
-
- public String getName()
- {
- // todo implement me
- return null;
- }
-
- public int getParameterCount()
- {
- // todo implement me
- return 0;
- }
-
- public String getParameterDescription(final int param, final Locale locale)
- {
- // todo implement me
- return null;
- }
-
- public String getParameterDisplayName(final int param, final Locale locale)
- {
- // todo implement me
- return null;
- }
-
- public String getParameterName(final int param)
- {
- // todo implement me
- return null;
- }
-}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
index 6512d715852c..99888fa00370 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
@@ -26,29 +26,15 @@ package org.libreoffice.report.pentaho.layoutprocessor;
public class ImageElementContext
{
- private final int colSpan;
- private final int rowSpan;
private String[] rowStyles;
private String[] colStyles;
public ImageElementContext(final int colSpan, final int rowSpan)
{
- this.colSpan = colSpan;
- this.rowSpan = rowSpan;
this.colStyles = new String[colSpan];
this.rowStyles = new String[rowSpan];
}
- public int getColSpan()
- {
- return colSpan;
- }
-
- public int getRowSpan()
- {
- return rowSpan;
- }
-
public String[] getRowStyles()
{
return rowStyles;
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
index 961206a95590..308bcd03bcda 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
@@ -37,7 +37,6 @@ import java.util.List;
public class VariablesCollection
{
- private VariablesCollection parent;
private String namePrefix;
private List<FormattedTextElement> variables;
@@ -54,15 +53,9 @@ public class VariablesCollection
}
this.namePrefix = namePrefix;
- this.parent = parent;
this.variables = new ArrayList<FormattedTextElement>();
}
- public VariablesCollection getParent()
- {
- return parent;
- }
-
public String getNamePrefix()
{
return namePrefix;
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java b/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java
index b6e63d0e3162..b579305023d3 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java
@@ -30,7 +30,6 @@ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
import org.pentaho.reporting.libraries.resourceloader.ResourceLoader;
import org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException;
-import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
import org.pentaho.reporting.libraries.resourceloader.loader.LoaderUtils;
@@ -38,7 +37,6 @@ public class InputRepositoryLoader implements ResourceLoader
{
private final InputRepository inputRepository;
- private ResourceManager resourceManager;
public InputRepositoryLoader(final InputRepository inputRepository)
{
@@ -147,16 +145,6 @@ public class InputRepositoryLoader implements ResourceLoader
return new InputRepositoryResourceData(key, inputRepository);
}
- public void setResourceManager(final ResourceManager manager)
- {
- this.resourceManager = manager;
- }
-
- public ResourceManager getResourceManager()
- {
- return resourceManager;
- }
-
public boolean isSupportedDeserializer(String string)
{
throw new UnsupportedOperationException("Not supported yet.");
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java
index 1158cca7d12e..38b6aada4969 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java
@@ -34,8 +34,4 @@ public class DataStyle extends Section
return (String) getAttribute(OfficeNamespaces.STYLE_NS, "name");
}
- public void setStyleName(final String name)
- {
- setAttribute(OfficeNamespaces.STYLE_NS, "name", name);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java
index 0f58ef3da68d..93d9399ddcdd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java
@@ -34,8 +34,4 @@ public class FontFaceElement extends Section
return (String) getAttribute(OfficeNamespaces.STYLE_NS, "name");
}
- public void setStyleName(final String name)
- {
- setAttribute(OfficeNamespaces.STYLE_NS, "name", name);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java
index 46462f838392..fe29bd6f53c9 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java
@@ -61,11 +61,6 @@ public class ImageElement extends ReportElement
return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, OfficeToken.PRESERVE_IRI));
}
- public void setPreserveIRI(final boolean preserveIRI)
- {
- setAttribute(OfficeNamespaces.OOREPORT_NS, OfficeToken.PRESERVE_IRI, String.valueOf(preserveIRI));
- }
-
public String getImageData()
{
return (String) getAttribute(OfficeNamespaces.FORM_NS, OfficeToken.IMAGE_DATA);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java
index 201381dd69e7..e632cc938435 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java
@@ -17,7 +17,6 @@
*/
package org.libreoffice.report.pentaho.model;
-import org.libreoffice.report.OfficeToken;
import org.libreoffice.report.pentaho.OfficeNamespaces;
import org.jfree.report.JFreeReportInfo;
@@ -33,16 +32,6 @@ import org.jfree.report.structure.Section;
public class OfficeGroup extends Section
{
- public boolean isStartNewColumn()
- {
- return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "start-new-column"));
- }
-
- public boolean isResetPageNumber()
- {
- return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "reset-page-number"));
- }
-
public OfficeGroupSection getHeader()
{
final OfficeGroupInstanceSection instanceSection =
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java
index c292f1f0f8cf..a20786bbb8b8 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java
@@ -87,21 +87,11 @@ public class OfficeReport extends Element
return columnHeader;
}
- public void setColumnHeader(final Node columnHeader)
- {
- this.columnHeader = columnHeader;
- }
-
public Node getColumnFooter()
{
return columnFooter;
}
- public void setColumnFooter(final Node columnFooter)
- {
- this.columnFooter = columnFooter;
- }
-
public Node getReportHeader()
{
return reportHeader;
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java
index 2a60c9a8cb32..e5fdf1378aef 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java
@@ -87,21 +87,11 @@ public class OfficeStyle extends Section
return findFirstChild(OfficeNamespaces.STYLE_NS, "table-row-properties");
}
- public Element getTableProperties()
- {
- return findFirstChild(OfficeNamespaces.STYLE_NS, "table-properties");
- }
-
public Element getTableColumnProperties()
{
return findFirstChild(OfficeNamespaces.STYLE_NS, "table-column-properties");
}
- public Element getSectionProperties()
- {
- return findFirstChild(OfficeNamespaces.STYLE_NS, "section-properties");
- }
-
public Element getTableCellProperties()
{
return findFirstChild(OfficeNamespaces.STYLE_NS, "table-cell-properties");
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java
index 937f7a40591c..7e60f65998ec 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java
@@ -20,29 +20,8 @@ package org.libreoffice.report.pentaho.parser;
public final class AttributeSpecification
{
- private final String namespaceUrl;
- private final String attributName;
- private final String mapperImplementation;
-
public AttributeSpecification(String namespaceUrl, String attributName, String mapperImplementation)
{
- this.namespaceUrl = namespaceUrl;
- this.attributName = attributName;
- this.mapperImplementation = mapperImplementation;
}
- public String getAttributName()
- {
- return attributName;
- }
-
- public String getMapperImplementation()
- {
- return mapperImplementation;
- }
-
- public String getNamespaceUrl()
- {
- return namespaceUrl;
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
index 55f8cf3804d3..5322e52efddd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
@@ -27,6 +27,7 @@ import org.jfree.report.modules.factories.report.base.JFreeReportXmlResourceFact
*
* @since 09.03.2007
*/
+@SuppressWarnings("ucd")
public class OfficeDocumentXmlResourceFactory extends JFreeReportXmlResourceFactory
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
index ae05cff7d1ff..8a12da80cf5e 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
@@ -30,6 +30,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory;
*
* @since 09.03.2007
*/
+@SuppressWarnings("ucd")
public class OfficeStylesXmlResourceFactory extends AbstractXmlResourceFactory
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java
index be7ef7aaf63c..7c7b70533c79 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java
@@ -24,6 +24,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo;
import org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule;
import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
+@SuppressWarnings("ucd")
public class StarStyleXmlFactoryModule implements XmlFactoryModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java
index f3a711486677..ef81b23ad50c 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java
@@ -24,6 +24,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo;
import org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule;
import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
+@SuppressWarnings("ucd")
public class StarXmlFactoryModule implements XmlFactoryModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
index 8f7ae01eb47c..83c5b1f6a5fd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
@@ -52,11 +52,6 @@ public class FontFaceDeclsReadHandler extends ElementReadHandler
this.fontFaceReadHandlers = new ArrayList<FontFaceReadHandler>();
}
- public FontFaceDeclsSection getFontFaceDecls()
- {
- return fontFaceDecls;
- }
-
/**
* Returns the handler for a child element.
*
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java
index 5b0065b94f21..f86cae8e546e 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java
@@ -53,11 +53,6 @@ public class MasterStylesReadHandler extends ElementReadHandler
this.otherHandlers = new ArrayList<ElementReadHandler>();
}
- public OfficeMasterStyles getMasterStyles()
- {
- return masterStyles;
- }
-
/**
* Returns the handler for a child element.
*
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java
index d9a9ec929af9..e5aa0851f505 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java
@@ -37,11 +37,6 @@ public class SubDocumentReadHandler extends NoCDATATextContentReadHandler
private final ObjectOleElement element;
private boolean ignore = false;
- public SubDocumentReadHandler(final ObjectOleElement element)
- {
- this.element = element;
- }
-
private SubDocumentReadHandler(final Section section, final ObjectOleElement element)
{
super(section);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java
index 371026905cad..fc0b1481ef0b 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java
@@ -30,11 +30,6 @@ import org.xml.sax.SAXException;
public class TextContentReadHandler extends NoCDATATextContentReadHandler
{
- public TextContentReadHandler(final Section section, final boolean copyType)
- {
- super(section, copyType);
- }
-
public TextContentReadHandler(final Section section)
{
super(section);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java
index 00a5b5e8f8ad..cadf200c0410 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java
@@ -32,9 +32,6 @@ public class XLinkReadHandler extends AbstractXmlReadHandler
{
private String uri;
- private String type;
- private String show;
- private String actuate;
/**
* Starts parsing.
@@ -46,9 +43,6 @@ public class XLinkReadHandler extends AbstractXmlReadHandler
protected void startParsing(final Attributes attrs) throws SAXException
{
uri = attrs.getValue(OfficeNamespaces.XLINK_NS, "uri");
- type = attrs.getValue(OfficeNamespaces.XLINK_NS, "type");
- show = attrs.getValue(OfficeNamespaces.XLINK_NS, "show");
- actuate = attrs.getValue(OfficeNamespaces.XLINK_NS, "actuate");
}
/**
@@ -68,18 +62,4 @@ public class XLinkReadHandler extends AbstractXmlReadHandler
return uri;
}
- public String getType()
- {
- return type;
- }
-
- public String getShow()
- {
- return show;
- }
-
- public String getActuate()
- {
- return actuate;
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java
index c55cae1eefe0..edf6cb7c8df2 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java
@@ -52,26 +52,6 @@ public final class StyleMapperKey
this.hashCode = computeHashCode();
}
- public String getElementNamespace()
- {
- return elementNamespace;
- }
-
- public String getElementName()
- {
- return elementName;
- }
-
- public String getAttributeNamespace()
- {
- return attributeNamespace;
- }
-
- public String getAttributeName()
- {
- return attributeName;
- }
-
@Override
public boolean equals(final Object o)
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java
index fd1996866c32..af1b2b8fc544 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java
@@ -26,6 +26,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
*
* @since 12.03.2007
*/
+@SuppressWarnings("ucd")
public class StyleMapperXmlFactoryModule implements XmlFactoryModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java
index b3d28c5c5cae..426e2ff61da5 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java
@@ -27,6 +27,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory;
*
* @since 12.03.2007
*/
+@SuppressWarnings("ucd")
public class StyleMapperXmlResourceFactory extends AbstractXmlResourceFactory
{
diff --git a/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java b/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java
index 3eca2872be83..b1cd7634303a 100644
--- a/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java
+++ b/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java
@@ -33,11 +33,6 @@ public class DefaultParameterMap implements ParameterMap
backend = new HashMap<String,Object>();
}
- public void clear()
- {
- backend.clear();
- }
-
/**
* Retrieves the value stored for a key in this properties collection.
*
@@ -54,61 +49,9 @@ public class DefaultParameterMap implements ParameterMap
return backend.get(key);
}
- /**
- * Retrieves the value stored for a key in this properties collection, and returning the
- * default value if the key was not stored in this properties collection.
- *
- * @param key the property key.
- * @param defaultValue the default value to be returned when the key is not stored in
- * this properties collection.
- * @return The stored value, or the default value if the key does not exist in this
- * collection.
- */
- public Object get(final String key, final Object defaultValue)
- {
- if (key == null)
- {
- throw new NullPointerException("DefaultParameterMap.get (..): Parameter 'key' must not be null");
- }
- final Object o = this.backend.get(key);
- if (o == null)
- {
- return defaultValue;
- }
- return o;
- }
-
public String[] keys()
{
return this.backend.keySet().toArray(new String[backend.size()]);
}
- /**
- * Adds a property to this properties collection. If a property with the given name
- * exist, the property will be replaced with the new value. If the value is null, the
- * property will be removed.
- *
- * @param key the property key.
- * @param value the property value.
- */
- public void put(final String key, final Object value)
- {
- if (key == null)
- {
- throw new NullPointerException("ReportProperties.put (..): Parameter 'key' must not be null");
- }
- if (value == null)
- {
- this.backend.remove(key);
- }
- else
- {
- this.backend.put(key, value);
- }
- }
-
- public int size()
- {
- return this.backend.size();
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java b/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java
index 54dce8e6e039..b3e2e96c6488 100644
--- a/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java
+++ b/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java
@@ -17,14 +17,9 @@
*/
package org.libreoffice.report.util;
-import org.libreoffice.report.DataSourceFactory;
-import org.libreoffice.report.InputRepository;
-import org.libreoffice.report.JobDefinitionException;
import org.libreoffice.report.JobProperties;
-import org.libreoffice.report.OutputRepository;
import org.libreoffice.report.ParameterMap;
import org.libreoffice.report.ReportEngineMetaData;
-import org.libreoffice.report.ReportEngineParameterNames;
import org.libreoffice.report.ReportJobDefinition;
public class DefaultReportJobDefinition implements ReportJobDefinition
@@ -40,39 +35,6 @@ public class DefaultReportJobDefinition implements ReportJobDefinition
this.properties = new DefaultJobProperties(metaData);
}
- public void setDataSourceFactory(final DataSourceFactory dataSourceFactory)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY, dataSourceFactory);
- }
-
- public DataSourceFactory getDataSourceFactory()
- {
- return (DataSourceFactory) this.properties.getProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY);
- }
-
- public InputRepository getInputRepository()
- {
- return (InputRepository) this.properties.getProperty(ReportEngineParameterNames.INPUT_REPOSITORY);
- }
-
- public void setInputRepository(final InputRepository inputRepository)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.INPUT_REPOSITORY, inputRepository);
- }
-
- public OutputRepository getOutputRepository()
- {
- return (OutputRepository) this.properties.getProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY);
- }
-
- public void setOutputRepository(final OutputRepository outputRepository)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY, outputRepository);
- }
-
/**
* The parameters of the root report definition. The parameters for the subreports are
* defined using mappings, it would not make sense to define them here.
@@ -84,22 +46,6 @@ public class DefaultReportJobDefinition implements ReportJobDefinition
return parameters;
}
- public void setReportDefinitionName(final String reportDefinitionName)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.INPUT_NAME, reportDefinitionName);
- }
-
- /**
- * The name under which we can load the report definition.
- *
- * @return the report definition's name.
- */
- public String getReportDefinitionName()
- {
- return (String) this.properties.getProperty(ReportEngineParameterNames.INPUT_NAME);
- }
-
public JobProperties getProcessingParameters()
{
return properties;
diff --git a/reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java b/reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java
deleted file mode 100644
index 3be716971158..000000000000
--- a/reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java
+++ /dev/null
@@ -1,113 +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 org.libreoffice.report.util;
-
-import org.libreoffice.report.OutputRepository;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.jfree.report.JFreeReportBoot;
-
-import org.pentaho.reporting.libraries.xmlns.common.AttributeList;
-import org.pentaho.reporting.libraries.xmlns.writer.DefaultTagDescription;
-import org.pentaho.reporting.libraries.xmlns.writer.XmlWriter;
-import org.pentaho.reporting.libraries.xmlns.writer.XmlWriterSupport;
-
-
-/**
- * Creation-Date: 24.07.2007, 18:16:52
- *
- */
-public class ManifestWriter
-{
- // need this two strings other it breaks the ooo build :-(
-
- public static final String MANIFEST_NS = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
- public static final String TAG_DEF_PREFIX = "org.libreoffice.report.pentaho.output.";
- private final Map<String,String> entries;
-
- public ManifestWriter()
- {
- entries = new HashMap<String,String>();
- }
-
- public void addEntry(final String fullPath, final String mimeType)
- {
- if (fullPath == null)
- {
- throw new NullPointerException();
- }
- if (mimeType == null)
- {
- throw new NullPointerException();
- }
- if ("META-INF/manifest.xml".equals(fullPath))
- {
- return;
- }
- entries.put(fullPath, mimeType);
- }
-
- public boolean isEmpty()
- {
- return entries.isEmpty();
- }
-
- public void write(final OutputRepository outputRepository) throws IOException
- {
- if (isEmpty())
- {
- return;
- }
-
- final DefaultTagDescription tagDescription = new DefaultTagDescription();
- tagDescription.configure(JFreeReportBoot.getInstance().getGlobalConfig(),
- TAG_DEF_PREFIX);
-
- final OutputStream manifestOutputStream =
- outputRepository.createOutputStream("META-INF/manifest.xml", "text/xml");
-
- final OutputStreamWriter writer = new OutputStreamWriter(manifestOutputStream, "UTF-8");
- final XmlWriter xmlWriter = new XmlWriter(writer, tagDescription);
- xmlWriter.setAlwaysAddNamespace(true);
- xmlWriter.writeXmlDeclaration("UTF-8");
-
- final AttributeList rootAttributes = new AttributeList();
- rootAttributes.addNamespaceDeclaration("manifest", MANIFEST_NS);
- xmlWriter.writeTag(MANIFEST_NS, "manifest", rootAttributes, XmlWriterSupport.OPEN);
-
- final Iterator<Map.Entry<String,String>> iterator = entries.entrySet().iterator();
- while (iterator.hasNext())
- {
- final Map.Entry<String,String> entry = iterator.next();
- final AttributeList entryAttrs = new AttributeList();
- entryAttrs.setAttribute(MANIFEST_NS, "media-type", entry.getValue());
- entryAttrs.setAttribute(MANIFEST_NS, "full-path", entry.getKey());
- xmlWriter.writeTag(MANIFEST_NS, "file-entry", entryAttrs, XmlWriterSupport.CLOSE);
- }
-
- xmlWriter.writeCloseTag();
- xmlWriter.close();
- }
-}
diff --git a/svl/qa/complex/passwordcontainer/Test01.java b/svl/qa/complex/passwordcontainer/Test01.java
index d0e9dcc09e9e..094259b1bf85 100644
--- a/svl/qa/complex/passwordcontainer/Test01.java
+++ b/svl/qa/complex/passwordcontainer/Test01.java
@@ -28,7 +28,6 @@ import com.sun.star.uno.UnoRuntime;
public class Test01 implements PasswordContainerTest {
private XMultiServiceFactory m_xMSF = null;
- XPasswordContainer m_xPasswordContainer = null;
private TestHelper m_aTestHelper = null;
public Test01 ( XMultiServiceFactory xMSF )
diff --git a/svl/qa/complex/passwordcontainer/Test02.java b/svl/qa/complex/passwordcontainer/Test02.java
index 1296d77af678..caffd223ce5a 100644
--- a/svl/qa/complex/passwordcontainer/Test02.java
+++ b/svl/qa/complex/passwordcontainer/Test02.java
@@ -30,7 +30,6 @@ import com.sun.star.uno.UnoRuntime;
public class Test02 implements PasswordContainerTest {
private XMultiServiceFactory m_xMSF = null;
- XPasswordContainer m_xPasswordContainer = null;
private TestHelper m_aTestHelper = null;
public Test02 ( XMultiServiceFactory xMSF )
diff --git a/svl/qa/complex/passwordcontainer/Test03.java b/svl/qa/complex/passwordcontainer/Test03.java
index d9b3e3588b3e..fb49f4b99a0f 100644
--- a/svl/qa/complex/passwordcontainer/Test03.java
+++ b/svl/qa/complex/passwordcontainer/Test03.java
@@ -31,7 +31,6 @@ import com.sun.star.uno.UnoRuntime;
public class Test03 implements PasswordContainerTest {
private XMultiServiceFactory m_xMSF = null;
- XPasswordContainer m_xPasswordContainer = null;
private TestHelper m_aTestHelper = null;
public Test03 ( XMultiServiceFactory xMSF )
diff --git a/swext/mediawiki/src/com/sun/star/wiki/Settings.java b/swext/mediawiki/src/com/sun/star/wiki/Settings.java
index 9580f9ea4570..359f66e9dba4 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/Settings.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/Settings.java
@@ -41,7 +41,6 @@ public class Settings
private final XComponentContext m_xContext;
- private int lastUsedWikiServer = 0;
private final List<Map<String, String>> m_WikiConnections = new ArrayList<Map<String, String>>();
private final List<Map<String, Object>> m_aWikiDocs = new ArrayList<Map<String, Object>>();
@@ -66,11 +65,6 @@ public class Settings
}
- public List<Map<String, String>> getWikiCons()
- {
- return m_WikiConnections;
- }
-
private String getWikiConUrlByNumber( int num )
{
String url = "";
@@ -103,11 +97,6 @@ public class Settings
}
- public List<Map<String, Object>> getWikiDocs()
- {
- return m_aWikiDocs;
- }
-
public Object[] getWikiDocList( int serverid )
{
String wikiserverurl = getWikiConUrlByNumber( serverid );
@@ -125,14 +114,8 @@ public class Settings
return theDocs.toArray( docs );
}
- public int getLastUsedWikiServer()
- {
- return lastUsedWikiServer;
- }
-
public void setLastUsedWikiServer( int l )
{
- lastUsedWikiServer = l;
}
public String[] getWikiURLs()
diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java
index 5055285f7c0c..64dd66fcb71f 100644
--- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java
@@ -38,16 +38,8 @@ import com.sun.star.uno.UnoRuntime;
*/
public class _XAccessibleExtendedComponent {
- private static final String className =
- "com.sun.star.accessibility.XAccessibleExtendedComponent" ;
-
private final XAccessibleExtendedComponent oObj;
- // temporary while accessibility package is in com.sun.star
- protected String getTestedClassName() {
- return className;
- }
-
public _XAccessibleExtendedComponent(XInterface object/*, LogWriter log*/) {
oObj = UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, object);
}
diff --git a/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java b/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java
index 6ff0975de735..800727bb34d2 100644
--- a/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java
+++ b/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java
@@ -94,11 +94,6 @@ final public class GridDataListener implements XGridDataListener
return m_rowHeadingChangeEvent;
}
- public final boolean isDisposed()
- {
- return m_disposed;
- }
-
public final void reset()
{
m_rowInsertionEvent = m_rowRemovalEvent = m_dataChangeEvent = m_rowHeadingChangeEvent = null;
diff --git a/toolkit/test/accessibility/AccTreeNode.java b/toolkit/test/accessibility/AccTreeNode.java
index f728d8536869..aae3ed5758d4 100644
--- a/toolkit/test/accessibility/AccTreeNode.java
+++ b/toolkit/test/accessibility/AccTreeNode.java
@@ -23,7 +23,6 @@ import com.sun.star.accessibility.XAccessible;
import com.sun.star.accessibility.XAccessibleComponent;
import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.accessibility.XAccessibleEditableText;
-import com.sun.star.accessibility.XAccessibleExtendedComponent;
import com.sun.star.accessibility.XAccessibleSelection;
import com.sun.star.accessibility.XAccessibleTable;
import com.sun.star.accessibility.XAccessibleText;
@@ -52,24 +51,17 @@ class AccTreeNode
private ArrayList<HandlerDescriptor> maHandlers;
// The accessible context of this node.
- private XAccessible mxAccessible;
private XAccessibleContext mxContext;
private XAccessibleComponent mxComponent;
private XAccessibleText mxText;
private XAccessibleTable mxTable;
- public AccTreeNode (XAccessible xAccessible, XAccessibleContext xContext, AccessibleTreeNode aParent)
- {
- this (xAccessible, xContext, xContext, aParent);
- }
-
public AccTreeNode (XAccessible xAccessible, XAccessibleContext xContext, Object aDisplay, AccessibleTreeNode aParent)
{
super (aDisplay, aParent);
maHandlers = new ArrayList<HandlerDescriptor>(5);
mxContext = xContext;
- mxAccessible = xAccessible;
}
/** Update the internal data extracted from the corresponding accessible
@@ -102,17 +94,6 @@ class AccTreeNode
return mxComponent;
}
- public XAccessibleExtendedComponent getExtendedComponent ()
- {
- if (mxComponent == null)
- getComponent();
- if (mxComponent != null)
- return UnoRuntime.queryInterface(
- XAccessibleExtendedComponent.class, mxComponent);
- else
- return null;
- }
-
public XAccessibleText getText ()
{
if (mxText == null && mxContext != null)
@@ -136,14 +117,6 @@ class AccTreeNode
}
- public XAccessible getAccessible()
- {
- if ((mxAccessible == null) && (mxContext != null))
- mxAccessible = UnoRuntime.queryInterface(
- XAccessible.class, mxContext);
- return mxAccessible;
- }
-
public XAccessibleSelection getSelection ()
{
return UnoRuntime.queryInterface(
@@ -348,16 +321,6 @@ class AccTreeNode
return null;
}
- /** Update the specified handlers.
- @return
- The returned array contains the indices of the updated children
- and can be used to create a TreeModelEvent.
- */
- public java.util.List<Integer> updateChildren (java.lang.Class class1)
- {
- return updateChildren (class1, null);
- }
-
public java.util.List<Integer> updateChildren (java.lang.Class class1, java.lang.Class<AccessibleExtendedComponentHandler> class2)
{
ArrayList<Integer> aChildIndices = new ArrayList<Integer>();
diff --git a/toolkit/test/accessibility/AccessibilityTree.java b/toolkit/test/accessibility/AccessibilityTree.java
index 867fdbfa5ca0..d750bf75c811 100644
--- a/toolkit/test/accessibility/AccessibilityTree.java
+++ b/toolkit/test/accessibility/AccessibilityTree.java
@@ -204,11 +204,6 @@ public class AccessibilityTree
- public void disposing (com.sun.star.lang.EventObject e)
- {
- System.out.println ("disposing " + e);
- }
-
/*
public Dimension getPreferredSize ()
{
diff --git a/toolkit/test/accessibility/AccessibilityTreeModel.java b/toolkit/test/accessibility/AccessibilityTreeModel.java
index 4bf258ce7f55..bc6abf8457eb 100644
--- a/toolkit/test/accessibility/AccessibilityTreeModel.java
+++ b/toolkit/test/accessibility/AccessibilityTreeModel.java
@@ -71,21 +71,6 @@ public class AccessibilityTreeModel
}
-
-
- /** Inform all listeners (especially the renderer) of a change of the
- tree's structure.
- @param aNode This node specifies the sub tree in which all changes
- take place.
- */
- public void FireTreeStructureChanged (AccessibleTreeNode aNode)
- {
- }
-
-
-
-
-
@Override
public synchronized void setRoot (AccessibleTreeNode aRoot)
{
@@ -339,12 +324,6 @@ public class AccessibilityTreeModel
}
}
- protected TreeModelEvent createEvent (XAccessibleContext xParent)
- {
- AccessibleTreeNode aParentNode = maNodeMap.GetNode (xParent);
- return new TreeModelEvent (this, createPath (aParentNode));
- }
-
/** Create a TreeModelEvent object that informs listeners that one child
has been removed from or inserted into its parent.
*/
diff --git a/toolkit/test/accessibility/AccessibleCellHandler.java b/toolkit/test/accessibility/AccessibleCellHandler.java
index c52532d8555c..c251f679064c 100644
--- a/toolkit/test/accessibility/AccessibleCellHandler.java
+++ b/toolkit/test/accessibility/AccessibleCellHandler.java
@@ -53,12 +53,6 @@ class AccessibleCellHandler extends NodeHandler
maChildList.setSize (8);
}
- protected static XAccessibleTable getTable(Object aObject)
- {
- return UnoRuntime.queryInterface (
- XAccessibleTable.class, aObject);
- }
-
@Override
public AccessibleTreeNode createChild (AccessibleTreeNode aParent, int nIndex)
{
diff --git a/toolkit/test/accessibility/AccessibleContextHandler.java b/toolkit/test/accessibility/AccessibleContextHandler.java
index 9483c5c79b9a..3b3d351086c7 100644
--- a/toolkit/test/accessibility/AccessibleContextHandler.java
+++ b/toolkit/test/accessibility/AccessibleContextHandler.java
@@ -24,8 +24,6 @@ import tools.NameProvider;
class AccessibleContextHandler
extends NodeHandler
{
- protected int nChildrenCount;
-
@Override
public NodeHandler createHandler (XAccessibleContext xContext)
{
diff --git a/toolkit/test/accessibility/AccessibleEditableTextHandler.java b/toolkit/test/accessibility/AccessibleEditableTextHandler.java
index a31073b22af5..ae5df14618ec 100644
--- a/toolkit/test/accessibility/AccessibleEditableTextHandler.java
+++ b/toolkit/test/accessibility/AccessibleEditableTextHandler.java
@@ -45,12 +45,6 @@ class AccessibleEditableTextHandler extends NodeHandler
maChildList.setSize (1);
}
- protected static XAccessibleEditableText getEText (AccTreeNode aNode)
- {
- return UnoRuntime.queryInterface (
- XAccessibleEditableText.class, aNode.getContext());
- }
-
@Override
public AccessibleTreeNode createChild (AccessibleTreeNode aParent, int nIndex)
{
diff --git a/toolkit/test/accessibility/AccessibleHyperlinkHandler.java b/toolkit/test/accessibility/AccessibleHyperlinkHandler.java
index 9af7390e9749..41a161ac5a74 100644
--- a/toolkit/test/accessibility/AccessibleHyperlinkHandler.java
+++ b/toolkit/test/accessibility/AccessibleHyperlinkHandler.java
@@ -45,14 +45,6 @@ class AccessibleHyperlinkHandler extends AccessibleTreeHandler
maChildList.setSize (1);
}
- protected XAccessibleHyperlink getHyperlink(Object aObject)
- {
- XAccessibleHyperlink xHyperlink =
- UnoRuntime.queryInterface (
- XAccessibleHyperlink.class, aObject);
- return xHyperlink;
- }
-
@Override
public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex)
{
diff --git a/toolkit/test/accessibility/AccessibleHypertextHandler.java b/toolkit/test/accessibility/AccessibleHypertextHandler.java
index 7021c2abc77e..603d68997d87 100644
--- a/toolkit/test/accessibility/AccessibleHypertextHandler.java
+++ b/toolkit/test/accessibility/AccessibleHypertextHandler.java
@@ -45,14 +45,6 @@ class AccessibleHypertextHandler extends AccessibleTreeHandler
maChildList.setSize (1);
}
- protected static XAccessibleHypertext getHypertext (AccTreeNode aNode)
- {
- XAccessibleHypertext xHypertext =
- UnoRuntime.queryInterface (
- XAccessibleHypertext.class, aNode.getContext());
- return xHypertext;
- }
-
@Override
public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex)
{
diff --git a/toolkit/test/accessibility/AccessibleTableHandler.java b/toolkit/test/accessibility/AccessibleTableHandler.java
index 8697a52a0232..a72fe61a3587 100644
--- a/toolkit/test/accessibility/AccessibleTableHandler.java
+++ b/toolkit/test/accessibility/AccessibleTableHandler.java
@@ -45,12 +45,6 @@ class AccessibleTableHandler extends NodeHandler
maChildList.setSize (4);
}
- protected static XAccessibleTable getTable(Object aObject)
- {
- return UnoRuntime.queryInterface (
- XAccessibleTable.class, aObject);
- }
-
@Override
public AccessibleTreeNode createChild (AccessibleTreeNode aParent, int nIndex)
{
diff --git a/toolkit/test/accessibility/AccessibleTreeCellRenderer.java b/toolkit/test/accessibility/AccessibleTreeCellRenderer.java
deleted file mode 100644
index 3a1f7150b5e6..000000000000
--- a/toolkit/test/accessibility/AccessibleTreeCellRenderer.java
+++ /dev/null
@@ -1,108 +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 .
- */
-
-import java.awt.Color;
-import java.awt.Component;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JTree;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.TreePath;
-
-
-public class AccessibleTreeCellRenderer
- extends DefaultTreeCellRenderer
-{
- private Color
- maDefaultColor,
- maChangedColor;
- private ArrayList<Boolean>
- maChangedLines;
-
-
-
- public AccessibleTreeCellRenderer ()
- {
- maDefaultColor = Color.black;
- maChangedColor = Color.red;
- maChangedLines = new ArrayList<Boolean> ();
- }
-
- @Override
- public Component getTreeCellRendererComponent (
- JTree tree,
- Object value,
- boolean sel,
- boolean expanded,
- boolean leaf,
- int row,
- boolean hasFocus)
- {
- super.getTreeCellRendererComponent(
- tree, value, sel,
- expanded, leaf, row,
- hasFocus);
-
- if (maChangedLines.size()<=row || maChangedLines.get (row) == null)
- setTextNonSelectionColor (maDefaultColor);
- else
- setTextNonSelectionColor (maChangedColor);
-
- return this;
- }
-
- /** Tell the cell renderer that no changes shall be displayed anymore.
- */
- public void clearAllChanges ()
- {
- maChangedLines.clear();
- }
-
- /** Inform the cell renderer of a new changed line which to paint
- highlighted when asked to paint it the next time.
- */
- private void addChangedLine (int nRow)
- {
- while (maChangedLines.size() <= nRow) {
- maChangedLines.add(null);
- }
- nRow -= 1; // row index is one to large for some reason.
- maChangedLines.set (nRow, true);
- }
-
- /** Inform the cell renderer of a set of changed line which to paint
- highlighted when asked to paint them the next time.
- @param aChangedNodes
- The set of changed nodes. Each entry is a TreePath.
- @param aTree
- The JTree that is used to transform the given TreePath objects
- into rows.
- */
- public void addChangedNodes (List<TreePath> aChangedNodes, JTree aTree)
- {
- for (int i=0; i<aChangedNodes.size(); i++)
- {
- TreePath aPath = aChangedNodes.get (i);
- int nRow = aTree.getRowForPath (aPath);
- addChangedLine (nRow);
- }
- }
-
-}
-
diff --git a/toolkit/test/accessibility/AccessibleTreeNode.java b/toolkit/test/accessibility/AccessibleTreeNode.java
index 17b90b9dbcbd..951b86e8179c 100644
--- a/toolkit/test/accessibility/AccessibleTreeNode.java
+++ b/toolkit/test/accessibility/AccessibleTreeNode.java
@@ -47,11 +47,6 @@ class AccessibleTreeNode
return maParent;
}
- public Object getDisplayObject ()
- {
- return maDisplayObject;
- }
-
public int getChildCount ()
{
return 0;
diff --git a/toolkit/test/accessibility/CanvasShape.java b/toolkit/test/accessibility/CanvasShape.java
index aa1e47be4420..d16bc1406dd5 100644
--- a/toolkit/test/accessibility/CanvasShape.java
+++ b/toolkit/test/accessibility/CanvasShape.java
@@ -43,7 +43,6 @@ class CanvasShape
maSize = new Dimension (10,10);
maFgColor = java.awt.Color.black;
maBgColor = Color.blue;
- mnRole = -1;
mbHighlighted = false;
mbSelected = false;
mbFocused = false;
@@ -62,7 +61,6 @@ class CanvasShape
{
msName = mxContext.getAccessibleName();
msDescription = mxContext.getAccessibleDescription();
- mnRole = mxContext.getAccessibleRole();
// Extract the selected and focused flag.
XAccessibleStateSet xStateSet = mxContext.getAccessibleStateSet ();
@@ -257,41 +255,16 @@ class CanvasShape
mbHighlighted = false;
}
- public boolean isHighlighted ()
- {
- return mbHighlighted;
- }
-
public Rectangle getBBox ()
{
return new Rectangle (maPosition, maSize);
}
- public Point getOrigin ()
- {
- return maPosition;
- }
-
public TreePath getPath ()
{
return new TreePath (maNode.createPath());
}
- public int getRole ()
- {
- return mnRole;
- }
-
- public XAccessibleContext getContext ()
- {
- return mxContext;
- }
-
- public XAccessibleComponent getComponent ()
- {
- return mxComponent;
- }
-
@Override
public String toString ()
{
@@ -314,5 +287,4 @@ class CanvasShape
mbSelected,
// Set when the accessible object is focused.
mbFocused;
- private int mnRole;
}
diff --git a/toolkit/test/accessibility/EventLogger.java b/toolkit/test/accessibility/EventLogger.java
deleted file mode 100644
index b6be2264a2f2..000000000000
--- a/toolkit/test/accessibility/EventLogger.java
+++ /dev/null
@@ -1,47 +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 .
- */
-
-import javax.swing.JFrame;
-import javax.swing.JScrollPane;
-
-class EventLogger
-{
- public static synchronized EventLogger Instance ()
- {
- if (maInstance == null)
- maInstance = new EventLogger();
- return maInstance;
- }
-
- private EventLogger ()
- {
- try
- {
- JFrame aFrame = new JFrame ();
- TextLogger aLogger = new TextLogger ();
- aFrame.setContentPane (new JScrollPane (aLogger));
-
- aFrame.setSize (400,300);
- aFrame.setVisible (true);
- }
- catch (Exception e)
- {}
- }
-
- private static EventLogger maInstance = null;
-}
diff --git a/toolkit/test/accessibility/FrameActionListener.java b/toolkit/test/accessibility/FrameActionListener.java
deleted file mode 100644
index 55b734eabed3..000000000000
--- a/toolkit/test/accessibility/FrameActionListener.java
+++ /dev/null
@@ -1,32 +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 .
- */
-
-import com.sun.star.frame.XFrameActionListener;
-
-public class FrameActionListener
- implements XFrameActionListener
-{
- public void frameAction (com.sun.star.frame.FrameActionEvent aEvent)
- {
- System.out.println ("frame action");
- }
-
- public void disposing (com.sun.star.lang.EventObject aEvent)
- {
- }
-}
diff --git a/toolkit/test/accessibility/HelpWindow.java b/toolkit/test/accessibility/HelpWindow.java
index 171931eee6d8..00c93406766f 100644
--- a/toolkit/test/accessibility/HelpWindow.java
+++ b/toolkit/test/accessibility/HelpWindow.java
@@ -54,20 +54,6 @@ class HelpWindow
e.printStackTrace (System.err);
}
}
- public void loadURL (String sURL)
- {
- try
- {
- loadURL (new URL (sURL));
- }
- catch (MalformedURLException e)
- {
- e.printStackTrace (System.err);
- }
- }
-
-
-
private void loadURL (URL aURL)
{
diff --git a/toolkit/test/accessibility/InformationWriter.java b/toolkit/test/accessibility/InformationWriter.java
deleted file mode 100644
index 6642a8fb9981..000000000000
--- a/toolkit/test/accessibility/InformationWriter.java
+++ /dev/null
@@ -1,406 +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 .
- */
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
-
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XServiceName;
-import com.sun.star.lang.XTypeProvider;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.Type;
-
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapeDescriptor;
-
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.accessibility.XAccessibleComponent;
-import com.sun.star.accessibility.XAccessibleRelationSet;
-import com.sun.star.accessibility.XAccessibleStateSet;
-
-public class InformationWriter
-{
- public void drawPageTest (XInterface xPage)
- {
- try
- {
- printProperty (xPage, "BorderBottom ", "BorderBottom");
- printProperty (xPage, "BorderLeft ", "BorderLeft");
- printProperty (xPage, "BorderRight ", "BorderRight");
- printProperty (xPage, "BorderTop ", "BorderTop");
- printProperty (xPage, "Height ", "Height");
- printProperty (xPage, "Width ", "Width");
- printProperty (xPage, "Number ", "Number");
- }
- catch (Exception e)
- {
- System.out.println ("caught exception while testing draw page:" + e);
- }
- }
-
- private void printProperty (XInterface xObject, String prefix, String name)
- {
- try
- {
- XPropertySet xPropertySet = UnoRuntime.queryInterface(
- XPropertySet.class, xObject);
- MessageArea.println (prefix +
- xPropertySet.getPropertyValue (name));
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception while getting property "
- + name + " : " + e);
- }
- }
-
-
-
- public void showShapes (XDrawPage xPage)
- {
- try
- {
- XIndexAccess xShapeList = UnoRuntime.queryInterface(
- XIndexAccess.class, xPage);
-
- MessageArea.println ("There are " + xShapeList.getCount()
- + " shapes");
- for (int i=0; i<xShapeList.getCount(); i++)
- {
- XShape xShape = UnoRuntime.queryInterface(
- XShape.class, xShapeList.getByIndex (i));
-
- XShapeDescriptor xShapeDescriptor =
- UnoRuntime.queryInterface(
- XShapeDescriptor.class, xShape);
- String sName = xShapeDescriptor.getShapeType ();
- MessageArea.println (" shape " + i + " : " + sName);
-
- XPropertySet xPropertySet =
- UnoRuntime.queryInterface(
- XPropertySet.class, xShape);
- Integer nZOrder =
- (Integer) xPropertySet.getPropertyValue ("ZOrder");
- MessageArea.println (" zorder = " + nZOrder);
- }
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception in showShapes: " + e);
- }
- }
-
-
-
-
- /** @descr Print all available services of the given object to the
- standard output.
- */
- public void showServices (XInterface xObject)
- {
- try
- {
- MessageArea.println ("Services:");
- XMultiServiceFactory xMSF = UnoRuntime.queryInterface (
- XMultiServiceFactory.class,
- xObject
- );
- if (xMSF == null)
- MessageArea.println (" object does not support interface XMultiServiceFactory");
- else
- {
- String[] sServiceNames = xMSF.getAvailableServiceNames ();
- MessageArea.println (" object can create "
- + sServiceNames.length + " services");
- for (int i=0; i<sServiceNames.length; i++)
- MessageArea.println (" service " + i + " : " + sServiceNames[i]);
- }
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception in showServices : " + e);
- }
- }
-
- /** @descr Print the service and implementation name of the given
- object.
- */
- public void showInfo (XInterface xObject)
- {
- try
- {
- System.out.println ("Info:");
- // Use interface XServiceName to retrieve name of (main) service.
- XServiceName xSN = UnoRuntime.queryInterface (
- XServiceName.class, xObject);
- if (xSN == null)
- MessageArea.println (" interface XServiceName not supported");
- else
- {
- MessageArea.println (" Service name : " + xSN.getServiceName ());
- }
-
- // Use interface XServiceInfo to retrieve information about
- // supported services.
- XServiceInfo xSI = UnoRuntime.queryInterface (
- XServiceInfo.class, xObject);
- if (xSI == null)
- MessageArea.println (" interface XServiceInfo not supported");
- else
- {
- MessageArea.println (" Implementation name : "
- + xSI.getImplementationName ());
- }
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception in showInfo : " + e);
- }
- }
-
-
-
-
- /** @descr Print information about supported interfaces.
- */
- public void showInterfaces (XInterface xObject)
- {
- try
- {
- MessageArea.println ("Interfaces:");
- // Use interface XTypeProvider to retrieve a list of supported
- // interfaces.
- XTypeProvider xTP = UnoRuntime.queryInterface (
- XTypeProvider.class, xObject);
- if (xTP == null)
- MessageArea.println (" interface XTypeProvider not supported");
- else
- {
- Type[] aTypeList = xTP.getTypes ();
- MessageArea.println (" object supports " + aTypeList.length
- + " interfaces");
- for (int i=0; i<aTypeList.length; i++)
- MessageArea.println (" " + i + " : "
- + aTypeList[i].getTypeName());
- }
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception in showInterfaces : " + e);
- }
- }
-
-
- /** @descr Print information concerning the accessibility of the given
- object.
- */
- private boolean showAccessibility (XInterface xObject, int depth)
- {
- try
- {
- // Create indentation string.
- String sIndent = "";
- while (depth-- > 0) {
- sIndent += " ";
- }
-
- // Get XAccessibleContext object if given object does not
- // already support this interface.
- XAccessibleContext xContext
- = UnoRuntime.queryInterface (
- XAccessibleContext.class, xObject);
- if (xContext == null)
- {
- XAccessible xAccessible
- = UnoRuntime.queryInterface (
- XAccessible.class, xObject);
- if (xAccessible == null)
- {
- MessageArea.println (sIndent + "given object " + xObject
- + " is not accessible");
- return false;
- }
- else
- xContext = xAccessible.getAccessibleContext();
- }
-
- // Print information about the accessible context.
- if (xContext != null)
- {
- MessageArea.println (sIndent + "Name : "
- + xContext.getAccessibleName());
- MessageArea.println (sIndent + "Description : "
- + xContext.getAccessibleDescription());
- MessageArea.println (sIndent + "Role : "
- + xContext.getAccessibleRole());
- if (xContext.getAccessibleParent() != null)
- {
- MessageArea.println (sIndent + "Has parent : yes");
- MessageArea.println (sIndent + "Parent index : "
- + xContext.getAccessibleIndexInParent());
- }
- else
- MessageArea.println (sIndent + "Has parent : no");
- MessageArea.println (sIndent + "Child count : "
- + xContext.getAccessibleChildCount());
- MessageArea.print (sIndent + "Relation set : ");
- XAccessibleRelationSet xRelationSet
- = xContext.getAccessibleRelationSet();
- if (xRelationSet != null)
- {
- MessageArea.print (xRelationSet.getRelationCount() + " (");
- for (int i=0; i<xRelationSet.getRelationCount(); i++)
- {
- if (i > 0)
- MessageArea.print (", ");
- MessageArea.print (xRelationSet.getRelation(i).toString());
- }
- MessageArea.println (")");
- }
- else
- MessageArea.println ("no relation set");
-
- MessageArea.print (sIndent + "State set : ");
- XAccessibleStateSet xStateSet =
- xContext.getAccessibleStateSet();
- if (xStateSet != null)
- {
- XIndexAccess xStates =
- UnoRuntime.queryInterface (
- XIndexAccess.class, xStateSet);
- MessageArea.print (xStates.getCount() + " (");
- for (int i=0; i<xStates.getCount(); i++)
- {
- if (i > 0)
- MessageArea.print (", ");
- MessageArea.print (xStates.getByIndex(i).toString());
- }
- MessageArea.println (")");
- }
- else
- MessageArea.println ("no state set");
-
- showAccessibleComponent (xContext, sIndent);
- }
- else
- MessageArea.println ("object has no accessible context.");
-
- }
- catch (Exception e)
- {
- System.out.println ("caught exception in showAccessibility :" + e);
- }
- return true;
- }
-
-
-
-
- /** @descr Print information about the given accessible component.
- */
- private void showAccessibleComponent (XInterface xObject, String sIndent)
- {
- try
- {
- XAccessibleComponent xComponent =
- UnoRuntime.queryInterface (
- XAccessibleComponent.class, xObject);
-
- // Print information about the accessible context.
- if (xComponent != null)
- {
- MessageArea.println (sIndent + "Position : "
- + xComponent.getLocation().X+", "
- + xComponent.getLocation().Y);
- MessageArea.println (sIndent + "Screen position : "
- + xComponent.getLocationOnScreen().X+", "
- + xComponent.getLocationOnScreen().Y);
- MessageArea.println (sIndent + "Size : "
- + xComponent.getSize().Width+", "
- + xComponent.getSize().Height);
- }
- }
- catch (Exception e)
- {
- System.out.println (
- "caught exception in showAccessibleComponent : " + e);
- }
- }
-
-
- /** Show a textual representation of the accessibility subtree rooted in
- xRoot.
- */
- public boolean showAccessibilityTree (XAccessible xRoot, int depth)
- {
- try
- {
- if ( ! showAccessibility (xRoot, depth))
- return false;
-
- String sIndent = "";
- for (int i=0; i<depth; i++)
- sIndent += " ";
-
- // Iterate over children and show them.
- XAccessibleContext xContext = xRoot.getAccessibleContext();
- if (xContext != null)
- {
- int n = xContext.getAccessibleChildCount();
- for (int i=0; i<n; i++)
- {
- MessageArea.println (sIndent + "child " + i + " :");
- showAccessibilityTree (xContext.getAccessibleChild(i),depth+1);
- }
- }
- else
- MessageArea.println ("Accessible object has no context");
- }
- catch (Exception e)
- {
- System.out.println (
- "caught exception in showAccessibleTree : " + e);
- return false;
- }
-
- return true;
- }
-
- public void showProperties (XInterface xObject)
- {
- XPropertySet xSet = UnoRuntime.queryInterface (
- XPropertySet.class, xObject);
- if (xSet == null)
- MessageArea.println ("object does not support XPropertySet");
- else
- {
- XPropertySetInfo xInfo = xSet.getPropertySetInfo ();
- Property[] aProperties = xInfo.getProperties ();
- int n = aProperties.length;
- for (int i=0; i<n; i++)
- MessageArea.println (i + " : " + aProperties[i].Name +", " + aProperties[i].Type);
- }
- }
-}
diff --git a/toolkit/test/accessibility/MessageArea.java b/toolkit/test/accessibility/MessageArea.java
index 8ee0b98e6ccc..512cfaf73397 100644
--- a/toolkit/test/accessibility/MessageArea.java
+++ b/toolkit/test/accessibility/MessageArea.java
@@ -61,17 +61,6 @@ public class MessageArea
/** Show the given string at the end of the message area and scroll to make
- it visible.
- */
- public static synchronized void print (String aMessage)
- {
- print (0, aMessage);
- }
-
-
-
-
- /** Show the given string at the end of the message area and scroll to make
it visible. Indent the string as requested.
*/
private static synchronized void print (int nIndentation, String aMessage)
diff --git a/toolkit/test/accessibility/NodeHandler.java b/toolkit/test/accessibility/NodeHandler.java
index a172be7773b6..69cff2c13edf 100644
--- a/toolkit/test/accessibility/NodeHandler.java
+++ b/toolkit/test/accessibility/NodeHandler.java
@@ -37,16 +37,6 @@ abstract class NodeHandler
maChildList = new Vector<AccessibleTreeNode> ();
}
- /** Clear the cache of child objects.
- */
- public void clear ()
- {
- synchronized (maChildList)
- {
- maChildList.clear();
- }
- }
-
/** return the number of children this object has */
public int getChildCount()
{
diff --git a/toolkit/test/accessibility/NodeMap.java b/toolkit/test/accessibility/NodeMap.java
index aaf4baafff02..b8e8b3bf3300 100644
--- a/toolkit/test/accessibility/NodeMap.java
+++ b/toolkit/test/accessibility/NodeMap.java
@@ -106,19 +106,6 @@ class NodeMap
return null;
}
- XAccessibleContext GetAccessible (AccessibleTreeNode aNode)
- {
- if ((aNode != null) && (aNode instanceof AccTreeNode))
- return ((AccTreeNode)aNode).getContext();
- else
- return null;
- }
-
- boolean IsMember (XAccessibleContext xContext)
- {
- return maXAccessibleToNode.containsKey(xContext);
- }
-
boolean ValueIsMember (AccessibleTreeNode aNode)
{
return maXAccessibleToNode.containsValue(aNode);
diff --git a/toolkit/test/accessibility/OfficeConnection.java b/toolkit/test/accessibility/OfficeConnection.java
index eb43847f95db..4ecb98ba0b47 100644
--- a/toolkit/test/accessibility/OfficeConnection.java
+++ b/toolkit/test/accessibility/OfficeConnection.java
@@ -43,14 +43,6 @@ public class OfficeConnection
return maServiceManager;
}
- /** @descr Return a flag that indicates if the constructor has been able to
- establish a valid connection.
- */
- public boolean connectionIsValid ()
- {
- return getServiceManager() != null;
- }
-
/** @descr Connect to an already running LibreOffice application.
*/
private void connect ()
diff --git a/toolkit/test/accessibility/Options.java b/toolkit/test/accessibility/Options.java
index 3b9e5372c160..bbe7d608a7d3 100644
--- a/toolkit/test/accessibility/Options.java
+++ b/toolkit/test/accessibility/Options.java
@@ -34,16 +34,6 @@ class Options
return saOptions;
}
- static public void SetString (String sName, String sValue)
- {
- Instance().setProperty (sName, sValue);
- }
-
- static public String GetString (String sName)
- {
- return Instance().getProperty (sName);
- }
-
static public void SetBoolean (String sName, boolean bValue)
{
Instance().setProperty (sName, Boolean.toString(bValue));
diff --git a/toolkit/test/accessibility/SimpleOffice.java b/toolkit/test/accessibility/SimpleOffice.java
index e588e5b9e2fd..ecb16a6e3877 100644
--- a/toolkit/test/accessibility/SimpleOffice.java
+++ b/toolkit/test/accessibility/SimpleOffice.java
@@ -16,30 +16,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-import com.sun.star.awt.XWindow;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.container.XEnumerationAccess;
-import com.sun.star.container.XEnumeration;
-
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XController;
import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XTasksSupplier;
-import com.sun.star.frame.XTask;
-
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
-import com.sun.star.drawing.XDrawView;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XShape;
import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.awt.XExtendedToolkit;
@@ -66,80 +47,15 @@ public class SimpleOffice
getDesktop ();
}
- public XModel loadDocument (String URL)
- {
- XModel xModel = null;
- try
- {
- // Load the document from the specified URL.
- XComponentLoader xLoader =
- UnoRuntime.queryInterface(
- XComponentLoader.class, mxDesktop);
- XComponent xComponent = xLoader.loadComponentFromURL (
- URL,
- "_blank",
- 0,
- new PropertyValue[0]
- );
- xModel = UnoRuntime.queryInterface(
- XModel.class, xComponent);
- }
- catch (NullPointerException e)
- {
- MessageArea.println ("caught exception while loading "
- + URL + " : " + e);
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception while loading "
- + URL + " : " + e);
- }
- return xModel;
- }
- public XModel getModel (String name)
- {
- XModel xModel = null;
- try
- {
- XTasksSupplier xTasksSupplier =
- UnoRuntime.queryInterface(
- XTasksSupplier.class, mxDesktop);
- XEnumerationAccess xEA = xTasksSupplier.getTasks();
- XEnumeration xE = xEA.createEnumeration();
- while (xE.hasMoreElements())
- {
- XTask xTask = UnoRuntime.queryInterface(
- XTask.class, xE.nextElement());
- MessageArea.print (xTask.getName());
- }
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception while getting Model " + name
- + ": " + e);
- }
- return xModel;
- }
- public XModel getModel (XDrawView xView)
- {
- XController xController = UnoRuntime.queryInterface(
- XController.class, xView);
- if (xController != null)
- return xController.getModel();
- else
- {
- MessageArea.println ("can't cast view to controller");
- return null;
- }
- }
+
public XDesktop getDesktop ()
{
@@ -218,171 +134,6 @@ public class SimpleOffice
return xAccessible;
}
- /** Return the root object of the accessibility hierarchy.
- */
- public XAccessible getAccessibleRoot (XAccessible xAccessible)
- {
- try
- {
- XAccessible xParent = null;
- do
- {
- XAccessibleContext xContext = xAccessible.getAccessibleContext();
- if (xContext != null)
- xParent = xContext.getAccessibleParent();
- if (xParent != null)
- xAccessible = xParent;
- }
- while (xParent != null);
- }
- catch (Exception e)
- {
- MessageArea.println (
- "caught exception while getting accessible root" + e);
- e.printStackTrace();
- }
- return xAccessible;
- }
-
-
-
-
- /** @descr Return the current window associated with the given
- model.
- */
- public XWindow getCurrentWindow ()
- {
- return getCurrentWindow (UnoRuntime.queryInterface(
- XModel.class, getDesktop()));
- }
-
-
-
-
-
- private XWindow getCurrentWindow (XModel xModel)
- {
- XWindow xWindow = null;
- try
- {
- if (xModel == null)
- MessageArea.println ("invalid model (==null)");
- XController xController = xModel.getCurrentController();
- if (xController == null)
- MessageArea.println ("can't get controller from model");
- XFrame xFrame = xController.getFrame();
- if (xFrame == null)
- MessageArea.println ("can't get frame from controller");
- xWindow = xFrame.getComponentWindow ();
- if (xWindow == null)
- MessageArea.println ("can't get window from frame");
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception while getting current window" + e);
- }
-
- return xWindow;
- }
-
-
- /** @descr Return the current draw page of the given desktop.
- */
- public XDrawPage getCurrentDrawPage ()
- {
- return getCurrentDrawPage (UnoRuntime.queryInterface(
- XDrawView.class, getCurrentView()));
- }
-
-
-
-
- private XDrawPage getCurrentDrawPage (XDrawView xView)
- {
- XDrawPage xPage = null;
- try
- {
- if (xView == null)
- MessageArea.println ("can't get current draw page from null view");
- else
- xPage = xView.getCurrentPage();
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception while getting current draw page : " + e);
- }
-
- return xPage;
- }
-
-
- /** @descr Return the current view of the given desktop.
- */
- private XDrawView getCurrentView ()
- {
- return getCurrentView (getDesktop());
- }
-
- private XDrawView getCurrentView (XDesktop xDesktop)
- {
- if (xDesktop == null)
- MessageArea.println ("can't get desktop to retrieve current view");
-
- XDrawView xView = null;
- try
- {
- XComponent xComponent = xDesktop.getCurrentComponent();
- if (xComponent == null)
- MessageArea.println ("can't get component to retrieve current view");
-
- XFrame xFrame = xDesktop.getCurrentFrame();
- if (xFrame == null)
- MessageArea.println ("can't get frame to retrieve current view");
-
- XController xController = xFrame.getController();
- if (xController == null)
- MessageArea.println ("can't get controller to retrieve current view");
-
- xView = UnoRuntime.queryInterface(
- XDrawView.class, xController);
- if (xView == null)
- MessageArea.println ("could not cast controller into view");
- }
- catch (Exception e)
- {
- MessageArea.println ("caught exception while getting current view : " + e);
- }
-
- return xView;
- }
-
-
-
-
- // Return the accessible object of the document window.
- public static XAccessible getAccessibleDocumentWindow (XDrawPage xPage)
- {
- XIndexAccess xShapeList = UnoRuntime.queryInterface(
- XIndexAccess.class, xPage);
- if (xShapeList.getCount() > 0)
- {
- // All shapes return as accessible object the document window's
- // accessible object. This is, of course, a hack and will be
- // removed as soon as the missing infrastructure for obtaining
- // the object directly is implemented.
- XShape xShape = null;
- try{
- xShape = UnoRuntime.queryInterface(
- XShape.class, xShapeList.getByIndex (0));
- } catch (Exception e)
- {}
- XAccessible xAccessible = UnoRuntime.queryInterface (
- XAccessible.class, xShape);
- return xAccessible;
- }
- else
- return null;
- }
}
diff --git a/toolkit/test/accessibility/TextLogger.java b/toolkit/test/accessibility/TextLogger.java
deleted file mode 100644
index 952d14015973..000000000000
--- a/toolkit/test/accessibility/TextLogger.java
+++ /dev/null
@@ -1,59 +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 .
- */
-
-import javax.swing.JEditorPane;
-import javax.swing.event.HyperlinkListener;
-import javax.swing.event.HyperlinkEvent;
-
-class TextLogger
- extends JEditorPane
-{
- public TextLogger ()
- throws java.io.IOException
- {
- super ("http://localhost");
-
- setEditable (false);
- final JEditorPane finalPane = this;
- addHyperlinkListener (new HyperlinkListener()
- {
- public void hyperlinkUpdate (HyperlinkEvent e)
- {
- try
- {
- if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
- finalPane.setPage (e.getURL());
- }
- catch (java.io.IOException ex)
- {
- ex.printStackTrace(System.err);
- }
- }
- });
- }
-
- public void appendText (String sText)
- {
- try
- {
- getDocument().insertString (getDocument().getLength(), sText, null);
- }
- catch (javax.swing.text.BadLocationException e)
- {}
- }
-}
diff --git a/toolkit/test/accessibility/TextUpdateListener.java b/toolkit/test/accessibility/TextUpdateListener.java
deleted file mode 100644
index ef590f1a7106..000000000000
--- a/toolkit/test/accessibility/TextUpdateListener.java
+++ /dev/null
@@ -1,144 +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 .
- */
-
-import com.sun.star.accessibility.*;
-import com.sun.star.uno.UnoRuntime;
-
-import javax.swing.tree.*;
-import javax.swing.event.*;
-
-/** listen to tree model changes in order to update XAccessibleText objects
-*/
-class TextUpdateListener implements TreeModelListener
-{
- public void treeNodesChanged(TreeModelEvent e)
- {
- try {
- // if the change is to the first child of a DefaultMutableTreeNode
- // with an XAccessibleText child, then we call updateText
- int[] aIndices = e.getChildIndices();
- if (aIndices == null || aIndices.length >= 0) {
- return;
- }
- // we have a parent... lets check for XAccessibleText then
- DefaultMutableTreeNode aParent = (DefaultMutableTreeNode) (e
- .getTreePath().getLastPathComponent());
- DefaultMutableTreeNode aNode = (DefaultMutableTreeNode) (aParent
- .getChildAt(aIndices[0]));
- if (aParent.getUserObject() instanceof XAccessibleText) {
- // aha! we have an xText. So we can now check for
- // the various cases we support
- XAccessibleText xText = (XAccessibleText) aParent
- .getUserObject();
-
- if (aIndices[0] == 0) {
- // first child! Then we call updateText
- updateText(xText, aNode.toString());
- }
- }
- } catch (com.sun.star.lang.IndexOutOfBoundsException aException) {
- }
- }
-
- // don't care:
- public void treeNodesInserted(TreeModelEvent e) { }
- public void treeNodesRemoved(TreeModelEvent e) { }
- public void treeStructureChanged(TreeModelEvent e) { }
-
- /** update the text */
- boolean updateText( XAccessibleText xText, String sNew )
- throws com.sun.star.lang.IndexOutOfBoundsException
- {
- // is this text editable? if not, fudge you and return
- XAccessibleEditableText xEdit =
- UnoRuntime.queryInterface (
- XAccessibleEditableText.class, xText);
- if (xEdit == null)
- return false;
-
- String sOld = xText.getText();
-
- // false alarm? Early out if no change was done!
- if( sOld.equals( sNew ) )
- return false;
-
- // get the minimum length of both strings
- int nMinLength = sOld.length();
- if( sNew.length() < nMinLength )
- nMinLength = sNew.length();
-
- // count equal characters from front and end
- int nFront = 0;
- while( (nFront < nMinLength) &&
- (sNew.charAt(nFront) == sOld.charAt(nFront)) ) {
- nFront++;
- }
- int nBack = 0;
- while( (nBack < nMinLength) &&
- ( sNew.charAt(sNew.length()-nBack-1) ==
- sOld.charAt(sOld.length()-nBack-1) ) ) {
- nBack++;
- }
- if( nFront + nBack > nMinLength )
- nBack = nMinLength - nFront;
-
- // so... the first nFront and the last nBack characters
- // are the same. Change the others!
- String sDel = sOld.substring( nFront, sOld.length() - nBack );
- String sIns = sNew.substring( nFront, sNew.length() - nBack );
-
- System.out.println("edit text: " +
- sOld.substring(0, nFront) +
- " [ " + sDel + " -> " + sIns + " ] " +
- sOld.substring(sOld.length() - nBack) );
-
- boolean bRet = false;
- try
- {
- // edit the text, and use
- // (set|insert|delete|replace)Text as needed
- if( nFront+nBack == 0 )
- bRet = xEdit.setText( sIns );
- else if( sDel.length() == 0 )
- bRet = xEdit.insertText( sIns, nFront );
- else if( sIns.length() == 0 )
- bRet = xEdit.deleteText( nFront, sOld.length()-nBack );
- else
- bRet = xEdit.replaceText(nFront, sOld.length()-nBack,sIns);
- }
- catch( IndexOutOfBoundsException e )
- {
- bRet = false;
- }
-
- return bRet;
- }
-
- boolean setSelection( XAccessibleText xText, int p1, int p2 )
- {
- try
- {
- return xText.setSelection( p1, p2 );
- }
- catch( com.sun.star.lang.IndexOutOfBoundsException f )
- {
- return false;
- }
- }
-
-}
diff --git a/toolkit/test/accessibility/ov/SelectionView.java b/toolkit/test/accessibility/ov/SelectionView.java
deleted file mode 100644
index 0d84579eb844..000000000000
--- a/toolkit/test/accessibility/ov/SelectionView.java
+++ /dev/null
@@ -1,244 +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 ov;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-
-import java.awt.Dimension;
-import java.awt.GridBagLayout;
-import java.awt.GridBagConstraints;
-
-import javax.swing.BoxLayout;
-import javax.swing.ButtonGroup;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JScrollPane;
-import javax.swing.JToggleButton;
-import com.sun.star.accessibility.AccessibleEventId;
-import com.sun.star.accessibility.AccessibleEventObject;
-import com.sun.star.accessibility.AccessibleStateType;
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.accessibility.XAccessibleSelection;
-import com.sun.star.accessibility.XAccessibleStateSet;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.IndexOutOfBoundsException;
-
-
-/** Display a list of children and select/deselect buttons
-*/
-class SelectionView
- extends ListeningObjectView
- implements ActionListener
-{
- static public ObjectView Create (
- ObjectViewContainer aContainer,
- XAccessibleContext xContext)
- {
- XAccessibleSelection xSelection = UnoRuntime.queryInterface(
- XAccessibleSelection.class, xContext);
- if (xSelection != null)
- return new SelectionView(aContainer);
- else
- return null;
- }
-
- public SelectionView (ObjectViewContainer aContainer)
- {
- super (aContainer);
- Layout();
- }
-
- @Override
- public String GetTitle ()
- {
- return "Selection";
- }
-
- /** Create and arrange the widgets for this view.
- */
- private void Layout ()
- {
- setLayout (new GridBagLayout());
-
- GridBagConstraints aConstraints = new GridBagConstraints();
-
- // Label that shows wheter the selection is multi selectable.
- aConstraints.gridx = 0;
- aConstraints.gridy = 0;
- aConstraints.anchor = GridBagConstraints.WEST;
- maTypeLabel = new JLabel ();
- add (maTypeLabel, aConstraints);
-
- // the JListBox
- maChildrenSelector = new JPanel ();
- maChildrenSelector.setPreferredSize (new Dimension (100,100));
- maChildrenSelector.setLayout (new BoxLayout (maChildrenSelector, BoxLayout.Y_AXIS));
-
- aConstraints.gridx = 0;
- aConstraints.gridwidth = 4;
- aConstraints.gridy = 1;
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
- add (new JScrollPane (maChildrenSelector,
- JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
- JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),
- aConstraints);
-
- JButton aButton;
- aButton = new JButton( "Select all" );
- aButton.setActionCommand( "Select all" );
- aButton.addActionListener( this );
- aConstraints.gridx = 0;
- aConstraints.gridwidth = 1;
- aConstraints.gridy = 2;
- aConstraints.fill = GridBagConstraints.NONE;
- aConstraints.anchor = GridBagConstraints.WEST;
- add (aButton, aConstraints);
-
- aButton = new JButton( "Clear Selection" );
- aButton.setActionCommand( "Clear Selection" );
- aButton.addActionListener( this );
- aConstraints.gridx = 1;
- aConstraints.gridy = 2;
- aConstraints.weightx = 1;
- add (aButton, aConstraints);
-
- setSize (getPreferredSize());
- }
-
-
- @Override
- public void SetObject (XAccessibleContext xContext)
- {
- mxSelection = UnoRuntime.queryInterface(
- XAccessibleSelection.class, xContext);
- super.SetObject (xContext);
- }
-
-
- @Override
- public void Update ()
- {
- maChildrenSelector.removeAll ();
-
- // Determine whether multi selection is possible.
- XAccessibleStateSet aStateSet = mxContext.getAccessibleStateSet();
- boolean bMultiSelectable = false;
- ButtonGroup aButtonGroup = null;
- if (aStateSet!=null && aStateSet.contains(AccessibleStateType.MULTI_SELECTABLE))
- {
- bMultiSelectable = true;
- maTypeLabel.setText ("multi selectable");
- }
- else
- {
- maTypeLabel.setText ("single selectable");
- aButtonGroup = new ButtonGroup ();
- }
-
- int nCount = mxContext.getAccessibleChildCount();
- for (int i=0; i<nCount; i++)
- {
- try
- {
- XAccessible xChild = mxContext.getAccessibleChild(i);
- XAccessibleContext xChildContext = xChild.getAccessibleContext();
-
- String sName = i + " " + xChildContext.getAccessibleName();
- JToggleButton aChild;
- if (bMultiSelectable)
- aChild = new JCheckBox (sName);
- else
- {
- aChild = new JRadioButton (sName);
- aButtonGroup.add (aChild);
- }
-
- XAccessibleStateSet aChildStateSet = mxContext.getAccessibleStateSet();
- aChild.setSelected (aChildStateSet!=null
- && aChildStateSet.contains(AccessibleStateType.SELECTED));
-
- aChild.addActionListener (this);
- maChildrenSelector.add (aChild);
-
- }
- catch (IndexOutOfBoundsException e)
- {
- }
- }
- }
-
-
- void SelectAll()
- {
- mxSelection.selectAllAccessibleChildren();
- }
-
- void ClearSelection()
- {
- mxSelection.clearAccessibleSelection();
- }
-
-
- /** Call the function associated with the pressed button.
- */
- public void actionPerformed (ActionEvent aEvent)
- {
- String sCommand = aEvent.getActionCommand();
-
- if (sCommand.equals ("Clear Selection"))
- ClearSelection();
- else if (sCommand.equals ("Select all"))
- SelectAll();
- else
- {
- // Extract the child index from the widget text.
- String[] aWords = sCommand.split (" ");
- int nIndex = Integer.parseInt(aWords[0]);
- try
- {
- if (((JToggleButton)aEvent.getSource()).isSelected())
- mxSelection.selectAccessibleChild (nIndex);
- else
- mxSelection.deselectAccessibleChild (nIndex);
- }
- catch (IndexOutOfBoundsException e)
- {
- System.err.println ("caught exception while changing selection: " + e);
- }
- }
- }
-
-
- @Override
- public void notifyEvent (AccessibleEventObject aEvent)
- {
- if (aEvent.EventId == AccessibleEventId.SELECTION_CHANGED)
- Update ();
- }
-
- private JPanel maChildrenSelector;
- private XAccessibleSelection mxSelection;
- private JLabel maTypeLabel;
-}
diff --git a/unotest/source/java/org/openoffice/test/UnoApiTest.java b/unotest/source/java/org/openoffice/test/UnoApiTest.java
index 13e5a140218d..b99f4aaf99af 100644
--- a/unotest/source/java/org/openoffice/test/UnoApiTest.java
+++ b/unotest/source/java/org/openoffice/test/UnoApiTest.java
@@ -20,19 +20,20 @@ package org.openoffice.test;
import org.openoffice.Runner;
import static org.junit.Assert.*;
+import org.junit.*;
public final class UnoApiTest {
- @org.junit.Before public void setUp() throws Exception {
+ @Before public void setUp() throws Exception {
connection.setUp();
}
- @org.junit.After public void tearDown()
+ @After public void tearDown()
throws InterruptedException, com.sun.star.uno.Exception
{
connection.tearDown();
}
- @org.junit.Test public void test() {
+ @Test public void test() {
assertTrue(
Runner.run(
"-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
diff --git a/unotest/source/java/org/openoffice/test/tools/DocumentType.java b/unotest/source/java/org/openoffice/test/tools/DocumentType.java
index 6b2e9700024e..bb4745f7b3c7 100644
--- a/unotest/source/java/org/openoffice/test/tools/DocumentType.java
+++ b/unotest/source/java/org/openoffice/test/tools/DocumentType.java
@@ -26,11 +26,6 @@ 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);
public static final DocumentType DRAWING = new DocumentType(2);
@@ -39,17 +34,4 @@ public class DocumentType extends com.sun.star.uno.Enum
public static final DocumentType FORMULA = new DocumentType(5);
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;
- case 4: return PRESENTATION;
- case 5: return FORMULA;
- default: return UNKNOWN;
- }
- }
}
diff --git a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java
index fe3035fcefa1..655d17a9a7bd 100644
--- a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java
+++ b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java
@@ -20,13 +20,8 @@ package org.openoffice.test.tools;
import com.sun.star.beans.PropertyState;
import com.sun.star.beans.PropertyValue;
import com.sun.star.document.MacroExecMode;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPageSupplier;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XController;
-import com.sun.star.frame.XFrame;
import com.sun.star.frame.XModel;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
@@ -35,7 +30,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
import com.sun.star.util.CloseVetoException;
import com.sun.star.util.XCloseable;
-import com.sun.star.util.XModifiable;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -73,12 +67,6 @@ public class OfficeDocument
}
/* ------------------------------------------------------------------ */
- private static OfficeDocument implLoadDocument( XMultiServiceFactory orb, String documentOrFactoryURL ) throws com.sun.star.uno.Exception
- {
- return implLoadDocument( orb, documentOrFactoryURL, new PropertyValue[0] );
- }
-
- /* ------------------------------------------------------------------ */
private static OfficeDocument implLoadDocument( XMultiServiceFactory orb, String documentOrFactoryURL, final PropertyValue[] i_args ) throws com.sun.star.uno.Exception
{
XComponent document = implLoadAsComponent( orb, documentOrFactoryURL, i_args );
@@ -90,24 +78,12 @@ public class OfficeDocument
}
/* ------------------------------------------------------------------ */
- public static OfficeDocument loadDocument( XMultiServiceFactory orb, String documentURL ) throws com.sun.star.uno.Exception
- {
- return implLoadDocument( orb, documentURL );
- }
-
- /* ------------------------------------------------------------------ */
public static OfficeDocument blankTextDocument( XMultiServiceFactory orb ) throws com.sun.star.uno.Exception
{
return blankDocument( orb, DocumentType.WRITER );
}
/* ------------------------------------------------------------------ */
- public static OfficeDocument blankXMLForm( XMultiServiceFactory orb ) throws com.sun.star.uno.Exception
- {
- return blankDocument( orb, DocumentType.XMLFORM );
- }
-
- /* ------------------------------------------------------------------ */
public static OfficeDocument blankDocument( XMultiServiceFactory orb, DocumentType eType ) throws com.sun.star.uno.Exception
{
final PropertyValue[] args = new PropertyValue[] {
@@ -140,25 +116,6 @@ public class OfficeDocument
}
/* ------------------------------------------------------------------ */
- public boolean isModified()
- {
- XModifiable modify = query( XModifiable.class );
- return modify.isModified();
- }
-
- /* ------------------------------------------------------------------ */
- private <T> T query( Class<T> aInterfaceClass )
- {
- return UnoRuntime.queryInterface( aInterfaceClass, m_documentComponent );
- }
-
- /* ------------------------------------------------------------------ */
- public XMultiServiceFactory getOrb( )
- {
- return m_orb;
- }
-
- /* ------------------------------------------------------------------ */
/** retrieves the current view of the document
@return
the view component, queried for the interface described by aInterfaceClass
@@ -178,33 +135,6 @@ public class OfficeDocument
}
/* ------------------------------------------------------------------ */
- /** reloads the document
- *
- * The reload is done by dispatching the respective URL at a frame of the document.
- * As a consequence, if you have references to a view of the document, or any interface
- * of the document, they will become invalid.
- * The Model instance itself, at which you called reload, will still be valid, it will
- * automatically update its internal state after the reload.
- *
- * Another consequence is that if the document does not have a view at all, it cannot
- * be reloaded.
- */
- public void reload() throws Exception
- {
- OfficeDocumentView view = getCurrentView();
- XFrame frame = view.getController().getFrame();
- XModel oldModel = frame.getController().getModel();
-
- getCurrentView().dispatch( ".uno:Reload" );
-
- m_documentComponent = UnoRuntime.queryInterface( XComponent.class, frame.getController().getModel() );
-
- XModel newModel = getCurrentView().getController().getModel();
- if ( UnoRuntime.areSame( oldModel, newModel ) )
- throw new java.lang.IllegalStateException( "reload failed" );
- }
-
- /* ------------------------------------------------------------------ */
/** returns a URL which can be used to create a document of a certain type
*/
private static String getDocumentFactoryURL( DocumentType eType )
@@ -246,48 +176,6 @@ public class OfficeDocument
}
/* ------------------------------------------------------------------ */
- /** retrieves a com.sun.star.drawing.DrawPage of the document, denoted by index
- * @param index
- * the index of the draw page
- * @throws
- * com.sun.star.lang.IndexOutOfBoundsException
- * com.sun.star.lang.WrappedTargetException
- */
- protected XDrawPage getDrawPage( int index ) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException
- {
- XDrawPagesSupplier xSuppPages = UnoRuntime.queryInterface( XDrawPagesSupplier.class, getDocument() );
- XDrawPages xPages = xSuppPages.getDrawPages();
-
- return UnoRuntime.queryInterface( XDrawPage.class, xPages.getByIndex( index ) );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the <type scope="com.sun.star.drawing">DrawPage</type> of the document
- */
- protected XDrawPage getMainDrawPage( ) throws com.sun.star.uno.Exception
- {
- XDrawPage xReturn;
-
- // in case of a Writer document, this is rather easy: simply ask the XDrawPageSupplier
- XDrawPageSupplier xSuppPage = UnoRuntime.queryInterface( XDrawPageSupplier.class, getDocument() );
- if ( null != xSuppPage )
- xReturn = xSuppPage.getDrawPage();
- else
- { // the model itself is no draw page supplier - okay, it may be a Writer or Calc document
- // (or any other multi-page document)
- XDrawPagesSupplier xSuppPages = UnoRuntime.queryInterface( XDrawPagesSupplier.class, getDocument() );
- XDrawPages xPages = xSuppPages.getDrawPages();
-
- xReturn = UnoRuntime.queryInterface( XDrawPage.class, xPages.getByIndex( 0 ) );
-
- // Note that this is no really error-proof code: If the document model does not support the
- // XDrawPagesSupplier interface, or if the pages collection returned is empty, this will break.
- }
-
- return xReturn;
- }
-
- /* ------------------------------------------------------------------ */
/** creates a component at the service factory provided by the document
*/
public XInterface createInstance( String serviceSpecifier ) throws com.sun.star.uno.Exception
diff --git a/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java b/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java
index fee1da989688..5f89df726718 100644
--- a/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java
+++ b/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java
@@ -19,8 +19,6 @@ package org.openoffice.test.tools;
/**************************************************************************/
-import com.sun.star.beans.NamedValue;
-import com.sun.star.beans.PropertyState;
import com.sun.star.beans.PropertyValue;
import com.sun.star.frame.XController;
import com.sun.star.frame.XDispatch;
@@ -37,7 +35,6 @@ public class OfficeDocumentView
{
private final XMultiServiceFactory m_orb;
private final XController m_controller;
- private final OfficeDocument m_document;
/* ------------------------------------------------------------------ */
final public XController getController()
@@ -46,16 +43,9 @@ public class OfficeDocumentView
}
/* ------------------------------------------------------------------ */
- final protected OfficeDocument getDocument()
- {
- return m_document;
- }
-
- /* ------------------------------------------------------------------ */
public OfficeDocumentView( XMultiServiceFactory orb, OfficeDocument document, XController controller )
{
m_orb = orb;
- m_document = document;
m_controller = controller;
}
@@ -88,16 +78,6 @@ public class OfficeDocumentView
/* ------------------------------------------------------------------ */
- /** retrieves a dispatcher for the given URL, obtained at the current view of the document
- */
- public XDispatch getDispatcher( String url ) throws com.sun.star.uno.Exception
- {
- URL[] aURL = new URL[] { new URL() };
- aURL[0].Complete = url;
- return getDispatcher( aURL );
- }
-
- /* ------------------------------------------------------------------ */
/** dispatches the given URL into the view, if there's a dispatcher for it
@return
@@ -121,15 +101,4 @@ public class OfficeDocumentView
return true;
}
- /* ------------------------------------------------------------------ */
- public boolean dispatch( final String i_url, final NamedValue[] i_arguments ) throws com.sun.star.uno.Exception
- {
- final PropertyValue[] dispatchArgs = new PropertyValue[ i_arguments.length ];
- for ( int i=0; i<i_arguments.length; ++i )
- {
- dispatchArgs[i] = new PropertyValue( i_arguments[i].Name, -1, i_arguments[i].Value, PropertyState.DIRECT_VALUE );
- }
- return dispatch( i_url, dispatchArgs );
- }
}
-
diff --git a/unotest/source/java/org/openoffice/test/tools/SpreadsheetView.java b/unotest/source/java/org/openoffice/test/tools/SpreadsheetView.java
index f935b1f91880..b6e32a9beb72 100644
--- a/unotest/source/java/org/openoffice/test/tools/SpreadsheetView.java
+++ b/unotest/source/java/org/openoffice/test/tools/SpreadsheetView.java
@@ -17,15 +17,8 @@
*/
package org.openoffice.test.tools;
-import com.sun.star.container.XIndexAccess;
import com.sun.star.frame.XController;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XSpreadsheetView;
-import com.sun.star.uno.UnoRuntime;
-import java.util.logging.Level;
-import java.util.logging.Logger;
public class SpreadsheetView extends OfficeDocumentView
{
@@ -36,25 +29,4 @@ public class SpreadsheetView extends OfficeDocumentView
super( orb, document, controller );
}
- /** activates the sheet with the given index
- */
- void activateSheet( int sheetIndex )
- {
- try
- {
- // get the sheet to activate
- XSpreadsheetDocument doc = UnoRuntime.queryInterface( XSpreadsheetDocument.class, getDocument().getDocument() );
- XIndexAccess sheets = UnoRuntime.queryInterface( XIndexAccess.class, doc.getSheets() );
-
- XSpreadsheet sheet = UnoRuntime.queryInterface( XSpreadsheet.class, sheets.getByIndex( sheetIndex ) );
-
- // activate
- XSpreadsheetView view = UnoRuntime.queryInterface( XSpreadsheetView.class, getController() );
- view.setActiveSheet( sheet );
- }
- catch( com.sun.star.uno.Exception e )
- {
- Logger.getLogger( SpreadsheetView.class.getName() ).log( Level.SEVERE, "unable to activate the given sheet", e );
- }
- }
}
diff --git a/unotools/qa/complex/tempfile/Test01.java b/unotools/qa/complex/tempfile/Test01.java
index 2b64195d3752..ed8e729854c8 100644
--- a/unotools/qa/complex/tempfile/Test01.java
+++ b/unotools/qa/complex/tempfile/Test01.java
@@ -23,10 +23,7 @@ import com.sun.star.io.*;
import com.sun.star.uno.UnoRuntime;
import java.util.Random;
-import share.LogWriter;
-
public class Test01 {
- LogWriter m_aLogWriter;
private XMultiServiceFactory m_xMSF = null;
private XSimpleFileAccess m_xSFA = null;
private TestHelper m_aTestHelper = null;
diff --git a/unotools/qa/complex/tempfile/TestHelper.java b/unotools/qa/complex/tempfile/TestHelper.java
index e17075419ddd..28b979658dc2 100644
--- a/unotools/qa/complex/tempfile/TestHelper.java
+++ b/unotools/qa/complex/tempfile/TestHelper.java
@@ -41,16 +41,6 @@ public class TestHelper {
}
}
- public boolean GetTempFileRemove ( XTempFile xTempFile ) {
- boolean b = false;
- try {
- b = xTempFile.getRemoveFile();
- } catch( Exception e) {
- Error( "Cannot get TempFileRemove. exception: " + e );
- }
- return b;
- }
-
public String GetTempFileURL ( XTempFile xTempFile ) {
String sTempFileURL = null;
try {
diff --git a/wizards/Jar_commonwizards.mk b/wizards/Jar_commonwizards.mk
index 098a96d1172d..07d8dd45135d 100644
--- a/wizards/Jar_commonwizards.mk
+++ b/wizards/Jar_commonwizards.mk
@@ -46,7 +46,6 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\
wizards/com/sun/star/wizards/common/SystemDialog \
wizards/com/sun/star/wizards/common/Configuration \
wizards/com/sun/star/wizards/common/IRenderer \
- wizards/com/sun/star/wizards/common/TerminateWizardException \
wizards/com/sun/star/wizards/common/DebugHelper \
wizards/com/sun/star/wizards/common/PropertySetHelper \
wizards/com/sun/star/wizards/common/NumericalHelper \
@@ -67,8 +66,6 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\
wizards/com/sun/star/wizards/db/TableDescriptor \
wizards/com/sun/star/wizards/db/SQLQueryComposer \
wizards/com/sun/star/wizards/db/DatabaseObjectWizard \
- wizards/com/sun/star/wizards/ui/event/DataAware \
- wizards/com/sun/star/wizards/ui/event/DataAwareFields \
wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter \
wizards/com/sun/star/wizards/ui/event/XItemListenerAdapter \
wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter \
diff --git a/wizards/com/sun/star/wizards/common/Properties.java b/wizards/com/sun/star/wizards/common/Properties.java
index 372c7c4a3b76..764703c74ac2 100644
--- a/wizards/com/sun/star/wizards/common/Properties.java
+++ b/wizards/com/sun/star/wizards/common/Properties.java
@@ -54,28 +54,6 @@ public class Properties extends HashMap<String,Object>
return false;
}
- public PropertyValue[] getProperties()
- {
- return getProperties(this);
- }
-
- private static PropertyValue[] getProperties(Map<String,Object> map)
- {
- PropertyValue[] pv = new PropertyValue[map.size()];
-
- Iterator<String> it = map.keySet().iterator();
- for (int i = 0; i < pv.length; i++)
- {
- pv[i] = createProperty(it.next(), map);
- }
- return pv;
- }
-
- private static PropertyValue createProperty(String name, Map<String,Object> map)
- {
- return createProperty(name, map.get(name));
- }
-
public static PropertyValue createProperty(String name, Object value)
{
PropertyValue pv = new PropertyValue();
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java
index ac9168482212..a9800bc867c9 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.java
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.java
@@ -18,7 +18,6 @@
package com.sun.star.wizards.common;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.ui.dialogs.*;
import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.XComponent;
@@ -30,8 +29,6 @@ import com.sun.star.awt.XMessageBox;
public class SystemDialog
{
- XFilterManager xFilterManager;
-
public static int showErrorBox(XMultiServiceFactory xMSF, String ResPrefix, int ResID, String AddTag, String AddString)
{
Resource oResource;
diff --git a/wizards/com/sun/star/wizards/common/TerminateWizardException.java b/wizards/com/sun/star/wizards/common/TerminateWizardException.java
deleted file mode 100644
index ba8e5717f2d1..000000000000
--- a/wizards/com/sun/star/wizards/common/TerminateWizardException.java
+++ /dev/null
@@ -1,32 +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;
-
-import com.sun.star.lang.XMultiServiceFactory;
-
-public class TerminateWizardException extends Exception
-{
-
- public TerminateWizardException(XMultiServiceFactory xMSF)
- {
- Resource oResource = new Resource(xMSF, "dbw");
- String sErrorMessage = oResource.getResText(1006);
- SystemDialog.showMessageBox(xMSF, "ErrorBox", com.sun.star.awt.VclWindowPeerAttribute.OK, sErrorMessage);
- printStackTrace(System.out);
- }
-}
diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java
index da5a7bf00c3b..5b2b09ca31a1 100644
--- a/wizards/com/sun/star/wizards/db/CommandMetaData.java
+++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java
@@ -60,8 +60,6 @@ public class CommandMetaData extends DBMetaData
public String[] NonAggregateFieldNames;
private int CommandType;
private String Command;
- private boolean bCatalogAtStart = true;
- private String sCatalogSep = PropertyNames.EMPTY_STRING;
private String sIdentifierQuote = PropertyNames.EMPTY_STRING;
private boolean bCommandComposerAttributesalreadyRetrieved = false;
@@ -468,16 +466,6 @@ public class CommandMetaData extends DBMetaData
}
}
- public String[] getFieldTitles()
- {
- String[] sFieldTitles = new String[FieldColumns.length];
- for (int i = 0; i < FieldColumns.length; i++)
- {
- sFieldTitles[i] = FieldColumns[i].getFieldTitle();
- }
- return sFieldTitles;
- }
-
public void setGroupFieldNames(String[] GroupFieldNames)
{
this.GroupFieldNames = GroupFieldNames;
@@ -527,7 +515,7 @@ public class CommandMetaData extends DBMetaData
{
try
{
- sCatalogSep = xDBMetaData.getCatalogSeparator();
+ xDBMetaData.getCatalogSeparator();
sIdentifierQuote = xDBMetaData.getIdentifierQuoteString();
bCommandComposerAttributesalreadyRetrieved = true;
}
@@ -538,30 +526,6 @@ public class CommandMetaData extends DBMetaData
}
/**
- * @return Returns the bCatalogAtStart.
- */
- public boolean isCatalogAtStart()
- {
- if (!bCommandComposerAttributesalreadyRetrieved)
- {
- setCommandComposingAttributes();
- }
- return bCatalogAtStart;
- }
-
- /**
- * @return Returns the sCatalogSep.
- */
- public String getCatalogSeparator()
- {
- if (!bCommandComposerAttributesalreadyRetrieved)
- {
- setCommandComposingAttributes();
- }
- return sCatalogSep;
- }
-
- /**
* @return Returns the sIdentifierQuote.
*/
public String getIdentifierQuote()
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index f870e96b685b..2187d174db54 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -410,11 +410,6 @@ public class DBMetaData
return iMaxColumnsInSelect;
}
- public int getMaxColumnsInGroupBy()
- {
- return iMaxColumnsInGroupBy;
- }
-
private void setMaxColumnsInSelect() throws SQLException
{
iMaxColumnsInSelect = xDBMetaData.getMaxColumnsInSelect();
diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java b/wizards/com/sun/star/wizards/db/FieldColumn.java
index 808c75933739..1978a4d0cfb3 100644
--- a/wizards/com/sun/star/wizards/db/FieldColumn.java
+++ b/wizards/com/sun/star/wizards/db/FieldColumn.java
@@ -123,11 +123,6 @@ public class FieldColumn
return m_nDBFormatKey;
}
- public int getStandardFormatKey()
- {
- getFieldType(); // will collect meta data 'bout the column, if not already done so
- return StandardFormatKey;
- }
public boolean isNumberFormat()
{
getFieldType(); // will collect meta data 'bout the column, if not already done so
@@ -184,11 +179,6 @@ public class FieldColumn
return m_xColPropertySet;
}
- public void setCommandName(String _CommandName)
- {
- m_sCommandName = _CommandName;
- }
-
public String getDisplayFieldName()
{
return m_sDisplayFieldName;
diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java
index 8a34ec8d4238..0c4c976395ed 100644
--- a/wizards/com/sun/star/wizards/document/FormHandler.java
+++ b/wizards/com/sun/star/wizards/document/FormHandler.java
@@ -76,7 +76,6 @@ public class FormHandler
public final static int SOGRIDCONTROL = 6;
public final static int SOIMAGECONTROL = 7;
public final static int SODATETIMECONTROL = 8;
- private int iImageControlHeight = 2000;
public static String SOSIZETEXT = "The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.";
private int iXPixelFactor = -1;
private int iYPixelFactor = -1;
@@ -361,25 +360,6 @@ public class FormHandler
return iYPixelFactor;
}
- public void setXPixelFactor(int i)
- {
- iXPixelFactor = i;
- }
-
- public void setYPixelFactor(int i)
- {
- iYPixelFactor = i;
- }
-
- public int getImageControlHeight()
- {
- return iImageControlHeight;
- }
-
- public void setImageControlHeight(int i)
- {
- iImageControlHeight = i;
- }
// Note: as Shapes cannot be removed from the DrawPage without destroying
// the object we have to park them somewhere beyond the visible area of the page
public void moveShapesToNirwana(Control[] ControlList)
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java
index 7e0202d095c5..a4f166c54def 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.java
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java
@@ -50,8 +50,6 @@ import com.sun.star.util.XModifiable;
public class OfficeDocument
{
- private XWindowPeer xWindowPeer;
-
public static void dispose(XMultiServiceFactory xMSF, XComponent xComponent)
{
try
@@ -248,21 +246,4 @@ public class OfficeDocument
}
}
- /**
- * @return Returns the xWindowPeer.
- */
- public XWindowPeer getWindowPeer()
- {
- return xWindowPeer;
- }
-
- /**
- * @param windowPeer The xWindowPeer to set.
- * Should be called as soon as a Windowpeer of a wizard dialog is available
- * The windowpeer is needed to call a Messagebox
- */
- public void setWindowPeer(XWindowPeer windowPeer)
- {
- xWindowPeer = windowPeer;
- }
}
diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java
index 293d4b3f8b41..afeedd433e10 100644
--- a/wizards/com/sun/star/wizards/form/FormControlArranger.java
+++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java
@@ -103,11 +103,6 @@ public class FormControlArranger
return oFormHandler.getBasicLabelDiffHeight();
}
- public void setBorderType(short _nBorderType)
- {
- NBorderType = Short.valueOf(_nBorderType);
- }
-
public Control[] getLabelControlList()
{
return LabelControlList;
diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java
index 3aed54d71904..4f2489fa2b86 100644
--- a/wizards/com/sun/star/wizards/form/FormDocument.java
+++ b/wizards/com/sun/star/wizards/form/FormDocument.java
@@ -277,13 +277,6 @@ public class FormDocument extends TextDocument
return null;
}
- public ControlForm[] getControlForms()
- {
- ControlForm[] aResult = new ControlForm[oControlForms.size()];
- oControlForms.toArray( aResult );
- return aResult;
- }
-
public boolean finalizeForms(DataEntrySetter _curDataEntrySetter, FieldLinker _curFieldLinker, FormConfiguration _curFormConfiguration)
{
try
diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java
index 098513eb8a2e..a067ffbcb3eb 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -21,7 +21,6 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.awt.VclWindowPeerAttribute;
import com.sun.star.awt.XWindowPeer;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.frame.XFrame;
import com.sun.star.sdb.CommandType;
import com.sun.star.sdbc.SQLException;
import com.sun.star.uno.AnyConverter;
@@ -86,11 +85,6 @@ public class QueryWizard extends DatabaseObjectWizard
});
}
- public final XFrame getFrame()
- {
- return m_frame;
- }
-
public String start()
{
try
diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java
index 1d3e3aa72c7d..a068c7082709 100644
--- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java
+++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java
@@ -23,7 +23,6 @@ import com.sun.star.awt.XTextComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.Exception;
import com.sun.star.wizards.common.Desktop;
-import com.sun.star.wizards.common.FileAccess;
import com.sun.star.wizards.common.JavaTools;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.db.RecordParser;
@@ -43,11 +42,8 @@ public class ReportFinalizer
public static final int SOCREATEDOCUMENT = 1;
public static final int SOCREATETEMPLATE = 2;
public static final int SOUSETEMPLATE = 3;
- private final XMultiServiceFactory m_xMSF;
public ReportFinalizer(XMultiServiceFactory _xMSF, IReportDocument _CurReportDocument, WizardDialog _CurUnoDialog)
{
- m_xMSF = _xMSF;
-
this.CurUnoDialog = _CurUnoDialog;
this.CurReportDocument = _CurReportDocument;
short curtabindex = (short) (ReportWizard.SOSTOREPAGE * 100);
@@ -209,13 +205,6 @@ public class ReportFinalizer
return (StoreName);
}
- public String getStorePath()
- {
- StoreName = getStoreName();
- String StorePath = FileAccess.getOfficePath(m_xMSF, "Temp") + "/" + StoreName;
- return StorePath;
- }
-
private void changeReportTitle()
{
final String TitleName = xTitleTextBox.getText();
diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java
index c2d47b7dc263..9fb9ef678bf5 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java
@@ -110,13 +110,6 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
getReportPageStyles();
}
- public NumberFormatter getNumberFormatter()
- {
- return oNumberFormatter;
- }
-
-
-
public void swapContentTemplate(String ContentTemplatePath)
{
this.ContentTemplatePath = ContentTemplatePath;
diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java
index cb6fcf71b8b9..c8353932e161 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -613,17 +613,6 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener
{
}
- public void setmodified(int _ndialogpage, Object ooldValue, Object onewValue)
- {
- switch (_ndialogpage)
- {
- case SOMAINPAGE:
- break;
- default:
- break;
- }
- }
-
private void toggleSortingPage()
{
int nlCommandType = this.CurDBCommandFieldSelection.getSelectedCommandType();
diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
index a090b36b00fc..ef07f83daa1d 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
@@ -60,6 +60,7 @@ import com.sun.star.wizards.ui.UIConsts;
* This class use the IReportDocument Interface to communicate between the UI
* and the ReportBuilderLayouter which communicates to the new Sun Report Builder.
*/
+@SuppressWarnings("ucd")
public class ReportBuilderImplementation extends ReportImplementationHelper
implements IReportDocument, IReportDefinitionReadAccess
{
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
index 974464a43de3..6d332705664e 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
@@ -299,8 +299,4 @@ public class DesignTemplate
analyseReportDefinition();
}
- public XReportDefinition getReportDefinition()
- {
- return m_xReportDefinition;
- }
}
diff --git a/wizards/com/sun/star/wizards/table/Finalizer.java b/wizards/com/sun/star/wizards/table/Finalizer.java
index 13414695d702..b824d515e9cd 100644
--- a/wizards/com/sun/star/wizards/table/Finalizer.java
+++ b/wizards/com/sun/star/wizards/table/Finalizer.java
@@ -305,11 +305,6 @@ public class Finalizer
}
}
- public String getTableName()
- {
- return txtTableName.getText();
- }
-
public String getTableName(String _firsttablename)
{
if (txtTableName.getText().equals(PropertyNames.EMPTY_STRING))
diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
index 050e5046a549..e715a7732b45 100644
--- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
+++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
@@ -449,11 +449,6 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
return null;
}
- public int getID()
- {
- return 0;
- }
-
public void moveItemDown(String Selitem)
{
}
diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
index 99958fa72587..ac650759931f 100644
--- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java
+++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
@@ -293,12 +293,6 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
public void disposing(EventObject arg0)
{
}
- private int ID;
-
- public int getID()
- {
- return ID;
- }
public void setID(String sIncSuffix)
{
diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
index 4e2102f9ba2d..6957bdb2d62a 100644
--- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java
+++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
@@ -48,7 +48,6 @@ public class AggregateComponent extends ControlScroller
private String slblAggregate;
private String slblFieldNames;
private String sDuplicateAggregateFunction;
- private int Count;
private static final int SOADDROW = 1;
private static final int SOREMOVEROW = 2;
private ArrayList<ControlRow> ControlRowVector;
@@ -61,7 +60,6 @@ public class AggregateComponent extends ControlScroller
try
{
this.CurDBMetaData = _CurDBMetaData;
- Count = 1;
CurUnoDialog.insertRadioButton("optDetailQuery", 0, new ActionListenerImpl(),
new String[]
{
@@ -177,11 +175,6 @@ public class AggregateComponent extends ControlScroller
}
}
- public int getCount()
- {
- return Count;
- }
-
protected void insertControlGroup(int i, int ypos)
{
if (i == 0)
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java
index 6fab9de4a712..51a7c84a2481 100644
--- a/wizards/com/sun/star/wizards/ui/ButtonList.java
+++ b/wizards/com/sun/star/wizards/ui/ButtonList.java
@@ -52,7 +52,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private int rows = 3;
private Size m_aButtonSize = new Size(20, 20);
private Size pos;
- private Size selectionGap = new Size(2, 2);
private boolean showButtons = true;
private Short step;
private static final boolean refreshOverNull = true;
@@ -68,14 +67,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
private IRenderer counterRenderer = new SimpleCounterRenderer();
private final static int LINE_HEIGHT = 8;
- /** Getter for property m_aButtonSize.
- * @return Value of property m_aButtonSize.
- *
- */
- public Size getButtonSize()
- {
- return this.m_aButtonSize;
- }
public void setName(String _sName)
{
m_aControlName = _sName;
@@ -410,61 +401,16 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
}
}
- public int getCols()
- {
- return cols;
- }
-
- public Size getGap()
- {
- return gap;
- }
-
private ListModel getListModel()
{
return listModel;
}
- public Short getStep()
- {
- return step;
- }
-
- public int getPageStart()
- {
- return pageStart;
- }
-
- public Size getPos()
- {
- return pos;
- }
-
- public IImageRenderer getRenderer()
- {
- return renderer;
- }
-
- public int getRows()
- {
- return rows;
- }
-
public int getSelected()
{
return m_nCurrentSelection;
}
- public Size getSelectionGap()
- {
- return selectionGap;
- }
-
- public boolean isShowButtons()
- {
- return showButtons;
- }
-
public void setCols(int i)
{
cols = i;
@@ -540,7 +486,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
public void setSelectionGap(Size size)
{
- selectionGap = size;
}
public void setShowButtons(boolean b)
@@ -586,15 +531,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
return UnoRuntime.queryInterface(XControl.class, control).getModel();
}
- public Object[] getSelectedObjects()
- {
- return new Object[]
- {
- getListModel().getElementAt(m_nCurrentSelection)
- };
- }
-
-
public interface IImageRenderer extends IRenderer
{
@@ -627,23 +563,6 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
}
}
- public Object getSelectedObject()
- {
- return m_nCurrentSelection >= 0 ? getListModel().getElementAt(m_nCurrentSelection) : null;
- }
-
-
- public void setRowSelect(boolean b)
- {
- rowSelect = b;
- }
-
- public boolean isRowSelect()
- {
- return rowSelect;
- }
-
-
public boolean isenabled()
{
return benabled;
diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
index 59bd1c770644..5638da4f5fbf 100644
--- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
@@ -245,7 +245,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
* @return
* @throws com.sun.star.wizards.common.TerminateWizardException
*/
- private short fillupCommandListBox() throws com.sun.star.wizards.common.TerminateWizardException
+ private short fillupCommandListBox()
{
short[] iSelArray = new short[0];
boolean bgetFields = false;
diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java
index f20007434f60..88dea0fe9f14 100644
--- a/wizards/com/sun/star/wizards/ui/FieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java
@@ -139,11 +139,6 @@ public class FieldSelection
AppendMode = _AppendMode;
}
- public boolean getAppendMode()
- {
- return AppendMode;
- }
-
public FieldSelection(UnoDialog CurUnoDialog, int _iStep, int CompPosX, int CompPosY, int CompWidth, int CompHeight, String slblFields, String slblSelFields, int _FirstHelpIndex, boolean bshowFourButtons)
{
try
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index 0587e0cc32e5..07560e0a12cd 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -541,17 +541,6 @@ public class UnoDialog
return xDialog.execute();
}
- public void setVisible(UnoDialog parent) throws com.sun.star.uno.Exception
- {
- calculateDialogPosition(parent.xWindow.getPosSize());
- if (xWindowPeer == null)
- {
- createWindowPeer();
- }
- xDialog = UnoRuntime.queryInterface(XDialog.class, xUnoDialog);
- this.xWindow.setVisible(true);
- }
-
/**
* @return 0 for cancel, 1 for ok.
*/
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 523673ab5a5b..615429872884 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -102,26 +102,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
nMaxStep = i;
}
- public int getMaxStep()
- {
- return nMaxStep;
- }
-
- public void setOldStep(int i)
- {
- nOldStep = i;
- }
-
- public int getOldStep()
- {
- return nOldStep;
- }
-
- public void setNewStep(int i)
- {
- nNewStep = i;
- }
-
public int getNewStep()
{
return nNewStep;
@@ -252,18 +232,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
sRMItemLabels = _oResource.getResArray(StartResID, nMaxStep);
}
- public String[] getRMItemLabels()
- {
- return sRMItemLabels;
- }
-
- /* public void insertRoadmapItems(int StartIndex, int RMCount)
- {
- Object oRoadmapItem;
- boolean bEnabled;
- for (int i = StartIndex; i < (StartIndex + RMCount); i++)
- insertSingleRoadmapItem(i, true, sRMItemLabels[i], i);
- }*/
public int insertRoadmapItem(int _Index, boolean _bEnabled, int _LabelID, int _CurItemID)
{
return insertRoadmapItem(_Index, _bEnabled, sRMItemLabels[_LabelID], _CurItemID);
@@ -614,11 +582,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
removeTerminateListener();
}
- public int getMaximalStep()
- {
- return this.nMaxStep;
- }
-
public int getCurrentStep()
{
try
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java
deleted file mode 100644
index 61e5e3f8b478..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.java
+++ /dev/null
@@ -1,170 +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.event;
-
-import java.util.Arrays;
-
-/**
- * DataAware objects are used to live-synchronize UI and DataModel/DataObject.
- * It is used as listener on UI events, to keep the DataObject up to date.
- * This class, as a base abstract class, sets a frame of functionality,
- * delegating the data Object get/set methods to a Value object,
- * and leaving the UI get/set methods abstract.
- * Note that event listenning is *not* a part of this model.
- * the updateData() or updateUI() methods should be porogramatically called.
- * in child classes, the updateData() will be binded to UI event calls.
- * <br><br>
- * This class holds references to a Data Object and a Value object.
- * The Value object "knows" how to get and set a value from the
- * Data Object.
- */
-public abstract class DataAware {
-
- /**
- * this is the data object.
- */
- private Object dataObject;
- /**
- * A Value Object knows how to get/set a value
- * from/to the data object.
- */
- private Value value;
-
- /**
- * creates a DataAware object for the given data object and Value object.
- * @param dataObject_
- * @param value_
- */
- protected DataAware(Object dataObject_, Value value_) {
- dataObject = dataObject_;
- value = value_;
- }
-
- /**
- * returns the data object.
- */
- private Object getDataObject() {
- return dataObject;
- }
-
- /**
- * Sets the given value to the data object.
- * this method delegates the job to the
- * Value object, but can be overwritten if
- * another kind of Data is needed.
- * @param newValue the new value to set to the DataObject.
- */
- private void setToData(Object newValue) {
- value.set(newValue,getDataObject());
- }
-
- /**
- * gets the current value from the data object.
- * this method delegates the job to
- * the value object.
- * @return the current value of the data object.
- */
- private Object getFromData() {
- return value.get(getDataObject());
- }
-
- /**
- * sets the given value to the UI control
- * @param newValue the value to set to the ui control.
- */
- protected abstract void setToUI(Object newValue);
-
- /**
- * gets the current value from the UI control.
- * @return the current value from the UI control.
- */
- protected abstract Object getFromUI();
-
- /**
- * enables
- * @param currentValue
- */
- private void enableControls(Object currentValue) {
- }
-
- /**
- * updates the DataObject according to
- * the current state of the UI control.
- */
- public void updateData() {
- Object data = getFromData();
- Object ui = getFromUI();
- if (!equals(data, ui))
- setToData(ui);
- enableControls(ui);
- }
-
- /**
- * compares the two given objects.
- * This method is null safe and returns true also if both are null...
- * If both are arrays, treats them as array of short and compares them.
- * @param a first object to compare
- * @param b second object to compare.
- * @return true if both are null or both are equal.
- */
- private boolean equals(Object a, Object b) {
- if (a == null && b == null)
- return true;
- if (a == null || b == null)
- return false;
- if (a.getClass().isArray()) {
- if (b.getClass().isArray())
- return Arrays.equals((short[]) a, (short[]) b);
- else
- return false;
- }
- return a.equals(b);
- }
-
-
-
-
-
-
-
- /**
- * Value objects read and write a value from and
- * to an object. Typically using reflection and JavaBeans properties
- * or directly using member reflection API.
- * DataAware delegates the handling of the DataObject
- * to a Value object.
- * 2 implementations currently exist: PropertyValue,
- * using JavaBeans properties reflection, and DataAwareFields classes
- * which implement different member types.
- */
- interface Value {
- /**
- * gets a value from the given object.
- * @param target the object to get the value from.
- * @return the value from the given object.
- */
- Object get(Object target);
- /**
- * sets a value to the given object.
- * @param value the value to set to the object.
- * @param target the object to set the value to.
- */
- void set(Object value, Object target);
- }
-
-}
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
deleted file mode 100644
index ee5ba4df539c..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
+++ /dev/null
@@ -1,488 +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.event;
-
-import java.lang.reflect.Field;
-
-import com.sun.star.wizards.common.PropertyNames;
-import com.sun.star.uno.Any;
-
-/**
- * This class is a factory for Value objects for different types of
- * members.
- * Other than some Value implementations classes this class contains static
- * type conversion methods and factory methods.
- *
- * @see com.sun.star.wizards.ui.event.DataAware.Value
- */
-public class DataAwareFields
-{
-
- private static final String TRUE = "true";
-
- /**
- * returns a Value Object which sets and gets values
- * and converting them to other types, according to the "value" argument.
- */
- public static DataAware.Value getFieldValueFor(Object owner, String fieldname, Object value)
- {
- try
- {
- Field f = owner.getClass().getField(fieldname);
-
- Class<?> c = f.getType();
- Class<?> c2 = value.getClass();
- if (c.equals(Boolean.TYPE))
- {
- return new BooleanFieldValue(f, c2);
- }
- else if (c.equals(Integer.TYPE))
- {
- return new IntFieldValue(f, c2);
- }
- else if (c.equals(Double.TYPE))
- {
- return new DoubleFieldValue(f, c2);
- }
- else if (c.equals(String.class) && c2.equals(Integer.class))
- {
- return new ConvertedStringValue(f, c2);
- }
- else
- {
- return new SimpleFieldValue(f);
- }
- }
- catch (NoSuchFieldException ex)
- {
- ex.printStackTrace();
- return null;
- }
- }
-
- /**
- * an abstract implementation of DataAware.Value to access
- * object members (fields) using reflection.
- */
- private static abstract class FieldValue implements DataAware.Value
- {
-
- Field field;
-
- public FieldValue(Field field_)
- {
- field = field_;
- }
-
- }
-
- private static class BooleanFieldValue extends FieldValue
- {
-
- private final Class<?> convertTo;
-
- public BooleanFieldValue(Field f, Class<?> convertTo_)
- {
- super(f);
- convertTo = convertTo_;
- }
-
- /* (non-Javadoc)
- * @see com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object)
- */
- public Object get(Object target)
- {
- try
- {
- boolean b = field.getBoolean(target);
- if (convertTo.equals(Boolean.class))
- {
- return b ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (Number.class.isAssignableFrom(convertTo))
- {
- return toNumber(b ? 1 : 0, convertTo);
- }
- else if (convertTo.equals(String.class))
- {
- return String.valueOf(b);
- }
- else if (convertTo.isArray())
- {
- return toShortArray(toInt(b));
- }
- else
- {
- throw new IllegalArgumentException("Cannot convert boolean value to given type (" + convertTo.getName() + ").");
- }
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- return null;
- }
- }
-
- public void set(Object value, Object target)
- {
- try
- {
- field.setBoolean(target, toBoolean(value));
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- }
- }
- }
-
- private static class IntFieldValue extends FieldValue
- {
-
- private final Class<?> convertTo;
-
- public IntFieldValue(Field f, Class<?> convertTo_)
- {
- super(f);
- convertTo = convertTo_;
- }
-
- /* (non-Javadoc)
- * @see com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object)
- */
- public Object get(Object target)
- {
- try
- {
- int i = field.getInt(target);
- if (convertTo.equals(Boolean.class))
- {
- return i != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (Number.class.isAssignableFrom(convertTo))
- {
- return toNumber(i, convertTo);
- }
- else if (convertTo.equals(String.class))
- {
- return String.valueOf(i);
- }
- else if (convertTo.isArray())
- {
- return toShortArray(i);
- }
- else
- {
- throw new IllegalArgumentException("Cannot convert int value to given type (" + convertTo.getName() + ").");
- }
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- return null;
- }
- }
-
- public void set(Object value, Object target)
- {
- try
- {
- field.setInt(target, (int) toDouble(value));
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- }
- }
- }
-
- private static class DoubleFieldValue extends FieldValue
- {
-
- private final Class<?> convertTo;
-
- public DoubleFieldValue(Field f, Class<?> convertTo_)
- {
- super(f);
- convertTo = convertTo_;
- }
-
- /* (non-Javadoc)
- * @see com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object)
- */
- public Object get(Object target)
- {
- try
- {
- double d = field.getDouble(target);
- if (convertTo.equals(Boolean.class))
- {
- return d != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (Number.class.isAssignableFrom(convertTo))
- {
- return toNumber(d, convertTo);
- }
- else if (convertTo.equals(String.class))
- {
- return String.valueOf(d);
- }
- else if (convertTo.isArray())
- {
- return toShortArray(d);
- }
- else
- {
- throw new IllegalArgumentException("Cannot convert int value to given type (" + convertTo.getName() + ").");
- }
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- return null;
- }
- }
-
- public void set(Object value, Object target)
- {
- try
- {
- field.setDouble(target, toDouble(value));
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- }
- }
- }
-
- private static class ConvertedStringValue extends FieldValue
- {
-
- private final Class<?> convertTo;
-
- public ConvertedStringValue(Field f, Class<?> convertTo_)
- {
- super(f);
- convertTo = convertTo_;
- }
-
- /* (non-Javadoc)
- * @see com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object)
- */
- public Object get(Object target)
- {
- try
- {
- String s = (String) field.get(target);
-
- if (convertTo.equals(Boolean.class))
- {
- return (s != null && !s.equals(PropertyNames.EMPTY_STRING) && s.equals("true")) ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (convertTo.equals(Integer.class))
- {
- if (s == null || s.equals(PropertyNames.EMPTY_STRING))
- {
- return Any.VOID;
- }
- else
- {
- return Integer.valueOf(s);
- }
- }
- else if (convertTo.equals(Double.class))
- {
- if (s == null || s.equals(PropertyNames.EMPTY_STRING))
- {
- return Any.VOID;
- }
- else
- {
- return new Double(s);
- }
- }
- else
- {
- throw new IllegalArgumentException("Cannot convert int value to given type (" + convertTo.getName() + ").");
- }
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- return null;
- }
- }
-
- public void set(Object value, Object target)
- {
- try
- {
- field.set(target, value == null || (value.equals(Any.VOID)) ? PropertyNames.EMPTY_STRING : value.toString());
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- }
- }
- }
-
- private static class SimpleFieldValue extends FieldValue
- {
-
- public SimpleFieldValue(Field f)
- {
- super(f);
- }
- /* (non-Javadoc)
- * @see com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object)
- */
-
- public Object get(Object target)
- {
- try
- {
- if (target == null)
- {
- if (field.getType().equals(String.class))
- {
- return PropertyNames.EMPTY_STRING;
- }
- if (field.getType().equals(Short.class))
- {
- return Short.valueOf((short) 0);
- }
- if (field.getType().equals(Integer.class))
- {
- return 0;
- }
- if (field.getType().equals(short[].class))
- {
- return new short[0];
- }
- else
- {
- return null;
- }
- }
- else
- {
- return field.get(target);
- }
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- return null;
- }
- }
-
- public void set(Object value, Object target)
- {
- try
- {
- field.set(target, value);
- }
- catch (IllegalAccessException ex)
- {
- ex.printStackTrace();
- }
- }
- }
-
- private static double toDouble(Object value)
- {
- if (value instanceof Boolean)
- {
- return ((Boolean) value).booleanValue() ? 1 : 0;
- }
- else if (value instanceof Number)
- {
- return ((Number) value).doubleValue();
- }
- else if (value instanceof String)
- {
- return Double.parseDouble((String) value);
- }
- else if (value instanceof short[])
- {
- return ((short[]) value).length == 0 ? 0 : ((short[]) value)[0];
- }
- else
- {
- throw new IllegalArgumentException("Can't convert value to double." + value.getClass().getName());
- }
- }
-
- private static boolean toBoolean(Object value)
- {
- if (value instanceof Boolean)
- {
- return ((Boolean) value).booleanValue();
- }
- else if (value instanceof Number)
- {
- return ((Number) value).intValue() != 0;
- }
- else if (value instanceof String)
- {
- return value.equals(TRUE);
- }
- else if (value instanceof short[])
- {
- return ((short[]) value).length != 0 && ((short[]) value)[0] != 0;
- }
- else
- {
- throw new IllegalArgumentException("Can't convert value to boolean." + value.getClass().getName());
- }
- }
-
- private static int toInt(boolean b)
- {
- return b ? 1 : 0;
- }
-
- private static short[] toShortArray(double i)
- {
- return new short[]
- {
- (short) i
- };
- }
-
- private static Number toNumber(double i, Class<?> c)
- {
- if (c.equals(Integer.class))
- {
- return Integer.valueOf((int) i);
- }
- else if (c.equals(Short.class))
- {
- return Short.valueOf((short) i);
- }
- else if (c.equals(Double.class))
- {
- return new Double(i);
- }
- else
- {
- throw new IllegalArgumentException("Cannot convert to the given Number type.");
- }
- }
-}
diff --git a/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java b/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java
index d9c2c07b292f..7905c316f6bc 100644
--- a/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java
+++ b/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java
@@ -93,9 +93,6 @@ public class Main {
else
{
currentOpt = o;
- if (!o.bHasValue) {
- o.bSet = true;
- }
break;
}
}
@@ -188,9 +185,6 @@ class Option {
String sShort;
boolean bHasValue;
Object value;
- //indicates if this option was set if it does not need a value. Otherwise value
- //is set.
- boolean bSet;
}