[ooo-build-commit] Branch 'ooo/master' - 2 commits - reportbuilder/java sdext/source

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Jul 6 17:21:33 PDT 2009


 reportbuilder/java/com/sun/star/report/pentaho/configuration.properties                                  |    1 
 reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java                   |   47 +++++++---
 reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesDeclarationLayoutController.java |    4 
 reportbuilder/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java                     |    2 
 sdext/source/pdfimport/xpdfwrapper/makefile.mk                                                           |    4 
 sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx                                                         |    6 +
 6 files changed, 49 insertions(+), 15 deletions(-)

New commits:
commit 00c5facf99ac7ea453fb0e40f29e98e51f42d3fe
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Jul 6 10:00:32 2009 +0000

    #i102679# build fix

diff --git a/sdext/source/pdfimport/xpdfwrapper/makefile.mk b/sdext/source/pdfimport/xpdfwrapper/makefile.mk
index 796bef0..f45840d 100644
--- a/sdext/source/pdfimport/xpdfwrapper/makefile.mk
+++ b/sdext/source/pdfimport/xpdfwrapper/makefile.mk
@@ -41,6 +41,10 @@ EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 
 .INCLUDE: settings.mk
 
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CFLAGS+=-DSYSTEM_ZLIB
+.ENDIF
+
 .IF "$(ENABLE_PDFIMPORT)" == "NO"
 @all:
     @echo "PDF Import extension disabled."
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index f9e1be2..e0574c7 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -30,7 +30,11 @@
 
 #include "pnghelper.hxx"
 
-#include "zlib/zlib.h"
+#ifdef SYSTEM_ZLIB
+#include "zlib.h"
+#else
+#include <zlib/zlib.h>
+#endif
 
 using namespace pdfi;
 
