[ooo-build-commit] .: patches/dev300
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Sep 8 06:50:51 PDT 2010
patches/dev300/apply | 1
patches/dev300/build-java-1.4-connectivity.diff | 248 ++++++++++++++++++++++++
2 files changed, 249 insertions(+)
New commits:
commit 357efec2ddbfad00e84ffbfd4dec5a6356af23f4
Author: Petr Mladek <pmladek at walk.suse.cz>
Date: Wed Sep 8 15:49:51 2010 +0200
fix connectivity build with java-1.4
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 05d7634..b9be6ef 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1071,6 +1071,7 @@ build-java-1.4-filter.diff, i#12345, pmladek
build-java-1.4-qadevOOo.diff, i#12345, pmladek
build-java-1.4-wizards.diff, i#12345, pmladek
build-java-1.4-accessibility.diff, i#12345, pmladek
+build-java-1.4-connectivity.diff, i#12345, pmladek
# Sun Java 1.4 does not know the -Xbootclasspath option, will not go upstream
build-java-1.4-no-Xbootclasspath.diff, i#12345, pmladek
# the new declaration was supported only by Java 1.5, see i#102469
diff --git a/patches/dev300/build-java-1.4-connectivity.diff b/patches/dev300/build-java-1.4-connectivity.diff
new file mode 100644
index 0000000..dd6a667
--- /dev/null
+++ b/patches/dev300/build-java-1.4-connectivity.diff
@@ -0,0 +1,248 @@
+--- connectivity/qa/connectivity/tools/CRMDatabase.java.old 2010-08-26 13:08:40.000000000 +0200
++++ connectivity/qa/connectivity/tools/CRMDatabase.java 2010-09-08 15:41:35.000000000 +0200
+@@ -70,10 +70,10 @@ public class CRMDatabase
+
+ if ( _withUI )
+ {
+- final XComponentLoader loader = UnoRuntime.queryInterface( XComponentLoader.class,
++ final XComponentLoader loader = (XComponentLoader) UnoRuntime.queryInterface( XComponentLoader.class,
+ m_orb.createInstance( "com.sun.star.frame.Desktop" ) );
+ PropertyValue[] loadArgs = new PropertyValue[] {
+- new PropertyValue( "PickListEntry", 0, false, PropertyState.DIRECT_VALUE )
++ new PropertyValue( "PickListEntry", 0, Boolean.FALSE, PropertyState.DIRECT_VALUE )
+ };
+ loader.loadComponentFromURL( m_database.getDocumentURL(), "_blank", 0, loadArgs );
+ getDocumentUI().connect();
+@@ -132,8 +132,8 @@ public class CRMDatabase
+ // --------------------------------------------------------------------------------------------------------
+ public XDatabaseDocumentUI getDocumentUI()
+ {
+- XModel docModel = UnoRuntime.queryInterface( XModel.class, m_database.getDatabaseDocument() );
+- return UnoRuntime.queryInterface( XDatabaseDocumentUI.class, docModel.getCurrentController() );
++ XModel docModel = (XModel) UnoRuntime.queryInterface( XModel.class, m_database.getDatabaseDocument() );
++ return (XDatabaseDocumentUI) UnoRuntime.queryInterface( XDatabaseDocumentUI.class, docModel.getCurrentController() );
+ }
+
+ // --------------------------------------------------------------------------------------------------------
+@@ -144,10 +144,10 @@ public class CRMDatabase
+ docUI.connect();
+
+ XComponent subComponent = docUI.loadComponent( _objectType, _name, false );
+- XController controller = UnoRuntime.queryInterface( XController.class, subComponent );
++ XController controller = (XController) UnoRuntime.queryInterface( XController.class, subComponent );
+ if ( controller != null )
+ return controller;
+- XModel document = UnoRuntime.queryInterface( XModel.class, subComponent );
++ XModel document = (XModel) UnoRuntime.queryInterface( XModel.class, subComponent );
+ return document.getCurrentController();
+ }
+
+@@ -229,9 +229,9 @@ public class CRMDatabase
+ QueryDefinition unparseableQuery;
+ try
+ {
+- final XMultiServiceFactory factory = UnoRuntime.queryInterface(
++ final XMultiServiceFactory factory = (XMultiServiceFactory) UnoRuntime.queryInterface(
+ XMultiServiceFactory.class, m_database.defaultConnection().getXConnection() );
+- composer = UnoRuntime.queryInterface(
++ composer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(
+ XSingleSelectQueryComposer.class, factory.createInstance( "com.sun.star.sdb.SingleSelectQueryComposer" ) );
+ unparseableQuery = m_dataSource.getQueryDefinition( "unparseable" );
+ }
+--- connectivity/qa/connectivity/tools/HsqlDatabase.java.old 2010-08-26 13:08:40.000000000 +0200
++++ connectivity/qa/connectivity/tools/HsqlDatabase.java 2010-09-08 15:39:41.000000000 +0200
+@@ -82,7 +82,7 @@ public class HsqlDatabase extends Abstra
+
+ final XStorable storable = (XStorable) UnoRuntime.queryInterface(XStorable.class, m_databaseDocument);
+ storable.storeAsURL( m_databaseDocumentFile, new PropertyValue[]
+- { new PropertyValue( "PickListEntry", 0, false, PropertyState.DIRECT_VALUE )
++ { new PropertyValue( "PickListEntry", 0, Boolean.FALSE, PropertyState.DIRECT_VALUE )
+ } );
+ }
+
+@@ -206,8 +206,8 @@ public class HsqlDatabase extends Abstra
+ public void createTableInSDBCX(final HsqlTableDescriptor _tableDesc) throws SQLException, ElementExistException
+ {
+ final XPropertySet sdbcxDescriptor = _tableDesc.createSdbcxDescriptor(defaultConnection());
+- final XTablesSupplier suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, defaultConnection().getXConnection() );
+- final XAppend appendTable = UnoRuntime.queryInterface( XAppend.class, suppTables.getTables() );
++ final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface( XTablesSupplier.class, defaultConnection().getXConnection() );
++ final XAppend appendTable = (XAppend) UnoRuntime.queryInterface( XAppend.class, suppTables.getTables() );
+ appendTable.appendByDescriptor(sdbcxDescriptor);
+ }
+ }
+--- connectivity/qa/connectivity/tools/sdb/Connection.java.old 2010-08-26 13:08:40.000000000 +0200
++++ connectivity/qa/connectivity/tools/sdb/Connection.java 2010-09-08 15:45:36.000000000 +0200
+@@ -55,15 +55,15 @@ public class Connection
+
+ public void refreshTables()
+ {
+- final XTablesSupplier suppTables = UnoRuntime.queryInterface(XTablesSupplier.class, m_connection);
+- final XRefreshable refresh = UnoRuntime.queryInterface( XRefreshable.class, suppTables.getTables() );
++ final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, m_connection);
++ final XRefreshable refresh = (XRefreshable) UnoRuntime.queryInterface( XRefreshable.class, suppTables.getTables() );
+ refresh.refresh();
+ }
+
+ public XSingleSelectQueryComposer createSingleSelectQueryComposer() throws Exception
+ {
+- final XMultiServiceFactory connectionFactory = UnoRuntime.queryInterface( XMultiServiceFactory.class, m_connection );
+- return UnoRuntime.queryInterface(
++ final XMultiServiceFactory connectionFactory = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, m_connection );
++ return (XSingleSelectQueryComposer) UnoRuntime.queryInterface(
+ XSingleSelectQueryComposer.class, connectionFactory.createInstance( "com.sun.star.sdb.SingleSelectQueryComposer" ) );
+ }
+
+--- connectivity/qa/connectivity/tools/DataSource.java.old 2010-08-26 13:08:40.000000000 +0200
++++ connectivity/qa/connectivity/tools/DataSource.java 2010-09-08 15:44:43.000000000 +0200
+@@ -52,10 +52,10 @@ public class DataSource
+ {
+ m_orb = _orb;
+
+- final XNameAccess dbContext = UnoRuntime.queryInterface(
++ final XNameAccess dbContext = (XNameAccess) UnoRuntime.queryInterface(
+ XNameAccess.class, _orb.createInstance( "com.sun.star.sdb.DatabaseContext" ) );
+
+- m_dataSource = UnoRuntime.queryInterface( XDataSource.class, dbContext.getByName( _registeredName ) );
++ m_dataSource = (XDataSource) UnoRuntime.queryInterface( XDataSource.class, dbContext.getByName( _registeredName ) );
+ }
+
+ public DataSource(final XMultiServiceFactory _orb,final XDataSource _dataSource)
+@@ -80,11 +80,11 @@ public class DataSource
+ */
+ public void createQuery(final String _name, final String _sqlCommand, final boolean _escapeProcessing) throws ElementExistException, WrappedTargetException, com.sun.star.lang.IllegalArgumentException
+ {
+- final XSingleServiceFactory queryDefsFac = UnoRuntime.queryInterface( XSingleServiceFactory.class, getQueryDefinitions() );
++ final XSingleServiceFactory queryDefsFac = (XSingleServiceFactory) UnoRuntime.queryInterface( XSingleServiceFactory.class, getQueryDefinitions() );
+ XPropertySet queryDef = null;
+ try
+ {
+- queryDef = UnoRuntime.queryInterface( XPropertySet.class, queryDefsFac.createInstance() );
++ queryDef = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, queryDefsFac.createInstance() );
+ queryDef.setPropertyValue("Command", _sqlCommand);
+ queryDef.setPropertyValue("EscapeProcessing", Boolean.valueOf(_escapeProcessing));
+ }
+@@ -93,7 +93,7 @@ public class DataSource
+ e.printStackTrace(System.err);
+ }
+
+- final XNameContainer queryDefsContainer = UnoRuntime.queryInterface( XNameContainer.class, getQueryDefinitions() );
++ final XNameContainer queryDefsContainer = (XNameContainer) UnoRuntime.queryInterface( XNameContainer.class, getQueryDefinitions() );
+ queryDefsContainer.insertByName(_name, queryDef);
+ }
+
+@@ -104,7 +104,7 @@ public class DataSource
+ final XNameAccess allDefs = getQueryDefinitions();
+ try
+ {
+- return new QueryDefinition( UnoRuntime.queryInterface( XPropertySet.class, allDefs.getByName( _name) ) );
++ return new QueryDefinition( (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, allDefs.getByName( _name) ) );
+ }
+ catch (WrappedTargetException e)
+ {
+@@ -116,7 +116,7 @@ public class DataSource
+ */
+ public XNameAccess getQueryDefinitions()
+ {
+- final XQueryDefinitionsSupplier suppQueries = UnoRuntime.queryInterface(
++ final XQueryDefinitionsSupplier suppQueries = (XQueryDefinitionsSupplier) UnoRuntime.queryInterface(
+ XQueryDefinitionsSupplier.class, m_dataSource);
+ return suppQueries.getQueryDefinitions();
+ }
+@@ -133,7 +133,7 @@ public class DataSource
+ String name = null;
+ try
+ {
+- final XPropertySet dataSourceProps = UnoRuntime.queryInterface( XPropertySet.class, m_dataSource );
++ final XPropertySet dataSourceProps = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, m_dataSource );
+ name = (String) dataSourceProps.getPropertyValue("Name");
+ }
+ catch (Exception ex)
+--- connectivity/qa/connectivity/tools/AbstractDatabase.java.old 2010-08-26 13:08:40.000000000 +0200
++++ connectivity/qa/connectivity/tools/AbstractDatabase.java 2010-09-08 15:42:55.000000000 +0200
+@@ -99,7 +99,7 @@ public abstract class AbstractDatabase i
+ {
+ if (m_databaseDocument != null)
+ {
+- final XStorable storeDoc = UnoRuntime.queryInterface(XStorable.class, m_databaseDocument);
++ final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class, m_databaseDocument);
+ storeDoc.store();
+ }
+ }
+@@ -112,7 +112,7 @@ public abstract class AbstractDatabase i
+ public void close()
+ {
+ // close connection
+- final XCloseable closeConn = UnoRuntime.queryInterface( XCloseable.class,
++ final XCloseable closeConn = (XCloseable) UnoRuntime.queryInterface( XCloseable.class,
+ m_connection != null ? m_connection.getXConnection() : null );
+ if (closeConn != null)
+ {
+@@ -127,7 +127,7 @@ public abstract class AbstractDatabase i
+ m_connection = null;
+
+ // close document
+- final com.sun.star.util.XCloseable closeDoc = UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class, m_databaseDocument );
++ final com.sun.star.util.XCloseable closeDoc = (com.sun.star.util.XCloseable) UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class, m_databaseDocument );
+ if (closeDoc != null)
+ {
+ try
+@@ -171,7 +171,7 @@ public abstract class AbstractDatabase i
+ */
+ public XModel getModel()
+ {
+- return UnoRuntime.queryInterface( XModel.class, m_databaseDocument );
++ return (XModel) UnoRuntime.queryInterface( XModel.class, m_databaseDocument );
+ }
+
+ public XMultiServiceFactory getORB()
+@@ -184,9 +184,9 @@ public abstract class AbstractDatabase i
+ {
+ m_databaseDocumentFile = _docURL;
+
+- final XNameAccess dbContext = UnoRuntime.queryInterface( XNameAccess.class,
++ final XNameAccess dbContext = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class,
+ m_orb.createInstance( "com.sun.star.sdb.DatabaseContext" ) );
+- final XDocumentDataSource dataSource = UnoRuntime.queryInterface( XDocumentDataSource.class, dbContext.getByName( _docURL ) );
++ final XDocumentDataSource dataSource = (XDocumentDataSource) UnoRuntime.queryInterface( XDocumentDataSource.class, dbContext.getByName( _docURL ) );
+
+ m_databaseDocument = dataSource.getDatabaseDocument();
+ m_dataSource = new DataSource(m_orb, m_databaseDocument.getDataSource());
+@@ -213,7 +213,10 @@ public abstract class AbstractDatabase i
+ return new RowSet(m_orb, getDocumentURL(), _commandType, _command);
+ }
+
+- @Override
++ // @Override is optional; It just helps the compiler to catch errors, see
++ // http://java.sun.com/docs/books/tutorial/java/javaOO/annotations.html
++ // We will disable to to be able to compile with JRE 1.4
++ // @Override
+ protected void finalize() throws Throwable
+ {
+ closeAndDelete();
+--- connectivity/qa/connectivity/tools/HsqlTableDescriptor.java.old 2010-08-26 13:08:40.000000000 +0200
++++ connectivity/qa/connectivity/tools/HsqlTableDescriptor.java 2010-09-08 15:09:40.000000000 +0200
+@@ -66,8 +66,8 @@ public class HsqlTableDescriptor
+
+ public XPropertySet createSdbcxDescriptor( Connection _forConnection )
+ {
+- XTablesSupplier suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, _forConnection.getXConnection() );
+- XDataDescriptorFactory tableDescFac = UnoRuntime.queryInterface( XDataDescriptorFactory.class, suppTables.getTables() );
++ XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface( XTablesSupplier.class, _forConnection.getXConnection() );
++ XDataDescriptorFactory tableDescFac = (XDataDescriptorFactory) UnoRuntime.queryInterface( XDataDescriptorFactory.class, suppTables.getTables() );
+ XPropertySet tableDesc = tableDescFac.createDataDescriptor();
+
+ try
+@@ -76,10 +76,10 @@ public class HsqlTableDescriptor
+ }
+ catch ( Exception e ) { e.printStackTrace( System.err ); }
+
+- XColumnsSupplier suppDescCols = UnoRuntime.queryInterface( XColumnsSupplier.class, tableDesc );
++ XColumnsSupplier suppDescCols = (XColumnsSupplier) UnoRuntime.queryInterface( XColumnsSupplier.class, tableDesc );
+
+ XNameAccess descColumns = suppDescCols.getColumns();
+- XDataDescriptorFactory columnDescFac = UnoRuntime.queryInterface( XDataDescriptorFactory.class, descColumns );
++ XDataDescriptorFactory columnDescFac = (XDataDescriptorFactory) UnoRuntime.queryInterface( XDataDescriptorFactory.class, descColumns );
+
+ HsqlColumnDescriptor[] myColumns = getColumns();
+ for ( int i = 0; i < myColumns.length; ++i )
More information about the ooo-build-commit
mailing list