Tag: cws_src680_oj14
User: fs      
Date: 2007-06-22 18:05:38+0000
Modified:
   dba/reportdesign/java/com/sun/star/report/pentaho/configuration.properties
   dba/reportdesign/java/com/sun/star/report/pentaho/output/StylesWriter.java
   
dba/reportdesign/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java
   
dba/reportdesign/java/com/sun/star/report/pentaho/parser/style/OfficeStylesReadHandler.java

Log:
 submitted by [EMAIL PROTECTED]: #i77039#

File Changes:

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

File [changed]: configuration.properties
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/configuration.properties?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +7 -3
-------------------
--- configuration.properties    2007-05-09 12:13:13+0000        1.1.2.1
+++ configuration.properties    2007-06-22 18:05:35+0000        1.1.2.2
@@ -4,9 +4,9 @@
 #
 #   $RCSfile: configuration.properties,v $
 #
-#   $Revision: 1.1.2.1 $
+#   $Revision: 1.1.2.2 $
 #
-#   last change: $Author: oj $ $Date: 2007/05/09 12:13:13 $
+#   last change: $Author: fs $ $Date: 2007/06/22 18:05:35 $
 #
 #   The Contents of this file are made available subject to
 #   the terms of GNU Lesser General Public License Version 2.1.
@@ -135,6 +135,10 @@
 
 com.sun.star.report.pentaho.output.tag.oasis-config.config-item=deny
 
+com.sun.star.report.pentaho.output.namespace.oasis-data=urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0
+com.sun.star.report.pentaho.output.default.oasis-data=allow
+com.sun.star.report.pentaho.output.tag.oasis-data.text=deny
+
 
 
org.jfree.report.flow.structure.com.sun.star.report.pentaho.model.FixedTextElement=com.sun.star.report.pentaho.layoutprocessor.FixedTextLayoutController
 
org.jfree.report.flow.structure.com.sun.star.report.pentaho.model.FormattedTextElement=com.sun.star.report.pentaho.layoutprocessor.FormattedTextLayoutController

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

File [changed]: StylesWriter.java
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/output/StylesWriter.java?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +9 -3
-------------------
--- StylesWriter.java   2007-05-09 12:30:29+0000        1.1.2.1
+++ StylesWriter.java   2007-06-22 18:05:35+0000        1.1.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: StylesWriter.java,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: oj $ $Date: 2007/05/09 12:30:29 $
+ *  last change: $Author: fs $ $Date: 2007/06/22 18:05:35 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -62,6 +62,7 @@
 import org.jfree.report.structure.Element;
 import org.jfree.report.structure.Node;
 import org.jfree.report.structure.Section;
+import org.jfree.report.structure.StaticText;
 import org.jfree.xmlns.common.AttributeList;
 import org.jfree.xmlns.writer.DefaultTagDescription;
 import org.jfree.xmlns.writer.XmlWriter;
@@ -278,6 +279,11 @@
         final RawText text = (RawText) node;
         xmlWriter.writeText(text.getText());
       }
+      else if (node instanceof StaticText)
+      {
+        final StaticText text = (StaticText) node;
+        xmlWriter.writeText(XmlWriterSupport.normalize(text.getText(), false));
+      }
     }
   }
 

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

File [changed]: DataStyleReadHandler.java
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +46 -15
---------------------
--- DataStyleReadHandler.java   2007-05-09 12:40:35+0000        1.1.2.1
+++ DataStyleReadHandler.java   2007-06-22 18:05:35+0000        1.1.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: DataStyleReadHandler.java,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: oj $ $Date: 2007/05/09 12:40:35 $
+ *  last change: $Author: fs $ $Date: 2007/06/22 18:05:35 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -38,23 +38,27 @@
 package com.sun.star.report.pentaho.parser.data;
 
 import java.util.ArrayList;
+
+import com.sun.star.report.pentaho.OfficeNamespaces;
+import com.sun.star.report.pentaho.model.DataStyle;
+import com.sun.star.report.pentaho.parser.ElementReadHandler;
 import org.jfree.report.structure.Element;
+import org.jfree.report.structure.StaticText;
 import org.jfree.xmlns.parser.XmlReadHandler;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
-import com.sun.star.report.pentaho.OfficeNamespaces;
-import com.sun.star.report.pentaho.model.DataStyle;
-import com.sun.star.report.pentaho.parser.ElementReadHandler;
 
 public class DataStyleReadHandler extends ElementReadHandler
 {
   private DataStyle dataStyle;
-  private ArrayList childs;
+  private ArrayList children;
+  private boolean hasCData;
 
-  public DataStyleReadHandler()
+  public DataStyleReadHandler(final boolean hasCData)
   {
+    this.hasCData = hasCData;
     this.dataStyle = new DataStyle();
-    this.childs = new ArrayList();
+    this.children = new ArrayList();
   }
 
   /**
@@ -72,26 +76,53 @@
   {
     if (OfficeNamespaces.DATASTYLE_NS.equals(uri))
     {
-      final DataStyleReadHandler xrh = new DataStyleReadHandler();
-      childs.add(xrh);
+      final DataStyleReadHandler xrh = new 
DataStyleReadHandler("text".equals(tagName));
+      children.add(xrh);
       return xrh;
     }
+
     return null;
   }
 
   /**
+   * This method is called to process the character data between element tags.
+   *
+   * @param ch     the character buffer.
+   * @param start  the start index.
+   * @param length the length.
+   * @throws org.xml.sax.SAXException if there is a parsing error.
+   */
+  public void characters(final char[] ch, final int start, final int length)
+      throws SAXException
+  {
+    if (hasCData)
+    {
+      children.add(new StaticText(new String(ch, start, length)));
+    }
+  }
+
+  /**
    * Done parsing.
    *
    * @throws org.xml.sax.SAXException if there is a parsing error.
    */
   protected void doneParsing() throws SAXException
   {
-    for (int i = 0; i < childs.size(); i++)
+    for (int i = 0; i < children.size(); i++)
     {
-      final ElementReadHandler handler = (ElementReadHandler) childs.get(i);
+      final Object o = children.get(i);
+      if (o instanceof ElementReadHandler)
+      {
+        final ElementReadHandler handler = (ElementReadHandler) o;
       dataStyle.addNode(handler.getElement());
     }
+      else if (o instanceof StaticText)
+      {
+        dataStyle.addNode((StaticText) o);
+      }
   }
+  }
+
 
   public DataStyle getDataStyle()
   {

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

File [changed]: OfficeStylesReadHandler.java
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/parser/style/OfficeStylesReadHandler.java?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +4 -4
-------------------
--- OfficeStylesReadHandler.java        2007-05-09 12:42:38+0000        1.1.2.1
+++ OfficeStylesReadHandler.java        2007-06-22 18:05:36+0000        1.1.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: OfficeStylesReadHandler.java,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: oj $ $Date: 2007/05/09 12:42:38 $
+ *  last change: $Author: fs $ $Date: 2007/06/22 18:05:36 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -95,7 +95,7 @@
     }
     else if (OfficeNamespaces.DATASTYLE_NS.equals(uri))
     {
-      final DataStyleReadHandler xrh = new DataStyleReadHandler();
+      final DataStyleReadHandler xrh = new DataStyleReadHandler(false);
       dataStyleChilds.add(xrh);
       return xrh;
     }




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

Reply via email to