commit 6f7c254df0cbc39be19f3dbb43bbf1f3bdd9766b
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Mon Jul 6 09:00:26 2009 +0000

    CWS-TOOLING: integrate CWS dba32d
    2009-06-30 08:58:13 +0200 fs  r273488 : merging latest changes from CWS dba32c
    2009-06-29 11:40:42 +0200 oj  r273459 : #i101652# fix token handling
    2009-06-26 09:27:30 +0200 oj  r273394 : #i101994# wrong condition checked
    2009-06-22 12:09:04 +0200 fs  r273210 : merging latest changes from CWS dba32c
    2009-06-18 11:01:06 +0200 fs  r273108 : merge latest changes from CWS dba32c
    2009-06-17 14:19:33 +0200 oj  r273072 : handle images at the correct position
    2009-06-17 13:37:19 +0200 oj  r273067 : compile error
    2009-06-17 13:35:58 +0200 oj  r273066 : #i102201# handle images
    2009-06-17 13:27:21 +0200 oj  r273065 : #i80917# disable checkbox for internal copy
    2009-06-17 13:25:38 +0200 oj  r273064 : #i80917# disable checkbox for internal copy
    2009-06-15 12:59:16 +0200 fs  r272978 : merging latest changes from CWS dba32c
    2009-06-15 10:45:58 +0200 fs  r272967 : CWS-TOOLING: rebase CWS dba32d to trunk at 272827 (milestone: DEV300:m50)
    2009-06-15 08:41:05 +0200 fs  r272960 : merging changes from CWS dba32c (resulting from rebasing dba32c to m50)
    2009-06-03 12:22:32 +0200 fs  r272554 : merging latest changes from CWS dba32c
    2009-06-03 11:11:27 +0200 fs  r272549 : #i100818# special treatment for DataAwareness not needed anymore
    2009-06-03 11:07:01 +0200 fs  r272548 : #i10000# removed package declaration
    2009-06-03 09:21:03 +0200 oj  r272537 : #i93465# save window states
    2009-06-03 08:56:25 +0200 oj  r272535 : solve compiler warnings
    2009-06-03 08:55:02 +0200 oj  r272534 : #i102295# export shapes i the first cell
    2009-06-03 07:35:18 +0200 oj  r272533 : #i101994# check for - and + prefix
    2009-06-03 06:51:38 +0200 oj  r272531 : #i101463# use uncomposed table name
    2009-06-03 06:33:06 +0200 oj  r272530 : #i102019# word corrected
    2009-06-02 14:58:28 +0200 fs  r272507 : #i102443# call initializeParser from LoadFinished
    2009-06-02 14:30:10 +0200 oj  r272504 : #i102019# introduce static ints
    2009-06-02 13:51:02 +0200 oj  r272501 : #i102439# wrong method used
    2009-06-02 13:44:09 +0200 fs  r272500 : #i102440# when tampering with Order/GroupBy, reset the cached columns
    2009-06-02 10:53:01 +0200 fs  r272487 : #i102234# preserve the original filter when using a 0=1 filter
    2009-06-02 10:21:21 +0200 oj  r272486 : #i100535# handle time values as float
    2009-06-02 10:19:07 +0200 fs  r272485 : merging latest changes from CWS dba32c
    2009-05-29 16:00:15 +0200 fs  r272467 : merging latest changes from dba32c
    2009-05-29 15:31:25 +0200 fs  r272462 : merging latest changes from dba32c
    2009-05-29 10:58:03 +0200 oj  r272438 : #101135# export embedded-text
    2009-05-29 08:17:57 +0200 oj  r272431 : #i80917# make attribute not optional
    2009-05-29 08:17:32 +0200 oj  r272430 : remoe unused token
    2009-05-29 07:17:15 +0200 oj  r272429 : #i80917# make attribute not optional
    2009-05-28 12:48:14 +0200 oj  r272401 : #i102201# insert images in context menu
    2009-05-28 12:47:44 +0200 oj  r272400 : #i80917# add new attribute to handle first line
    2009-05-28 12:16:12 +0200 oj  r272397 : #i96134# add / to path when it doesn't exist
    2009-05-28 12:11:08 +0200 oj  r272390 : #i80917# add new attribute to handle first line
    2009-05-28 11:33:35 +0200 oj  r272388 : #i101652# add new checkbox to handle header line as column names
    2009-05-28 11:30:15 +0200 oj  r272387 : #i101652# add localize
    2009-05-28 11:15:53 +0200 oj  r272386 : merge from dba32c
    2009-05-28 09:08:25 +0200 fs  r272378 : merged a build fix from CWS dba32c

diff --git a/reportbuilder/java/com/sun/star/report/pentaho/configuration.properties b/reportbuilder/java/com/sun/star/report/pentaho/configuration.properties
index 8af708e..186b856 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/configuration.properties
+++ b/reportbuilder/java/com/sun/star/report/pentaho/configuration.properties
@@ -140,6 +140,7 @@ com.sun.star.report.pentaho.output.namespace.oasis-data=urn:oasis:names:tc:opend
 com.sun.star.report.pentaho.output.default.oasis-data=allow
 com.sun.star.report.pentaho.output.tag.oasis-data.text=deny
 com.sun.star.report.pentaho.output.tag.oasis-data.currency-symbol=deny
+com.sun.star.report.pentaho.output.tag.oasis-data.embedded-text=deny
 
 com.sun.star.report.pentaho.output.namespace.oasis-draw=urn:oasis:names:tc:opendocument:xmlns:drawing:1.0
 com.sun.star.report.pentaho.output.default.oasis-draw=deny
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
index 432361e..ce48e04 100755
--- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
@@ -32,6 +32,7 @@ package com.sun.star.report.pentaho.layoutprocessor;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.sql.Time;
 
 import com.sun.star.report.pentaho.OfficeNamespaces;
 import com.sun.star.report.OfficeToken;
@@ -58,6 +59,7 @@ public class FormatValueUtility
 
     public static final String VALUE_TYPE = "value-type";
     private static SimpleDateFormat dateFormat;
