From 78155803fd8f1e7d6eb9f0af390a4a928d2fb9cd Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Thu, 19 Nov 2009 09:03:57 +0100 Subject: dba33d: #i102563# use rootURL to resolve the given URI and some refactoring --- .../star/report/pentaho/model/ReportElement.java | 108 ++++++++++----------- 1 file changed, 52 insertions(+), 56 deletions(-) (limited to 'reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java') diff --git a/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java b/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java index df1de0154e6a..a3c9838be19d 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - - package com.sun.star.report.pentaho.model; import java.util.ArrayList; @@ -47,69 +45,67 @@ import java.util.List; */ public abstract class ReportElement extends Element { - private final List formatConditions; - protected ReportElement() - { - formatConditions = new ArrayList(); - } + private final List formatConditions; - /** - * Checks the current group and prints this element only if the current row is - * the first row for that particular group. - * - * @return true, if the element should only be printed in the first row of the - * current group, false otherwise. - */ - public boolean isPrintWhenGroupChanges() - { - return OfficeToken.TRUE.equals(getAttribute - (OfficeNamespaces.OOREPORT_NS, "print-when-group-changes")); - } + protected ReportElement() + { + formatConditions = new ArrayList(); + } - public void setPrintWhenGroupChanges(final boolean printWhenGroupChanges) - { - setAttribute(OfficeNamespaces.OOREPORT_NS, "print-when-group-changes", - String.valueOf(printWhenGroupChanges)); - } + /** + * Checks the current group and prints this element only if the current row is + * the first row for that particular group. + * + * @return true, if the element should only be printed in the first row of the + * current group, false otherwise. + */ + public boolean isPrintWhenGroupChanges() + { + return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "print-when-group-changes")); + } - /** - * Checks, whether the printed value has been changed since the last run. The - * element will only be printed, if there was at least one change. - * - * @return true, if repeated values should be printed, false if repeated - * values should be surpressed. - */ - public boolean isPrintRepeatedValues() - { - return OfficeToken.TRUE.equals(getAttribute - (OfficeNamespaces.OOREPORT_NS, "print-repeated-values")); - } + public void setPrintWhenGroupChanges(final boolean printWhenGroupChanges) + { + setAttribute(OfficeNamespaces.OOREPORT_NS, "print-when-group-changes", + String.valueOf(printWhenGroupChanges)); + } - public void setPrintRepeatedValues(final boolean printRepeatedValues) - { - setAttribute(OfficeNamespaces.OOREPORT_NS, "print-repeated-values", - String.valueOf(printRepeatedValues)); - } + /** + * Checks, whether the printed value has been changed since the last run. The + * element will only be printed, if there was at least one change. + * + * @return true, if repeated values should be printed, false if repeated + * values should be surpressed. + */ + public boolean isPrintRepeatedValues() + { + return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "print-repeated-values")); + } - public void addFormatCondition(final FormatCondition formatCondition) - { - if (formatCondition == null) + public void setPrintRepeatedValues(final boolean printRepeatedValues) { - throw new NullPointerException(); + setAttribute(OfficeNamespaces.OOREPORT_NS, "print-repeated-values", + String.valueOf(printRepeatedValues)); } - this.formatConditions.add(formatCondition); - } + public void addFormatCondition(final FormatCondition formatCondition) + { + if (formatCondition == null) + { + throw new NullPointerException(); + } + + this.formatConditions.add(formatCondition); + } - public FormatCondition[] getFormatConditions () - { - return (FormatCondition[]) this.formatConditions.toArray - (new FormatCondition[this.formatConditions.size()]); - } + public FormatCondition[] getFormatConditions() + { + return (FormatCondition[]) this.formatConditions.toArray(new FormatCondition[this.formatConditions.size()]); + } - public int getFormatConditionCount () - { - return formatConditions.size(); - } + public int getFormatConditionCount() + { + return formatConditions.size(); + } } -- cgit