summaryrefslogtreecommitdiffstats
path: root/reportbuilder
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-13 10:08:31 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 10:24:10 +0200
commit34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch)
tree4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /reportbuilder
parentWe seem to need the tdoc UCP for saving (diff)
downloadcore-34bcf9b498bccb5c924f4cec850ff15d88df6f07.tar.gz
core-34bcf9b498bccb5c924f4cec850ff15d88df6f07.zip
java: remove dead methods
found by UCDetector Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/Jar_reportbuilder.mk3
-rw-r--r--reportbuilder/java/org/libreoffice/report/ImageService.java13
-rw-r--r--reportbuilder/java/org/libreoffice/report/InputRepository.java2
-rw-r--r--reportbuilder/java/org/libreoffice/report/JobProgressIndicator.java69
-rw-r--r--reportbuilder/java/org/libreoffice/report/OutputRepository.java2
-rw-r--r--reportbuilder/java/org/libreoffice/report/ParameterMap.java27
-rw-r--r--reportbuilder/java/org/libreoffice/report/ReportAddIn.java36
-rw-r--r--reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java25
-rw-r--r--reportbuilder/java/org/libreoffice/report/ReportExpression.java42
-rw-r--r--reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java14
-rw-r--r--reportbuilder/java/org/libreoffice/report/ReportJob.java23
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java6
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java18
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java32
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java3
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java10
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java7
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java5
18 files changed, 25 insertions, 312 deletions
diff --git a/reportbuilder/Jar_reportbuilder.mk b/reportbuilder/Jar_reportbuilder.mk
index 4dd30307471e..325a1029f897 100644
--- a/reportbuilder/Jar_reportbuilder.mk
+++ b/reportbuilder/Jar_reportbuilder.mk
@@ -46,16 +46,13 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/ImageService \
reportbuilder/java/org/libreoffice/report/InputRepository \
reportbuilder/java/org/libreoffice/report/JobDefinitionException \
- reportbuilder/java/org/libreoffice/report/JobProgressIndicator \
reportbuilder/java/org/libreoffice/report/JobProperties \
reportbuilder/java/org/libreoffice/report/OfficeToken \
reportbuilder/java/org/libreoffice/report/OutputRepository \
reportbuilder/java/org/libreoffice/report/ParameterMap \
- reportbuilder/java/org/libreoffice/report/ReportAddIn \
reportbuilder/java/org/libreoffice/report/ReportEngineMetaData \
reportbuilder/java/org/libreoffice/report/ReportEngineParameterNames \
reportbuilder/java/org/libreoffice/report/ReportExecutionException \
- reportbuilder/java/org/libreoffice/report/ReportExpression \
reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData \
reportbuilder/java/org/libreoffice/report/ReportJob \
reportbuilder/java/org/libreoffice/report/ReportJobDefinition \
diff --git a/reportbuilder/java/org/libreoffice/report/ImageService.java b/reportbuilder/java/org/libreoffice/report/ImageService.java
index 91037841d416..e7d484bea58d 100644
--- a/reportbuilder/java/org/libreoffice/report/ImageService.java
+++ b/reportbuilder/java/org/libreoffice/report/ImageService.java
@@ -24,11 +24,7 @@ import java.io.InputStream;
public interface ImageService
{
- /**
- * @param image
- * @return the mime-type of the image as string.
- */
- String getMimeType(final InputStream image) throws ReportExecutionException;
+
/**
* @param image
@@ -36,12 +32,7 @@ public interface ImageService
*/
String getMimeType(final byte[] image) throws ReportExecutionException;
- /**
- * @param image
- * @returns the dimension in 100th mm.
- * @throws ReportExecutionException
- **/
- Size getImageSize(final InputStream image) throws ReportExecutionException;
+
/**
* @param image
diff --git a/reportbuilder/java/org/libreoffice/report/InputRepository.java b/reportbuilder/java/org/libreoffice/report/InputRepository.java
index bbaec3eaafe2..858210694bbe 100644
--- a/reportbuilder/java/org/libreoffice/report/InputRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/InputRepository.java
@@ -64,7 +64,7 @@ public interface InputRepository
*/
long getVersion(final String name);
- boolean exists(final String name);
+
boolean isReadable(final String name);
diff --git a/reportbuilder/java/org/libreoffice/report/JobProgressIndicator.java b/reportbuilder/java/org/libreoffice/report/JobProgressIndicator.java
deleted file mode 100644
index 2f51de5fae7a..000000000000
--- a/reportbuilder/java/org/libreoffice/report/JobProgressIndicator.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;
-
-/**
- * Based on
- * http://api.libreoffice.org/docs/common/ref/com/sun/star/task/XStatusIndicator.html
- *
- */
-public interface JobProgressIndicator
-{
-
- /**
- * Updates the progress description.
- *
- * @param string the new description
- */
- void setText(String string);
-
- /**
- * Initializes the progress indicator and sets the progress description to
- * the text given in the parameter <code>text</code>. The progress values
- * passed to this indicator will not exceed the given <code>maxValue</code>.
- * The value range of this indicator is set to 0 to <code>maxValue</code>
- * Stopped indicators must ignore that call.
- *
- * @param string the progress description
- * @param text
- * @param maxValue the maximum value
- * @see JobProgressIndicator#setText(String)
- */
- void start(String text, int maxValue);
-
- /**
- * Updates the value to the specified value. Invalid values must be ignored.
- * Stopped indicators must ignore that call.
- *
- * @param value the new value that should be shown now. This must fit the
- * range [0..maxValue] as defined in {@link JobProgressIndicator#start(String, int)}.
- */
- void setValue(int value);
-
- /**
- * Stop the progress. A progress indicator cannot be destructed before end()
- * has been called.
- */
- void end();
-
- /**
- * Clear progress value and description. Calling of setValue(0) and
- * setText("") should do the same. Stopped indicators must ignore this call.
- */
- void reset();
-}
diff --git a/reportbuilder/java/org/libreoffice/report/OutputRepository.java b/reportbuilder/java/org/libreoffice/report/OutputRepository.java
index ae1653225401..b7be98d4dd8a 100644
--- a/reportbuilder/java/org/libreoffice/report/OutputRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/OutputRepository.java
@@ -55,7 +55,7 @@ public interface OutputRepository
boolean existsStorage(final String name);
- boolean isWritable(final String name);
+
void closeOutputRepository();
}
diff --git a/reportbuilder/java/org/libreoffice/report/ParameterMap.java b/reportbuilder/java/org/libreoffice/report/ParameterMap.java
index c1d8fae9a931..4facd66ef260 100644
--- a/reportbuilder/java/org/libreoffice/report/ParameterMap.java
+++ b/reportbuilder/java/org/libreoffice/report/ParameterMap.java
@@ -19,17 +19,6 @@ package org.libreoffice.report;
public interface ParameterMap
{
-
- /**
- * 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);
-
/**
* Retrieves the value stored for a key in this properties collection.
*
@@ -39,21 +28,5 @@ public interface ParameterMap
*/
Object get(final String 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.
- */
- Object get(final String key, final Object defaultValue);
-
String[] keys();
-
- void clear();
-
- int size();
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportAddIn.java b/reportbuilder/java/org/libreoffice/report/ReportAddIn.java
deleted file mode 100644
index 60c15b80d5a1..000000000000
--- a/reportbuilder/java/org/libreoffice/report/ReportAddIn.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;
-
-/**
- * A report add-in defines a set of expressions, which can
- * be used in the reporting.
- *
- * Each expression must provide meta-data to support GUI implementors.
- * Expressions are assumed to be statefull, if they are not, they are
- * free to be implemented as stateless expression.
- */
-public interface ReportAddIn
-{
-
- int getExpressionCount();
-
- ReportExpression createExpression(int expression);
-
- ReportExpressionMetaData getMetaData(int expression);
-}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java b/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java
index f38693b9bfcf..d99b2da9bc8d 100644
--- a/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java
+++ b/reportbuilder/java/org/libreoffice/report/ReportEngineMetaData.java
@@ -20,28 +20,15 @@ package org.libreoffice.report;
public interface ReportEngineMetaData
{
- /**
- * 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.
- *
- * @param mimeType
- * @return true, if the output type is supported; false otherwise.
- */
- boolean isOutputSupported(String mimeType);
-
- /**
- * 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.
- */
- String[] getOutputParameters(String mimeType);
+
+
+
Class getParameterType(String parameter);
- boolean isMandatory(String parameter);
- boolean isEnumeration(String parameter);
- Object[] getEnumerationValues(String parameter);
+
+
+
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportExpression.java b/reportbuilder/java/org/libreoffice/report/ReportExpression.java
deleted file mode 100644
index d9fdeb2d4b64..000000000000
--- a/reportbuilder/java/org/libreoffice/report/ReportExpression.java
+++ /dev/null
@@ -1,42 +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;
-
-/**
- * Expressions are simple computation components.
- *
- * Expressions are always assumed to be immutable. They are not allowed to
- * change their state and it is not guaranteed, in which order they get called.
- * If the expression has been called before, the last computed value will be
- * available from the datarow.
- *
- * This construct allows us to write expressions in the form
- * "Sum := Sum + Column".
- *
- * Multiple calls to getValue on the same expression instance must return the
- * same value (assuming that the datarow passed in is the same).
- */
-public interface ReportExpression
-{
-
- void setParameters(Object[] parameters);
-
- Object getParameters();
-
- Object getValue(DataRow row);
-}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java b/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
index b4c359e5502c..3b58c7a8ce11 100644
--- a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
+++ b/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
@@ -22,17 +22,17 @@ import java.util.Locale;
public interface ReportExpressionMetaData
{
- int getParameterCount();
- String getParameterName(int param);
- String getParameterDisplayName(int param, Locale locale);
- String getParameterDescription(int param, Locale locale);
- String getName();
- String getDisplayName(Locale l);
- String getDescription(Locale l);
+
+
+
+
+
+
+
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportJob.java b/reportbuilder/java/org/libreoffice/report/ReportJob.java
index 1bbcdec436ee..450845155ff1 100644
--- a/reportbuilder/java/org/libreoffice/report/ReportJob.java
+++ b/reportbuilder/java/org/libreoffice/report/ReportJob.java
@@ -55,27 +55,4 @@ public interface ReportJob
void execute()
throws ReportExecutionException, IOException;
- /**
- * Interrupt the job.
- */
- void interrupt();
-
- /**
- * Queries the jobs execution status.
- *
- * @return true, if the job is currently running, false otherwise.
- */
- boolean isRunning();
-
- /**
- * Queries the jobs result status.
- *
- * @return true, if the job is finished (or has been interrupted), false
- * if the job waits for activation.
- */
- boolean isFinished();
-
- void addProgressIndicator(JobProgressIndicator indicator);
-
- void removeProgressIndicator(JobProgressIndicator indicator);
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
index bbd915c87222..fc4e689dc844 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
@@ -17,8 +17,6 @@
*/
package org.libreoffice.report.pentaho;
-import org.libreoffice.report.ReportAddIn;
-import org.libreoffice.report.ReportExpression;
import org.libreoffice.report.ReportExpressionMetaData;
import org.libreoffice.report.pentaho.expressions.SumExpression;
@@ -26,14 +24,14 @@ 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 implements ReportAddIn
+public class PentahoReportAddIn
{
public PentahoReportAddIn()
{
}
- public ReportExpression createExpression(final int expression)
+ public SumExpression createExpression(final int expression)
{
return (expression == 0) ? new SumExpression() : null;
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
index b7c480467305..0a8586b56d2f 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
@@ -21,7 +21,6 @@ import org.libreoffice.report.DataSourceFactory;
import org.libreoffice.report.ImageService;
import org.libreoffice.report.InputRepository;
import org.libreoffice.report.JobDefinitionException;
-import org.libreoffice.report.JobProgressIndicator;
import org.libreoffice.report.JobProperties;
import org.libreoffice.report.OutputRepository;
import org.libreoffice.report.ParameterMap;
@@ -77,7 +76,6 @@ public class PentahoReportJob implements ReportJob
private static final Log LOGGER = LogFactory.getLog(PentahoReportJob.class);
private boolean finished;
- private final List<JobProgressIndicator> listeners;
private final DataSourceFactory dataSourceFactory;
private final OutputRepository outputRepository;
private final JobProperties jobProperties;
@@ -104,7 +102,6 @@ public class PentahoReportJob implements ReportJob
}
this.definition = definition;
- this.listeners = new ArrayList<JobProgressIndicator>();
this.jobProperties = definition.getProcessingParameters().copy();
this.dataSourceFactory = (DataSourceFactory) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY);
@@ -182,11 +179,6 @@ public class PentahoReportJob implements ReportJob
return tempReport;
}
- public void addProgressIndicator(final JobProgressIndicator indicator)
- {
- listeners.add(indicator);
- }
-
/**
* Interrupt the job.
*/
@@ -206,10 +198,7 @@ public class PentahoReportJob implements ReportJob
return finished;
}
- public void finish()
- {
- finished = true;
- }
+
/**
* Queries the jobs execution status.
@@ -221,11 +210,6 @@ public class PentahoReportJob implements ReportJob
return !finished;
}
- public void removeProgressIndicator(final JobProgressIndicator indicator)
- {
- listeners.remove(indicator);
- }
-
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/SOReportJobFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
index b3648efa469c..b21faf5731ae 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
@@ -383,37 +383,5 @@ public class SOReportJobFactory
}
}
- /**
- * Gives a factory for creating the service. This method is called by the <code>JavaLoader</code>
- * <p/>
- *
- * @param sImplName the name of the implementation for which a service is desired
- * @return returns a <code>XSingleComponentFactory</code> for creating the component
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleComponentFactory __getComponentFactory(final String sImplName)
- {
- XSingleComponentFactory xFactory = null;
- try
- {
- if (sImplName.equals(_SOReportJobFactory.class.getName()))
- {
- xFactory = Factory.createComponentFactory(_SOReportJobFactory.class, _SOReportJobFactory.getServiceNames());
- }
- else if (sImplName.equals(SOFunctionManager.class.getName()))
- {
- xFactory = Factory.createComponentFactory(SOFunctionManager.class, SOFunctionManager.getServiceNames());
- }
- else if (sImplName.equals(SOFormulaParser.class.getName()))
- {
- xFactory = Factory.createComponentFactory(SOFormulaParser.class, SOFormulaParser.getServiceNames());
- }
- }
- catch (java.lang.IncompatibleClassChangeError e2)
- {
- }
-
- return xFactory;
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
index d724010ef17a..9158ce13cd69 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
@@ -18,9 +18,8 @@
package org.libreoffice.report.pentaho.expressions;
import org.libreoffice.report.DataRow;
-import org.libreoffice.report.ReportExpression;
-public class SumExpression implements ReportExpression
+public class SumExpression
{
private Object[] parameters;
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
index 91cf767eab2d..6512d715852c 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
@@ -69,13 +69,7 @@ public class ImageElementContext
colStyles[pos] = styleName;
}
- public String getRowStyle(final int pos)
- {
- return rowStyles[pos];
- }
- public String getColStyle(final int pos)
- {
- return colStyles[pos];
- }
+
+
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
index 4bb380eea236..961206a95590 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
@@ -68,12 +68,7 @@ public class VariablesCollection
return namePrefix;
}
- public String addVariable(final FormattedTextElement element)
- {
- variables.add(element);
- final int size = variables.size();
- return namePrefix + size;
- }
+
public FormattedTextElement[] getVariables()
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java
index a248ce5a4ce1..8d8d1b078767 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StyleMapper.java
@@ -22,8 +22,5 @@ import org.jfree.layouting.input.style.CSSDeclarationRule;
public interface StyleMapper
{
- void updateStyle(final String uri,
- final String attrName,
- final String attrValue,
- final CSSDeclarationRule targetRule);
+
}