+    private static SimpleDateFormat timeFormat;
 
     private FormatValueUtility()
     {
@@ -66,12 +68,24 @@ public class FormatValueUtility
     public static String applyValueForVariable(final Object value, final AttributeMap variableSection)
     {
         String ret = null;
-        if (value instanceof Date)
+        if (value instanceof Time)
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "time");
+            ret = formatTime((Time) value);
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "time-value", ret);
+        }
+        else if (value instanceof java.sql.Date )
         {
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "date");
             ret = formatDate((Date) value);
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", ret);
         }
+        else if (value instanceof Date)
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "float");
+            ret = HSSFDateUtil.getExcelDate((Date)value,false,2).toString();
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", ret);
+        }
         else if (value instanceof Number)
         {
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "float");
@@ -104,19 +118,20 @@ public class FormatValueUtility
 
     public static void applyValueForCell(final Object value, final AttributeMap variableSection,final String valueType)
     {
-        if (value instanceof Date )
+        if (value instanceof Time)
         {
-            if ( "date".equals(valueType) )
-            {
-                variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate((Date) value));
-            }
-            else
-            {
-                variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", String.valueOf(HSSFDateUtil.getExcelDate((Date)value)));
-            }
-            
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "time-value", formatTime((Time) value));
         }
-        else if (value instanceof Number )
+        else if (value instanceof java.sql.Date )
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate((Date) value));
+        }
+        else if (value instanceof Date)
+        {
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "float");
+            variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", HSSFDateUtil.getExcelDate((Date)value,false,2).toString());
+        }
+        else if (value instanceof Number)
         {
             variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "value", String.valueOf(value));
         }
@@ -166,6 +181,14 @@ public class FormatValueUtility
         }
         return dateFormat.format(date);
     }
+    private static synchronized String formatTime(final Date date)
+    {
+        if (timeFormat == null)
+        {
+            timeFormat = new SimpleDateFormat("'PT'HH'H'mm'M'ss'S'");
+        }
+        return timeFormat.format(date);
+    }
 
     public static DataFlags computeDataFlag(final FormattedTextElement element,
             final FlowController flowController)
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesDeclarationLayoutController.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesDeclarationLayoutController.java
index 075873e..c448d93 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesDeclarationLayoutController.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesDeclarationLayoutController.java
@@ -44,6 +44,7 @@ import org.jfree.report.flow.ReportTarget;
 import org.jfree.report.flow.layoutprocessor.AbstractLayoutController;
 import org.jfree.report.flow.layoutprocessor.LayoutController;
 import org.jfree.report.flow.layoutprocessor.LayoutControllerUtil;
+import org.pentaho.reporting.libraries.formula.util.HSSFDateUtil;
 import org.jfree.report.structure.Element;
 import java.util.Date;
 import java.text.SimpleDateFormat;
@@ -150,13 +151,14 @@ public class VariablesDeclarationLayoutController
     String formula = FormatValueUtility.applyValueForVariable(value, variableSection);
     if ( formula == null )
         formula = "" + value;
-    if (value instanceof Date)
+    if (value instanceof java.sql.Date)
     {
         final Date date = (Date)value;
         final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy;MM;dd");
         formula = "Date(" + dateFormat.format(date) + ")";
     }
     variableSection.setAttribute(OfficeNamespaces.TEXT_NS, "formula", "ooow:" + formula);
+    
     return variableSection;
   }
 
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java b/reportbuilder/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java
index 3761768..014d36b 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/parser/data/DataStyleReadHandler.java
@@ -70,7 +70,7 @@ public class DataStyleReadHandler extends ElementReadHandler
     {
         if (OfficeNamespaces.DATASTYLE_NS.equals(uri) || OfficeNamespaces.STYLE_NS.equals(uri))
         {
-            final DataStyleReadHandler xrh = new DataStyleReadHandler("text".equals(tagName) || "currency-symbol".equals(tagName));
+            final DataStyleReadHandler xrh = new DataStyleReadHandler("text".equals(tagName) || "currency-symbol".equals(tagName) || "embedded-text".equals(tagName));
             children.add(xrh);
             return xrh;
         }


More information about the ooo-build-commit mailing list