From 68cd011c907d00493bf2bfde531c1e244819596b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 8 Aug 2014 12:44:57 +0200 Subject: java: reduce scope, make some methods private found by UCDetector Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e --- .../org/libreoffice/report/SDBCReportDataFactory.java | 2 +- .../java/org/libreoffice/report/StorageRepository.java | 2 +- .../libreoffice/report/pentaho/DefaultNameGenerator.java | 2 +- .../org/libreoffice/report/pentaho/PentahoReportJob.java | 2 +- .../report/pentaho/SOFormulaOpCodeMapper.java | 2 +- .../libreoffice/report/pentaho/SOReportJobFactory.java | 2 +- .../pentaho/output/OfficeDocumentReportTarget.java | 16 ++++++++-------- .../libreoffice/report/pentaho/output/StylesWriter.java | 4 ++-- .../pentaho/output/chart/ChartRawReportTarget.java | 2 +- .../spreadsheet/SpreadsheetRawReportProcessor.java | 2 +- .../output/spreadsheet/SpreadsheetRawReportTarget.java | 2 +- 11 files changed, 19 insertions(+), 19 deletions(-) (limited to 'reportbuilder') diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java index 9e8998978b06..bdf03b0323ce 100644 --- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java @@ -484,7 +484,7 @@ public class SDBCReportDataFactory implements DataSourceFactory return paramDef; } - void fillOrderStatement(final String command, + private void fillOrderStatement(final String command, final int commandType, final Map parameters, final XConnectionTools tools, final XPropertySet rowSetProp) diff --git a/reportbuilder/java/org/libreoffice/report/StorageRepository.java b/reportbuilder/java/org/libreoffice/report/StorageRepository.java index d242b42d3899..dbb1266a3de6 100644 --- a/reportbuilder/java/org/libreoffice/report/StorageRepository.java +++ b/reportbuilder/java/org/libreoffice/report/StorageRepository.java @@ -217,7 +217,7 @@ public class StorageRepository implements InputRepository, OutputRepository throw new IOException(); } - final String shortenName(final String name) + private final String shortenName(final String name) { final String temp; if (name.startsWith("./")) diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/DefaultNameGenerator.java b/reportbuilder/java/org/libreoffice/report/pentaho/DefaultNameGenerator.java index ca69be4b63a6..6706426b25ca 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/DefaultNameGenerator.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/DefaultNameGenerator.java @@ -126,7 +126,7 @@ public class DefaultNameGenerator return newName; } - protected String getSuffixForType(final String mimeType) + private String getSuffixForType(final String mimeType) { if ("image/png".equals(mimeType)) { diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java index fc8b4ff4b2d1..b7c480467305 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java @@ -413,7 +413,7 @@ public class PentahoReportJob implements ReportJob } - protected ReportProcessor getProcessorForContentType(final String mimeType) + private ReportProcessor getProcessorForContentType(final String mimeType) throws ReportExecutionException { final ReportProcessor ret; diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaOpCodeMapper.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaOpCodeMapper.java index 80a7da82e57a..ff0aca9a308f 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaOpCodeMapper.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaOpCodeMapper.java @@ -133,7 +133,7 @@ public final class SOFormulaOpCodeMapper extends WeakBase * This method is a simple helper function to used in the static component initialisation functions as well as * in getSupportedServiceNames. */ - public static String[] getServiceNames() + private static String[] getServiceNames() { return new String[] { diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java index a67a3d026143..b3648efa469c 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java @@ -131,7 +131,7 @@ public class SOReportJobFactory * This method is a simple helper function to used in the static component initialisation functions as well as * in getSupportedServiceNames. */ - public static String[] getServiceNames() + private static String[] getServiceNames() { return new String[] { diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java index 98dfbf1b1ffd..8704a4e312cf 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java @@ -330,7 +330,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget return outputRepository; } - protected InputRepository getInputRepository() + private InputRepository getInputRepository() { return inputRepository; } @@ -494,7 +494,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget * * @return the processing state. */ - protected int getCurrentState() + private int getCurrentState() { if (states.isEmpty()) { @@ -779,7 +779,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget } } - protected void startBody(final AttributeMap attrs) + private void startBody(final AttributeMap attrs) throws IOException { getXmlWriter().writeTag(OfficeNamespaces.OFFICE_NS, "body", XmlWriterSupport.OPEN); @@ -822,7 +822,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget { } - protected void startGroupBody(final AttributeMap attrs) + private void startGroupBody(final AttributeMap attrs) { } @@ -993,7 +993,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget { } - protected void endGroupInstance(final AttributeMap attrs) + private void endGroupInstance(final AttributeMap attrs) { } @@ -1023,7 +1023,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget protected abstract void endContent(final AttributeMap attrs) throws IOException, DataSourceException, ReportProcessingException; - protected void endBody(final AttributeMap attrs) + private void endBody(final AttributeMap attrs) throws IOException { getXmlWriter().writeCloseTag(); @@ -1230,7 +1230,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget return attrList; } - protected String sanitizeName(final String name) + private String sanitizeName(final String name) { // A table name cannot contain spaces and should only contain // ascii-characters. @@ -1574,7 +1574,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget return null; } - protected CSSNumericValue computeColumnWidth(final String colStyle) + private CSSNumericValue computeColumnWidth(final String colStyle) { final OfficeStylesCollection contentStyles = getContentStylesCollection(); final OfficeStyle style = contentStyles.getStyle(OfficeToken.TABLE_COLUMN, colStyle); diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/StylesWriter.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/StylesWriter.java index 890958e219ae..4797d2ad4f65 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/StylesWriter.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/StylesWriter.java @@ -284,7 +284,7 @@ public class StylesWriter } } - protected AttributeList buildAttributeList(final AttributeMap attrs) + private AttributeList buildAttributeList(final AttributeMap attrs) { final AttributeList attrList = new AttributeList(); final String[] namespaces = attrs.getNameSpaces(); @@ -308,7 +308,7 @@ public class StylesWriter return attrList; } - protected boolean isFilteredNamespace(final String namespace) + private boolean isFilteredNamespace(final String namespace) { if (Namespaces.LIBLAYOUT_NAMESPACE.equals(namespace)) { diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java index 05ca93ad990e..ca4dbd9a9764 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java @@ -68,7 +68,7 @@ public class ChartRawReportTarget extends OfficeDocumentReportTarget return "application/vnd.oasis.opendocument.chart"; } - protected String getStartContent() + private String getStartContent() { return "chart"; } diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportProcessor.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportProcessor.java index 777fa20e9333..6283a6ce1856 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportProcessor.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportProcessor.java @@ -78,7 +78,7 @@ public class SpreadsheetRawReportProcessor extends AbstractReportProcessor this.dataSourceFactory = dataSourceFactory; } - protected ReportTarget createReportTarget(final ReportJob job) throws ReportProcessingException + private ReportTarget createReportTarget(final ReportJob job) throws ReportProcessingException { final ReportStructureRoot report = job.getReportStructureRoot(); final ResourceManager resourceManager = report.getResourceManager(); diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java index 8c4807c28ddb..44d33cd48bbf 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java @@ -719,7 +719,7 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget } } - protected String getStartContent() + private String getStartContent() { return "spreadsheet"; } -- cgit