diff options
12 files changed, 62 insertions, 12 deletions
diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index 6015156..91aee1b 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -35,6 +35,9 @@ #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/sdbcx/CompareBookmark.hpp> +#include <com/sun/star/sdbc/ResultSetConcurrency.hpp> +#include <com/sun/star/sdbc/ResultSetType.hpp> +#include <com/sun/star/sdbc/FetchDirection.hpp> #include <cppuhelper/typeprovider.hxx> #include <com/sun/star/lang/DisposedException.hpp> @@ -967,6 +970,7 @@ void SAL_CALL OResultSet::insertRow() MutexGuard aGuard(m_aMutex); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); // you only have to implement this if you want to insert new rows + mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::insertRow", *this); } /* }}} */ @@ -980,6 +984,7 @@ void SAL_CALL OResultSet::updateRow() checkDisposed(OResultSet_BASE::rBHelper.bDisposed); // only when you allow updates + mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::updateRow", *this); } /* }}} */ @@ -991,6 +996,7 @@ void SAL_CALL OResultSet::deleteRow() OSL_TRACE("OResultSet::deleteRow"); MutexGuard aGuard(m_aMutex); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); + mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::deleteRow", *this); } /* }}} */ @@ -1002,6 +1008,7 @@ void SAL_CALL OResultSet::cancelRowUpdates() OSL_TRACE("OResultSet::cancelRowUpdates"); MutexGuard aGuard(m_aMutex); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); + mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::cancelRowUpdates", *this); } /* }}} */ @@ -1015,6 +1022,7 @@ void SAL_CALL OResultSet::moveToInsertRow() checkDisposed(OResultSet_BASE::rBHelper.bDisposed); // only when you allow insert's + mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::moveToInsertRow", *this); } /* }}} */ @@ -1444,10 +1452,19 @@ void OResultSet::getFastPropertyValue(Any& _rValue, sal_Int32 nHandle) const _rValue <<= sal_False; break; case PROPERTY_ID_CURSORNAME: + break; case PROPERTY_ID_RESULTSETCONCURRENCY: + _rValue <<= ResultSetConcurrency::READ_ONLY; + break; case PROPERTY_ID_RESULTSETTYPE: + _rValue <<= ResultSetType::SCROLL_INSENSITIVE; + break; case PROPERTY_ID_FETCHDIRECTION: + _rValue <<= FetchDirection::FORWARD; + break; case PROPERTY_ID_FETCHSIZE: + _rValue <<= sal_Int32(50); + break; ; default: ; diff --git a/mysqlc/version.mk b/mysqlc/version.mk index e9bc649..5713d52 100644 --- a/mysqlc/version.mk +++ b/mysqlc/version.mk @@ -35,4 +35,4 @@ MYSQLC_TITLE=MySQL Connector # the status of the extension # if this is different from "final", it will be appended to the title displayed in the Extension Manager # and also added to the file name of the resulting .oxt file -MYSQLC_STATUS=Alpha +MYSQLC_STATUS=final diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java index 73561e5..d3f7017 100644 --- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java @@ -259,7 +259,17 @@ public class SDBCReportDataFactory implements DataSourceFactory if (!expression.startsWith(quote) && columns.hasByName(expression)) { - expression = quote + expression + quote; + XPropertySet column; + try + { + column = UnoRuntime.queryInterface(XPropertySet.class, columns.getByName(expression)); + expression = quote + column.getPropertyValue("TableName") + quote + "." + quote + expression + quote; + } + catch (Exception ex) + { + Logger.getLogger(SDBCReportDataFactory.class.getName()).log(Level.SEVERE, null, ex); + expression = quote + expression + quote; + } } expression = expression.trim(); // Trim away white spaces diff --git a/reportbuilder/java/com/sun/star/report/pentaho/OfficeNamespaces.java b/reportbuilder/java/com/sun/star/report/pentaho/OfficeNamespaces.java index 1ebfcd1..ddb5f88 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/OfficeNamespaces.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/OfficeNamespaces.java @@ -46,6 +46,7 @@ public class OfficeNamespaces public static final String DATASTYLE_NS = "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"; public static final String SVG_NS = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"; public static final String CHART_NS = "urn:oasis:names:tc:opendocument:xmlns:chart:1.0"; + public static final String CHARTOOO_NS = "http://openoffice.org/2010/chart"; public static final String DR3D_NS = "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"; public static final String MATHML_NS = "http://www.w3.org/1998/Math/MathML"; public static final String FORM_NS = "urn:oasis:names:tc:opendocument:xmlns:form:1.0"; @@ -58,6 +59,7 @@ public class OfficeNamespaces public static final String XSD_NS = "http://www.w3.org/2001/XMLSchema"; public static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance"; public static final String OOREPORT_NS = "http://openoffice.org/2005/report"; + public static final String GRDDL_NS = "http://www.w3.org/2003/g/data-view#"; public static final String CONFIG = "urn:oasis:names:tc:opendocument:xmlns:config:1.0"; /** * @deprecated 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 5f24370..57e8585 100755 --- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java @@ -125,7 +125,12 @@ public class FormatValueUtility } else if (value instanceof java.sql.Date) { - variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate((Date) value)); + if ( "float".equals(valueType))//@see http://qa.openoffice.org/issues/show_bug.cgi?id=108954 + { + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE, HSSFDateUtil.getExcelDate((Date) value, false, 2).toString()); + } + else + variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, "date-value", formatDate((Date) value)); } else if (value instanceof Date) { diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormattedTextLayoutController.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormattedTextLayoutController.java index 4a8954c..e5ebde9 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormattedTextLayoutController.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormattedTextLayoutController.java @@ -136,9 +136,20 @@ public class FormattedTextLayoutController else { final DataFlags df = FormatValueUtility.computeDataFlag(element, getFlowController()); - if (df != null && df.getValue() instanceof String ) + if (df != null) { - target.processContent(df); + if (df.getValue() instanceof String) + { + target.processContent(df); + } + else //@see http://qa.openoffice.org/issues/show_bug.cgi?id=108954 + { + Element cell = getParentTableCell(); + if (cell != null && "string".equals(cell.getAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE_TYPE))) + { + target.processContent(df); + } + } } } diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java index 00ff617..00ca09c 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java @@ -363,6 +363,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget rootAttributes.addNamespaceDeclaration("number", OfficeNamespaces.DATASTYLE_NS); rootAttributes.addNamespaceDeclaration("svg", OfficeNamespaces.SVG_NS); rootAttributes.addNamespaceDeclaration("chart", OfficeNamespaces.CHART_NS); + rootAttributes.addNamespaceDeclaration("chartooo", OfficeNamespaces.CHARTOOO_NS); rootAttributes.addNamespaceDeclaration("dr3d", OfficeNamespaces.DR3D_NS); rootAttributes.addNamespaceDeclaration("math", OfficeNamespaces.MATHML_NS); rootAttributes.addNamespaceDeclaration("form", OfficeNamespaces.FORM_NS); @@ -374,7 +375,8 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget rootAttributes.addNamespaceDeclaration("xforms", OfficeNamespaces.XFORMS_NS); rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS); rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS); - rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0"); + rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS); + rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2"); this.rootXmlWriter.writeXmlDeclaration("UTF-8"); this.rootXmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-content", rootAttributes, XmlWriterSupport.OPEN); diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java index e3083c4..6844ab2 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java @@ -358,6 +358,7 @@ public class StylesWriter OfficeNamespaces.DATASTYLE_NS); rootAttributes.addNamespaceDeclaration("svg", OfficeNamespaces.SVG_NS); rootAttributes.addNamespaceDeclaration("chart", OfficeNamespaces.CHART_NS); + rootAttributes.addNamespaceDeclaration("chartooo", OfficeNamespaces.CHARTOOO_NS); rootAttributes.addNamespaceDeclaration("dr3d", OfficeNamespaces.DR3D_NS); rootAttributes.addNamespaceDeclaration("math", OfficeNamespaces.MATHML_NS); rootAttributes.addNamespaceDeclaration("form", OfficeNamespaces.FORM_NS); @@ -372,7 +373,8 @@ public class StylesWriter OfficeNamespaces.XFORMS_NS); rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS); rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS); - rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0"); + rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS); + rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2"); this.xmlWriter.writeXmlDeclaration("UTF-8"); this.xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, diff --git a/reportbuilder/registry/data/org/openoffice/Office/ExtendedColorScheme.xcu b/reportbuilder/registry/data/org/openoffice/Office/ExtendedColorScheme.xcu index f4c4eea..255eeff 100644 --- a/reportbuilder/registry/data/org/openoffice/Office/ExtendedColorScheme.xcu +++ b/reportbuilder/registry/data/org/openoffice/Office/ExtendedColorScheme.xcu @@ -130,7 +130,7 @@ <node oor:name="EntryNames"> <node oor:name="SunReportBuilder" oor:op="replace"> <prop oor:name="DisplayName"> - <value xml:lang="en-US">Sun Report Builder</value> + <value xml:lang="en-US">Oracle Report Builder</value> </prop> <node oor:name="Entries"> <node oor:name="ReportHeader" oor:op="replace"> diff --git a/reportbuilder/registry/data/org/openoffice/Setup.xcu b/reportbuilder/registry/data/org/openoffice/Setup.xcu index a31fc22..2f51d59 100644 --- a/reportbuilder/registry/data/org/openoffice/Setup.xcu +++ b/reportbuilder/registry/data/org/openoffice/Setup.xcu @@ -45,7 +45,7 @@ <value >GenericCategories</value> </prop> <prop oor:name="ooSetupFactoryUIName"> - <value>Base: Sun Report Builder</value> + <value >Base: Oracle Report Builder</value> </prop> </node> </node> diff --git a/reportbuilder/registry/schema/org/openoffice/Office/ReportDesign.xcs b/reportbuilder/registry/schema/org/openoffice/Office/ReportDesign.xcs index 8311358..c290e00 100644 --- a/reportbuilder/registry/schema/org/openoffice/Office/ReportDesign.xcs +++ b/reportbuilder/registry/schema/org/openoffice/Office/ReportDesign.xcs @@ -50,7 +50,7 @@ <prop oor:name="DownloadURL" oor:type="xs:string"> <info> <author>LLA</author> - <desc>Direct download URL to the Sun(tm) Report Builder extension.</desc> + <desc>Direct download URL to the Oracle(tm) Report Builder extension.</desc> </info> <value>http://extensions.services.openoffice.org</value> </prop> @@ -59,7 +59,7 @@ <author>LLA</author> <desc>Name of the extension.</desc> </info> - <value>Sun(tm) Report Builder</value> + <value>Oracle(tm) Report Builder</value> </prop> </group> <group oor:name="UserData" oor:extensible="true"> diff --git a/reportbuilder/util/description.xml b/reportbuilder/util/description.xml index 88cce3a..22f95ef 100755 --- a/reportbuilder/util/description.xml +++ b/reportbuilder/util/description.xml @@ -3,7 +3,8 @@ xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> <display-name> - <name lang="en-US">Report Builder</name> + <name lang="en-US">Oracle Report Builder</name> + <!-- <name lang="en-US">Oracle(TM) Report Builder</name> --> </display-name> <registration> <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > |