User: kz      
Date: 2008-05-05 15:12:03+0000
Modified:
   
dba/reportdesign/java/com/sun/star/report/pentaho/parser/rpt/FormatConditionReadHandler.java

Log:
 INTEGRATION: CWS dba30beta (1.4.6); FILE MERGED
 2008/04/22 10:30:31 oj 1.4.6.1: #i88503# merge changes from rptchart02

File Changes:

Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/parser/rpt/
=========================================================================

File [changed]: FormatConditionReadHandler.java
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/parser/rpt/FormatConditionReadHandler.java?r1=1.4&r2=1.5
Delta lines:  +7 -5
-------------------
--- FormatConditionReadHandler.java     2008-04-10 17:47:38+0000        1.4
+++ FormatConditionReadHandler.java     2008-05-05 15:12:00+0000        1.5
@@ -32,6 +32,7 @@
 import com.sun.star.report.pentaho.model.FormatCondition;
 import com.sun.star.report.pentaho.model.ReportElement;
 import com.sun.star.report.pentaho.OfficeNamespaces;
+import com.sun.star.report.OfficeToken;
 import org.jfree.report.expressions.FormulaExpression;
 import org.jfree.xmlns.parser.AbstractXmlReadHandler;
 import org.jfree.xmlns.parser.ParseException;
@@ -46,7 +47,7 @@
 public class FormatConditionReadHandler extends AbstractXmlReadHandler
 {
 
-    private ReportElement element;
+    private final ReportElement element;
 
     public FormatConditionReadHandler(final ReportElement element)
     {
@@ -60,8 +61,7 @@
     protected void startParsing(final Attributes attrs) throws SAXException
     {
         super.startParsing(attrs);
-        final String enabledText = 
attrs.getValue(OfficeNamespaces.OOREPORT_NS, "enabled");
-        final boolean enabled = (enabledText == null || 
"true".equals(enabledText));
+        
 
         final String formula =
                 attrs.getValue(OfficeNamespaces.OOREPORT_NS, "formula");
@@ -70,7 +70,7 @@
             throw new ParseException("Required attribute 'formula' is 
missing.", getLocator());
         }
         final String stylename =
-                attrs.getValue(OfficeNamespaces.OOREPORT_NS, "style-name");
+                attrs.getValue(OfficeNamespaces.OOREPORT_NS, 
OfficeToken.STYLE_NAME);
         if (stylename == null)
         {
             throw new ParseException("Required attribute 'style-name' is 
missing.", getLocator());
@@ -78,6 +78,8 @@
         final FormulaExpression valueExpression = new FormulaExpression();
         valueExpression.setFormula(formula);
 
+        final String enabledText = 
attrs.getValue(OfficeNamespaces.OOREPORT_NS, "enabled");
+        final boolean enabled = (enabledText == null || 
OfficeToken.TRUE.equals(enabledText));
         final FormatCondition formatCondition =
                 new FormatCondition(valueExpression, stylename, enabled);
         element.addFormatCondition(formatCondition);




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to