summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2008-11-19 18:02:36 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2008-11-19 18:02:36 +0000
commit46afc9fc433c262c34b2fa7f8a04e1b6532953a4 (patch)
tree9238fb619d419eadbe79e6075ac30bb504106d53
parent0e8ff6898609c3291ec605f8e97450fb2735290a (diff)
CWS-TOOLING: integrate CWS dba301a_DEV300
-rw-r--r--reportdesign/java/com/sun/star/report/SDBCReportData.java7
-rwxr-xr-xreportdesign/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java2
-rw-r--r--reportdesign/java/com/sun/star/report/pentaho/output/StyleUtilities.java2
3 files changed, 8 insertions, 3 deletions
diff --git a/reportdesign/java/com/sun/star/report/SDBCReportData.java b/reportdesign/java/com/sun/star/report/SDBCReportData.java
index 829a60ad59c8..5107d8ebf427 100644
--- a/reportdesign/java/com/sun/star/report/SDBCReportData.java
+++ b/reportdesign/java/com/sun/star/report/SDBCReportData.java
@@ -32,6 +32,7 @@ package com.sun.star.report;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XNameAccess;
import com.sun.star.lang.IndexOutOfBoundsException;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.sdb.XParametersSupplier;
@@ -43,6 +44,7 @@ import com.sun.star.sdbc.XResultSetMetaData;
import com.sun.star.sdbc.XResultSetMetaDataSupplier;
import com.sun.star.sdbc.XRow;
import com.sun.star.sdbc.XRowSet;
+import com.sun.star.sdbcx.XColumnsSupplier;
import com.sun.star.uno.Any;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.DateTime;
@@ -81,6 +83,9 @@ public class SDBCReportData implements DataSource
parameters = xSuppParams.getParameters();
}
+ final XColumnsSupplier columnsSup = (XColumnsSupplier)UnoRuntime.queryInterface(XColumnsSupplier.class, rowSet);
+ final XNameAccess columns = columnsSup.getColumns();
+ final String[] columnNamesList = columns.getElementNames();
final XResultSetMetaDataSupplier sup = (XResultSetMetaDataSupplier) UnoRuntime.queryInterface(XResultSetMetaDataSupplier.class, rowSet);
final XResultSetMetaData resultSetMetaData = sup.getMetaData();
@@ -96,7 +101,7 @@ public class SDBCReportData implements DataSource
{
if (i < firstParameterIndex)
{
- columnNames[i - 1] = resultSetMetaData.getColumnName(i);
+ columnNames[i - 1] = columnNamesList[i - 1];// resultSetMetaData.getColumnName(i);
columnTypes[i - 1] = resultSetMetaData.getColumnType(i);
}
else
diff --git a/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java b/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
index 9aeb6df43cb2..c2a0b67c0832 100755
--- a/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
+++ b/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java
@@ -136,7 +136,7 @@ public class FormatValueUtility
{
if (dateFormat == null)
{
- dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss'.'S'Z'");
+ dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'S'Z'");
}
return dateFormat.format(date);
}
diff --git a/reportdesign/java/com/sun/star/report/pentaho/output/StyleUtilities.java b/reportdesign/java/com/sun/star/report/pentaho/output/StyleUtilities.java
index 1697e3eeee71..cbbec25c5d0e 100644
--- a/reportdesign/java/com/sun/star/report/pentaho/output/StyleUtilities.java
+++ b/reportdesign/java/com/sun/star/report/pentaho/output/StyleUtilities.java
@@ -552,7 +552,7 @@ public class StyleUtilities
final String prop = (String) propertyName.get(j);
final Object obj = section.getAttribute(ns, prop);
final Object value = propertyValues.get(j);
- if (obj == null && value == null)
+ if (obj == null || value == null)
{
continue;
}