[ooo-build-commit] .: 2 commits - patches/dev300

Petr Mladek pmladek at kemper.freedesktop.org
Wed Sep 8 10:08:09 PDT 2010


 patches/dev300/apply                        |    2 
 patches/dev300/build-java-1.4-dbaccess.diff |  620 ++++++++++++++++++++++++++++
 patches/dev300/build-java-1.4-forms.diff    |  351 +++++++++++++++
 3 files changed, 973 insertions(+)

New commits:
commit b9171f5485dfb532b692d1e55ebd6212f8201912
Author: Petr Mladek <pmladek at walk.suse.cz>
Date:   Wed Sep 8 19:07:41 2010 +0200

    fix dbaccess build with java-1.4

diff --git a/patches/dev300/apply b/patches/dev300/apply
index c1a442a..bed0b5d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1079,6 +1079,7 @@ 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
+build-java-1.4-dbaccess.diff,  i#12345, pmladek
 build-java-1.4-forms.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
diff --git a/patches/dev300/build-java-1.4-dbaccess.diff b/patches/dev300/build-java-1.4-dbaccess.diff
new file mode 100644
index 0000000..0fb8fa9
--- /dev/null
+++ b/patches/dev300/build-java-1.4-dbaccess.diff
@@ -0,0 +1,620 @@
+--- dbaccess/qa/complex/dbaccess/CopyTableWizard.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/CopyTableWizard.java	2010-09-08 18:43:15.000000000 +0200
+@@ -69,7 +69,10 @@ public class CopyTableWizard extends CRM
+     }
+ 
+     // --------------------------------------------------------------------------------------------------------
+-    @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. 
+     public String getTestObjectName()
+     {
+         return getClass().getName();
+@@ -77,14 +80,20 @@ public class CopyTableWizard extends CRM
+ // --------------------------------------------------------------------------------------------------------
+     // --------------------------------------------------------------------------------------------------------
+ 
+-    @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. 
+     public void after()
+     {
+         dest.store();
+         super.after();
+     }
+ 
+-    @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. 
+     public void before()
+     {
+         try
+@@ -170,7 +179,7 @@ public class CopyTableWizard extends CRM
+         final XInteractionHandler interAction = new CopyTableInterActionHandler(this);
+         final XComponentContext context = getComponentContext();
+         final XPropertySet sourceDescriptor = DataAccessDescriptorFactory.get(context).createDataAccessDescriptor();
+-        sourceDescriptor.setPropertyValue("CommandType", CommandType.TABLE);
++        sourceDescriptor.setPropertyValue("CommandType", new Integer(CommandType.TABLE));
+         sourceDescriptor.setPropertyValue("Command", tableName);
+         sourceDescriptor.setPropertyValue("ActiveConnection", sourceConnection);
+ 
+@@ -179,7 +188,7 @@ public class CopyTableWizard extends CRM
+ 
+         final XCopyTableWizard copyWizard = com.sun.star.sdb.application.CopyTableWizard.createWithInteractionHandler(context, sourceDescriptor, destDescriptor, interAction);
+         copyWizard.setOperation((short) 0); // com.sun.star.sdb.application.CopyDefinitionAndData
+-        Optional<String> auto = new Optional<String>();
++        Optional auto = new Optional();
+ 
+         auto.IsPresent = destConnection.getMetaData().supportsCoreSQLGrammar();
+         if (auto.IsPresent)
+--- dbaccess/qa/complex/dbaccess/PropertyBag.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/PropertyBag.java	2010-09-08 18:53:27.000000000 +0200
+@@ -71,7 +71,7 @@ public class PropertyBag extends Complex
+         boolean caughtExpected = false;
+         try
+         {
+-            m_bag.addProperty( "", PropertyAttribute.BOUND, Integer.valueOf( 3 ) );
++            m_bag.addProperty( "", PropertyAttribute.BOUND, new Integer( 3 ) );
+         }
+         catch(com.sun.star.lang.IllegalArgumentException e) { caughtExpected = true; }
+         catch(com.sun.star.uno.Exception e) { }
+@@ -131,7 +131,7 @@ public class PropertyBag extends Complex
+         caughtExpected = false;
+         try
+         {
+-            m_set.setPropertyValue( VALUE, Integer.valueOf( 3 ) );
++            m_set.setPropertyValue( VALUE, new Integer( 3 ) );
+         }
+         catch(com.sun.star.lang.IllegalArgumentException e) { caughtExpected = true; }
+         catch(com.sun.star.uno.Exception e) { }
+@@ -150,7 +150,7 @@ public class PropertyBag extends Complex
+         {
+             new PropertyValue( "BoolValue", -1, Boolean.FALSE, PropertyState.DIRECT_VALUE ),
+             new PropertyValue( "StringValue", -1, "some text", PropertyState.DIRECT_VALUE ),
+-            new PropertyValue( "IntegerValue", -1, Integer.valueOf( 3 ), PropertyState.DIRECT_VALUE ),
++            new PropertyValue( "IntegerValue", -1, new Integer( 3 ), PropertyState.DIRECT_VALUE ),
+             new PropertyValue( "InterfaceValue", -1, m_bag, PropertyState.DIRECT_VALUE )
+         };
+         m_access.setPropertyValues( expectedValues );
+@@ -275,7 +275,7 @@ public class PropertyBag extends Complex
+             {
+                 { "BoolValue", Boolean.TRUE },
+                 { "StringValue", "" },
+-                { "IntegerValue", Integer.valueOf( 3 ) },
++                { "IntegerValue", new Integer( 3 ) },
+                 { "InterfaceValue", (XInterface)m_bag }
+             };
+             for ( int i=0; i<properties.length; ++i )
+--- dbaccess/qa/complex/dbaccess/ApplicationController.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/ApplicationController.java	2010-09-08 18:37:59.000000000 +0200
+@@ -104,16 +104,16 @@ public class ApplicationController exten
+ 
+         // load it into a frame
+         final Object object = getORB().createInstance("com.sun.star.frame.Desktop");
+-        final XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, object);
++        final XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, object);
+         final XComponent loadedComponent = xComponentLoader.loadComponentFromURL(m_database.getDocumentURL(), "_blank", FrameSearchFlag.ALL, new PropertyValue[0]);
+ 
+         assure("too many document instances!",
+                 UnoRuntime.areSame(loadedComponent, m_databaseDocument));
+ 
+         // get the controller, which provides access to various UI operations
+-        final XModel docModel = UnoRuntime.queryInterface(XModel.class,
++        final XModel docModel = (XModel) UnoRuntime.queryInterface(XModel.class,
+                 loadedComponent);
+-        m_documentUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
++        m_documentUI = (XDatabaseDocumentUI) UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
+                 docModel.getCurrentController());
+     }
+ 
+@@ -141,7 +141,7 @@ public class ApplicationController exten
+         final String newDocumentURL = createTempFileURL();
+ 
+         // store the doc in a new location
+-        final XStorable storeDoc = UnoRuntime.queryInterface( XStorable.class, m_databaseDocument );
++        final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface( XStorable.class, m_databaseDocument );
+         storeDoc.storeAsURL( newDocumentURL, new PropertyValue[] { } );
+ 
+         // connect
+@@ -160,7 +160,7 @@ public class ApplicationController exten
+         impl_switchToDocument(oldDocumentURL);
+         m_documentUI.connect();
+         assure("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected());
+-        XTablesSupplier suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() );
++        XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() );
+         XNameAccess tables = suppTables.getTables();
+         assure("the table was created in the wrong database", !tables.hasByName("abc"));
+ 
+@@ -169,7 +169,7 @@ public class ApplicationController exten
+         m_documentUI.connect();
+         assure("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected());
+ 
+-        suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() );
++        suppTables = (XTablesSupplier) UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() );
+         tables = suppTables.getTables();
+         assure("the newly created table has not been written", tables.hasByName("abc"));
+     }
+--- dbaccess/qa/complex/dbaccess/TestCase.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/TestCase.java	2010-09-08 18:36:34.000000000 +0200
+@@ -54,8 +54,8 @@ public abstract class TestCase extends c
+         XComponentContext context = null;
+         try
+         {
+-            final XPropertySet orbProps = UnoRuntime.queryInterface( XPropertySet.class, getORB() );
+-            context = UnoRuntime.queryInterface( XComponentContext.class,
++            final XPropertySet orbProps = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, getORB() );
++            context = (XComponentContext) UnoRuntime.queryInterface( XComponentContext.class,
+                 orbProps.getPropertyValue( "DefaultContext" ) );
+         }
+         catch ( Exception ex )
+@@ -110,9 +110,9 @@ public abstract class TestCase extends c
+     // --------------------------------------------------------------------------------------------------------
+     protected final XModel loadDocument( final String _docURL ) throws Exception
+     {
+-        final XComponentLoader loader = UnoRuntime.queryInterface( XComponentLoader.class,
++        final XComponentLoader loader = (XComponentLoader) UnoRuntime.queryInterface( XComponentLoader.class,
+             getORB().createInstance( "com.sun.star.frame.Desktop" ) );
+-        return UnoRuntime.queryInterface( XModel.class,
++        return (XModel) UnoRuntime.queryInterface( XModel.class,
+             loader.loadComponentFromURL( _docURL, "_blank", 0, new PropertyValue[] {} ) );
+     }
+ 
+--- dbaccess/qa/complex/dbaccess/DatabaseDocument.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/DatabaseDocument.java	2010-09-08 18:52:19.000000000 +0200
+@@ -467,7 +467,7 @@ public class DatabaseDocument extends Te
+     {
+         return new PropertyValue[]
+                 {
+-                    new PropertyValue( "PickListEntry", 0, false, PropertyState.DIRECT_VALUE ),
++                    new PropertyValue( "PickListEntry", 0, Boolean.FALSE, PropertyState.DIRECT_VALUE ),
+                     new PropertyValue( "TestCase_Marker", 0, "Yes", PropertyState.DIRECT_VALUE )
+                 };
+     }
+@@ -488,7 +488,7 @@ public class DatabaseDocument extends Te
+     {
+         return new PropertyValue[]
+                 {
+-                    new PropertyValue("PickListEntry", 0, false, PropertyState.DIRECT_VALUE)
++                    new PropertyValue("PickListEntry", 0, Boolean.FALSE, PropertyState.DIRECT_VALUE)
+                 };
+     }
+ 
+@@ -497,8 +497,8 @@ public class DatabaseDocument extends Te
+     {
+         return new PropertyValue[]
+                 {
+-                    new PropertyValue("PickListEntry", 0, false, PropertyState.DIRECT_VALUE),
+-                    new PropertyValue("MacroExecutionMode", 0, com.sun.star.document.MacroExecMode.USE_CONFIG, PropertyState.DIRECT_VALUE),
++                    new PropertyValue("PickListEntry", 0, Boolean.FALSE, PropertyState.DIRECT_VALUE),
++                    new PropertyValue("MacroExecutionMode", 0, new Short(com.sun.star.document.MacroExecMode.USE_CONFIG), PropertyState.DIRECT_VALUE),
+                     new PropertyValue("InteractionHandler", 0, new MacroExecutionApprove(getORB()), PropertyState.DIRECT_VALUE)
+                 };
+     }
+@@ -517,7 +517,7 @@ public class DatabaseDocument extends Te
+         final XPropertySet securitySettings = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
+                 configProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", args));
+         final int oldValue = ((Integer) securitySettings.getPropertyValue("MacroSecurityLevel")).intValue();
+-        securitySettings.setPropertyValue("MacroSecurityLevel", Integer.valueOf(_level));
++        securitySettings.setPropertyValue("MacroSecurityLevel", new Integer(_level));
+ 
+         final XChangesBatch committer = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class,
+                 securitySettings);
+--- dbaccess/qa/complex/dbaccess/RowSet.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/RowSet.java	2010-09-08 19:01:12.000000000 +0200
+@@ -85,7 +85,7 @@ public class RowSet extends ComplexTestC
+         public ResultSetMovementStress(XResultSet _resultSet, int _id) throws java.lang.Exception
+         {
+             m_resultSet = _resultSet;
+-            m_row = UnoRuntime.queryInterface( XRow.class, m_resultSet );
++            m_row = (XRow) UnoRuntime.queryInterface( XRow.class, m_resultSet );
+             m_id = _id;
+         }
+ 
+@@ -200,22 +200,22 @@ public class RowSet extends ComplexTestC
+     {
+         try
+         {
+-            m_rowSet = UnoRuntime.queryInterface( XRowSet.class, getFactory().createInstance( "com.sun.star.sdb.RowSet" ) );
+-            final XPropertySet rowSetProperties = UnoRuntime.queryInterface( XPropertySet.class, m_rowSet );
++            m_rowSet = (XRowSet) UnoRuntime.queryInterface( XRowSet.class, getFactory().createInstance( "com.sun.star.sdb.RowSet" ) );
++            final XPropertySet rowSetProperties = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, m_rowSet );
+             rowSetProperties.setPropertyValue("Command", command);
+-            rowSetProperties.setPropertyValue("CommandType", Integer.valueOf(commandType));
++            rowSetProperties.setPropertyValue("CommandType", new Integer(commandType));
+             rowSetProperties.setPropertyValue("ActiveConnection", m_database.defaultConnection().getXConnection());
+             if (limitFetchSize)
+             {
+-                rowSetProperties.setPropertyValue("FetchSize", Integer.valueOf(MAX_FETCH_ROWS));
++                rowSetProperties.setPropertyValue("FetchSize", new Integer(MAX_FETCH_ROWS));
+             }
+ 
+-            m_resultSet = UnoRuntime.queryInterface( XResultSet.class, m_rowSet );
+-            m_resultSetUpdate = UnoRuntime.queryInterface( XResultSetUpdate.class, m_rowSet );
+-            m_row = UnoRuntime.queryInterface( XRow.class, m_rowSet );
+-            m_rowLocate = UnoRuntime.queryInterface( XRowLocate.class, m_resultSet );
+-            m_rowSetProperties = UnoRuntime.queryInterface( XPropertySet.class, m_rowSet );
+-            m_paramsSupplier = UnoRuntime.queryInterface( XParametersSupplier.class, m_rowSet );
++            m_resultSet = (XResultSet) UnoRuntime.queryInterface( XResultSet.class, m_rowSet );
++            m_resultSetUpdate = (XResultSetUpdate) UnoRuntime.queryInterface( XResultSetUpdate.class, m_rowSet );
++            m_row = (XRow) UnoRuntime.queryInterface( XRow.class, m_rowSet );
++            m_rowLocate = (XRowLocate) UnoRuntime.queryInterface( XRowLocate.class, m_resultSet );
++            m_rowSetProperties = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, m_rowSet );
++            m_paramsSupplier = (XParametersSupplier) UnoRuntime.queryInterface( XParametersSupplier.class, m_rowSet );
+ 
+             if (execute)
+             {
+@@ -254,7 +254,7 @@ public class RowSet extends ComplexTestC
+     // --------------------------------------------------------------------------------------------------------
+     XResultSet createClone() throws SQLException
+     {
+-        final XResultSetAccess rowAcc = UnoRuntime.queryInterface( XResultSetAccess.class, m_rowSet );
++        final XResultSetAccess rowAcc = (XResultSetAccess) UnoRuntime.queryInterface( XResultSetAccess.class, m_rowSet );
+         return rowAcc.createResultSet();
+     }
+ 
+@@ -266,7 +266,7 @@ public class RowSet extends ComplexTestC
+ 
+         final Connection connection = m_database.defaultConnection();
+         final XPreparedStatement prep = connection.prepareStatement("INSERT INTO \"TEST1\" values (?,?)");
+-        final XParameters para = UnoRuntime.queryInterface( XParameters.class, prep );
++        final XParameters para = (XParameters) UnoRuntime.queryInterface( XParameters.class, prep );
+         for (int i = 1; i <= MAX_TABLE_ROWS; ++i)
+         {
+             para.setInt(1, i);
+@@ -328,8 +328,8 @@ public class RowSet extends ComplexTestC
+     {
+         try
+         {
+-            final XRow _row = UnoRuntime.queryInterface( XRow.class, _resultSet );
+-            final XRow cloneRow = UnoRuntime.queryInterface( XRow.class, clone );
++            final XRow _row = (XRow) UnoRuntime.queryInterface( XRow.class, _resultSet );
++            final XRow cloneRow = (XRow) UnoRuntime.queryInterface( XRow.class, clone );
+             for (int i = 1; i <= MAX_FETCH_ROWS; ++i)
+             {
+                 final int calcPos = (MAX_TABLE_ROWS % i) + 1;
+@@ -352,14 +352,14 @@ public class RowSet extends ComplexTestC
+     {
+         try
+         {
+-            final XRow _row = UnoRuntime.queryInterface( XRow.class, _resultSet );
++            final XRow _row = (XRow) UnoRuntime.queryInterface( XRow.class, _resultSet );
+             _resultSet.beforeFirst();
+ 
+             for (int i = 1; i <= MAX_TABLE_ROWS; ++i)
+             {
+                 _resultSet.next();
+                 final XResultSet clone = createClone();
+-                final XRow cloneRow = UnoRuntime.queryInterface( XRow.class, clone );
++                final XRow cloneRow = (XRow) UnoRuntime.queryInterface( XRow.class, clone );
+                 final int calcPos = MAX_TABLE_ROWS - 1;
+                 if (calcPos != 0 && clone.absolute(calcPos))
+                 {
+@@ -413,15 +413,15 @@ public class RowSet extends ComplexTestC
+         // first we create our RowSet object
+         final RowSetEventListener pRow = new RowSetEventListener();
+ 
+-        final XColumnsSupplier colSup = UnoRuntime.queryInterface( XColumnsSupplier.class, m_rowSet );
+-        final XPropertySet col = UnoRuntime.queryInterface( XPropertySet.class, colSup.getColumns().getByName( "ID" ) );
++        final XColumnsSupplier colSup = (XColumnsSupplier) UnoRuntime.queryInterface( XColumnsSupplier.class, m_rowSet );
++        final XPropertySet col = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, colSup.getColumns().getByName( "ID" ) );
+         col.addPropertyChangeListener("Value", pRow);
+         m_rowSetProperties.addPropertyChangeListener("IsModified", pRow);
+         m_rowSetProperties.addPropertyChangeListener("IsNew", pRow);
+         m_rowSetProperties.addPropertyChangeListener("IsRowCountFinal", pRow);
+         m_rowSetProperties.addPropertyChangeListener("RowCount", pRow);
+ 
+-        final XRowSetApproveBroadcaster xApBroad = UnoRuntime.queryInterface( XRowSetApproveBroadcaster.class, m_resultSet );
++        final XRowSetApproveBroadcaster xApBroad = (XRowSetApproveBroadcaster) UnoRuntime.queryInterface( XRowSetApproveBroadcaster.class, m_resultSet );
+         xApBroad.addRowSetApproveListener(pRow);
+         m_rowSet.addRowSetListener(pRow);
+ 
+@@ -451,13 +451,13 @@ public class RowSet extends ComplexTestC
+         testCursorMove(m_resultSet, cResSet.getMethod("previous", (Class[]) null), pRow, moves, null);
+         testCursorMove(m_resultSet, cResSet.getMethod(NEXT, (Class[]) null), pRow, moves, null);
+         moves[RowSetEventListener.IS_MODIFIED] = true;
+-        final XRowUpdate updRow = UnoRuntime.queryInterface( XRowUpdate.class, m_resultSet );
++        final XRowUpdate updRow = (XRowUpdate) UnoRuntime.queryInterface( XRowUpdate.class, m_resultSet );
+         updRow.updateString(2, TEST21);
+         testCursorMove(m_resultSet, cResSet.getMethod(NEXT, (Class[]) null), pRow, moves, null);
+ 
+         moves[RowSetEventListener.IS_MODIFIED] = false;
+         final Class cupd = Class.forName("com.sun.star.sdbc.XResultSetUpdate");
+-        final XResultSetUpdate upd = UnoRuntime.queryInterface( XResultSetUpdate.class, m_resultSet );
++        final XResultSetUpdate upd = (XResultSetUpdate) UnoRuntime.queryInterface( XResultSetUpdate.class, m_resultSet );
+         testCursorMove(upd, cupd.getMethod("moveToInsertRow", (Class[]) null), pRow, moves, null);
+ 
+         updRow.updateInt(1, MAX_TABLE_ROWS + 2);
+@@ -514,7 +514,7 @@ public class RowSet extends ComplexTestC
+ 
+         final Object temp2[] = new Object[2];
+         temp2[0] = bookmark;
+-        temp2[1] = Integer.valueOf(1);
++        temp2[1] = new Integer(1);
+         final Class ctemp2[] = new Class[2];
+         ctemp2[0] = Object.class;
+         ctemp2[1] = int.class;
+@@ -529,7 +529,7 @@ public class RowSet extends ComplexTestC
+         moves[RowSetEventListener.ROW_COUNT] = true;
+         final Class cdelRows = Class.forName("com.sun.star.sdbcx.XDeleteRows");
+         ctemp[0] = Object[].class;
+-        final XDeleteRows delRows = UnoRuntime.queryInterface( XDeleteRows.class, m_resultSet );
++        final XDeleteRows delRows = (XDeleteRows) UnoRuntime.queryInterface( XDeleteRows.class, m_resultSet );
+         final Object bookmarks[] = new Object[5];
+         m_resultSet.first();
+         for (int i = 0; i < bookmarks.length; ++i)
+@@ -542,7 +542,7 @@ public class RowSet extends ComplexTestC
+         testCursorMove(delRows, cdelRows.getMethod("deleteRows", ctemp), pRow, moves, temp);
+ 
+         // now destroy the RowSet
+-        final XComponent xComp = UnoRuntime.queryInterface( XComponent.class, m_resultSet );
++        final XComponent xComp = (XComponent) UnoRuntime.queryInterface( XComponent.class, m_resultSet );
+         xComp.dispose();
+     }
+ 
+@@ -592,7 +592,7 @@ public class RowSet extends ComplexTestC
+     private int positionRandom() throws SQLException, UnknownPropertyException, WrappedTargetException
+     {
+         final int position = (new Random()).nextInt(currentRowCount() - 2) + 2;
+-        assure("sub task failed: could not position to row no. " + (Integer.valueOf(position)).toString(),
++        assure("sub task failed: could not position to row no. " + (new Integer(position)).toString(),
+                 m_resultSet.absolute(position));
+         return m_resultSet.getRow();
+     }
+@@ -708,7 +708,7 @@ public class RowSet extends ComplexTestC
+         positionRandom();
+         final Object deleteBookmark = m_rowLocate.getBookmark();
+         m_resultSetUpdate.deleteRow();
+-        final XDeleteRows multiDelete = UnoRuntime.queryInterface( XDeleteRows.class, m_resultSet );
++        final XDeleteRows multiDelete = (XDeleteRows) UnoRuntime.queryInterface( XDeleteRows.class, m_resultSet );
+         final int[] deleteSuccess = multiDelete.deleteRows(new Object[]
+                 {
+                     firstBookmark, deleteBookmark
+@@ -738,7 +738,7 @@ public class RowSet extends ComplexTestC
+         // .....................................................................................................
+         // updating values in a deleted row should fail
+         deleteRandom();
+-        final XRowUpdate rowUpdated = UnoRuntime.queryInterface( XRowUpdate.class, m_resultSet );
++        final XRowUpdate rowUpdated = (XRowUpdate) UnoRuntime.queryInterface( XRowUpdate.class, m_resultSet );
+         caughtException = false;
+         try
+         {
+@@ -755,7 +755,6 @@ public class RowSet extends ComplexTestC
+     /** checks whether deletions on the main RowSet properly interfere (or don't interfere) with the movement
+      *  on a clone of the RowSet
+      */
+-    @SuppressWarnings("empty-statement")
+     public void testCloneMovesPlusDeletions() throws SQLException, UnknownPropertyException, WrappedTargetException
+     {
+         createTestCase(true);
+@@ -763,7 +762,7 @@ public class RowSet extends ComplexTestC
+         m_resultSet.last();
+ 
+         final XResultSet clone = createClone();
+-        final XRowLocate cloneRowLocate = UnoRuntime.queryInterface( XRowLocate.class, clone );
++        final XRowLocate cloneRowLocate = (XRowLocate) UnoRuntime.queryInterface( XRowLocate.class, clone );
+ 
+         positionRandom();
+ 
+@@ -828,10 +827,10 @@ public class RowSet extends ComplexTestC
+     {
+         createTestCase(true);
+         // ensure that all records are known
+-        m_rowSetProperties.setPropertyValue("FetchSize", Integer.valueOf(10));
++        m_rowSetProperties.setPropertyValue("FetchSize", new Integer(10));
+ 
+         final XResultSet clone = createClone();
+-        final XRow cloneRow = UnoRuntime.queryInterface( XRow.class, clone );
++        final XRow cloneRow = (XRow) UnoRuntime.queryInterface( XRow.class, clone );
+ 
+         // .....................................................................................................
+         // first check the basic scenario without the |moveToInsertRow| |moveToCurrentRow|, to ensure that
+@@ -887,7 +886,7 @@ public class RowSet extends ComplexTestC
+         {
+             createRowSet("SELECT * FROM \"customers\"", CommandType.COMMAND, true);
+             m_rowSetProperties.setPropertyValue("Command", "SELECT * FROM \"customers\" WHERE \"City\" = :city");
+-            final XParameters rowsetParams = UnoRuntime.queryInterface( XParameters.class, m_rowSet );
++            final XParameters rowsetParams = (XParameters) UnoRuntime.queryInterface( XParameters.class, m_rowSet );
+             rowsetParams.setString(1, "London");
+             m_rowSet.execute();
+         }
+@@ -914,7 +913,7 @@ public class RowSet extends ComplexTestC
+ 
+         for (int i = 0; i < expected; ++i)
+         {
+-            final XPropertySet parameter = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( i ) );
++            final XPropertySet parameter = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( i ) );
+ 
+             final String expectedName = _paramNames[i];
+             final String foundName = (String) parameter.getPropertyValue("Name");
+@@ -951,11 +950,11 @@ public class RowSet extends ComplexTestC
+             createRowSet("products like", CommandType.QUERY, false);
+ 
+             // let's fill in a parameter value via XParameters, and see whether it is respected by the parameters container
+-            final XParameters rowsetParams = UnoRuntime.queryInterface(XParameters.class, m_rowSet);
++            final XParameters rowsetParams = (XParameters) UnoRuntime.queryInterface(XParameters.class, m_rowSet);
+             rowsetParams.setString(1, "Apples");
+ 
+             XIndexAccess params = m_paramsSupplier.getParameters();
+-            XPropertySet firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) );
++            XPropertySet firstParam = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) );
+             Object firstParamValue = firstParam.getPropertyValue("Value");
+ 
+             assure("XParameters and the parameters container do not properly interact",
+@@ -969,7 +968,7 @@ public class RowSet extends ComplexTestC
+                 // the execution of the row set. It currently doesn't (though the values it represents do).
+                 // It would be nice, but not strictly necessary, if it would.
+                 params = m_paramsSupplier.getParameters();
+-                firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) );
++                firstParam = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) );
+             }
+             firstParamValue = firstParam.getPropertyValue("Value");
+             assure("XParameters and the parameters container do not properly interact, after the row set has been executed",
+--- dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java	2010-09-08 18:33:35.000000000 +0200
+@@ -52,14 +52,20 @@ public abstract class CRMBasedTestCase e
+     }
+ 
+     // --------------------------------------------------------------------------------------------------------
+-    @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. 
+     public void before()
+     {
+         createTestCase();
+     }
+ 
+     // --------------------------------------------------------------------------------------------------------
+-    @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. 
+     public void after()
+     {
+         try
+--- dbaccess/qa/complex/dbaccess/Query.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/Query.java	2010-09-08 18:54:39.000000000 +0200
+@@ -85,7 +85,7 @@ public class Query extends complexlib.Co
+ 
+         try
+         {
+-            final XQueriesSupplier suppQueries = UnoRuntime.queryInterface(
++            final XQueriesSupplier suppQueries = (XQueriesSupplier) UnoRuntime.queryInterface(
+                 XQueriesSupplier.class, m_database.defaultConnection().getXConnection() );
+             final XNameAccess queries = suppQueries.getQueries();
+ 
+@@ -98,12 +98,12 @@ public class Query extends complexlib.Co
+ 
+             for ( int i = 0; i < queryNames.length; ++i )
+             {
+-                final XPropertySet query = UnoRuntime.queryInterface(
++                final XPropertySet query = (XPropertySet) UnoRuntime.queryInterface(
+                     XPropertySet.class, queries.getByName( queryNames[i] ) );
+ 
+-                final XColumnsSupplier suppCols = UnoRuntime.queryInterface(
++                final XColumnsSupplier suppCols = (XColumnsSupplier) UnoRuntime.queryInterface(
+                     XColumnsSupplier.class, query);
+-                final XIndexAccess columns = UnoRuntime.queryInterface(
++                final XIndexAccess columns = (XIndexAccess) UnoRuntime.queryInterface(
+                     XIndexAccess.class, suppCols.getColumns());
+ 
+                 // check whether the columns supplied by the query match what we expected
+@@ -111,7 +111,7 @@ public class Query extends complexlib.Co
+                     columns.getCount() == expectedColumnNames[i].length );
+                 for ( int col = 0; col < columns.getCount(); ++col )
+                 {
+-                    final XNamed columnName = UnoRuntime.queryInterface(
++                    final XNamed columnName = (XNamed) UnoRuntime.queryInterface(
+                         XNamed.class, columns.getByIndex(col) );
+                     assure( "column no. " + col + " of query \"" + queryNames[i] + "\" not matching",
+                         columnName.getName().equals( expectedColumnNames[i][col] ) );
+--- dbaccess/qa/complex/dbaccess/Beamer.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/Beamer.java	2010-09-08 18:41:45.000000000 +0200
+@@ -159,7 +159,7 @@ public class Beamer extends complexlib.C
+         final PropertyValue[] props = new PropertyValue[]
+         {
+             new PropertyValue("DataSourceName", 0, "Bibliography", PropertyState.DIRECT_VALUE),
+-            new PropertyValue("CommandType", 0, Integer.valueOf(CommandType.TABLE), PropertyState.DIRECT_VALUE),
++            new PropertyValue("CommandType", 0, new Integer(CommandType.TABLE), PropertyState.DIRECT_VALUE),
+             new PropertyValue("Command", 0, "biblio", PropertyState.DIRECT_VALUE)
+         };
+         
+--- dbaccess/qa/complex/dbaccess/UISettings.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/UISettings.java	2010-09-08 19:04:38.000000000 +0200
+@@ -65,14 +65,14 @@ public class UISettings extends TestCase
+         CRMDatabase database = new CRMDatabase( getORB(), true );
+ 
+         // display a table
+-        XFormController tableViewController = UnoRuntime.queryInterface( XFormController.class,
++        XFormController tableViewController = (XFormController) UnoRuntime.queryInterface( XFormController.class,
+             database.loadSubComponent( DatabaseObject.TABLE, "customers" ) );
+-        XPropertySet tableControlModel = UnoRuntime.queryInterface( XPropertySet.class,
++        XPropertySet tableControlModel = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class,
+             tableViewController.getCurrentControl().getModel() );
+ 
+         // change the table's formatting
+         tableControlModel.setPropertyValue( "FontName", "Andale Sans UI" );
+-        tableControlModel.setPropertyValue( "FontHeight", Float.valueOf( 20 ) );
++        tableControlModel.setPropertyValue( "FontHeight", new Float( 20 ) );
+         tableControlModel.setPropertyValue( "FontSlant", FontSlant.ITALIC );
+ 
+         String docURL = database.getDatabase().getModel().getURL();
+@@ -92,9 +92,9 @@ public class UISettings extends TestCase
+         database = new CRMDatabase( getORB(), docURL );
+ 
+         // display the table, again
+-        tableViewController = UnoRuntime.queryInterface( XFormController.class,
++        tableViewController = (XFormController) UnoRuntime.queryInterface( XFormController.class,
+             database.loadSubComponent( DatabaseObject.TABLE, "customers" ) );
+-        tableControlModel = UnoRuntime.queryInterface( XPropertySet.class,
++        tableControlModel = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class,
+             tableViewController.getCurrentControl().getModel() );
+ 
+         // verify the properties
+@@ -118,30 +118,30 @@ public class UISettings extends TestCase
+ 
+         // display a table
+         XController tableView = database.loadSubComponent( DatabaseObject.TABLE, "customers" );
+-        XFormController tableViewController = UnoRuntime.queryInterface( XFormController.class,
++        XFormController tableViewController = (XFormController) UnoRuntime.queryInterface( XFormController.class,
+              tableView );
+-        XNameAccess tableControlModel = UnoRuntime.queryInterface( XNameAccess.class,
++        XNameAccess tableControlModel = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class,
+             tableViewController.getCurrentControl().getModel() );
+ 
+         // change the formatting of a table column
+-        XPropertySet idColumn = UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) );
++        XPropertySet idColumn = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) );
+         assure( "precondition not met: column already centered",
+             ((Short)idColumn.getPropertyValue( "Align" )).shortValue() != TextAlign.CENTER );
+-        idColumn.setPropertyValue( "Align", TextAlign.CENTER );
++        idColumn.setPropertyValue( "Align", new Integer(TextAlign.CENTER) );
+ 
+         // close the table data view
+-        XCloseable closeSubComponent = UnoRuntime.queryInterface( XCloseable.class, tableView.getFrame() );
++        XCloseable closeSubComponent = (XCloseable) UnoRuntime.queryInterface( XCloseable.class, tableView.getFrame() );
+         closeSubComponent.close( true );
+ 
+         // create a query based on that column
+         database.getDatabase().getDataSource().createQuery( "q_customers", "SELECT * FROM \"customers\"" );
+ 
+         // load this query, and verify the table column settings was propagated to the query column
+-        XFormController queryViewController = UnoRuntime.queryInterface( XFormController.class,
++        XFormController queryViewController = (XFormController) UnoRuntime.queryInterface( XFormController.class,
+             database.loadSubComponent( DatabaseObject.QUERY, "q_customers" ) );
+-        tableControlModel = UnoRuntime.queryInterface( XNameAccess.class,
++        tableControlModel = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class,
+             queryViewController.getCurrentControl().getModel() );
+-        idColumn = UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) );
++        idColumn = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) );
+ 
+         assure( "table column alignment was not propagated to the query column",
+             ((Short)idColumn.getPropertyValue( "Align" )).shortValue() == TextAlign.CENTER );
+--- dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java.old	2010-08-24 17:01:36.000000000 +0200
++++ dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java	2010-09-08 19:01:54.000000000 +0200
+@@ -288,7 +288,7 @@ public class SingleSelectQueryComposer e
+             filter.addProperty("RealName", PropertyAttribute.MAYBEVOID, "Comment");
+             filter.addProperty("TableName", PropertyAttribute.MAYBEVOID, "customers");
+             filter.addProperty("Value", PropertyAttribute.MAYBEVOID, "Good one.");
+-            filter.addProperty("Type", PropertyAttribute.MAYBEVOID, Integer.valueOf(DataType.LONGVARCHAR));
++            filter.addProperty("Type", PropertyAttribute.MAYBEVOID, new Integer(DataType.LONGVARCHAR));
+             final XPropertySet column = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,filter);
+ 
+             m_composer.appendFilterByColumn(column, true,SQLFilterOperator.LIKE);
+@@ -387,7 +387,7 @@ public class SingleSelectQueryComposer e
+                         new PropertyValue("CustomerID", SQLFilterOperator.EQUAL, "\"customers\".\"ID\"", PropertyState.DIRECT_VALUE),
+                         new PropertyValue("OrderID", SQLFilterOperator.EQUAL, "\"orders\".\"ID\"", PropertyState.DIRECT_VALUE),
+                         new PropertyValue("ProductID", SQLFilterOperator.EQUAL, "\"products\".\"ID\"", PropertyState.DIRECT_VALUE),
+-                        new PropertyValue("ID", SQLFilterOperator.EQUAL, Integer.valueOf(2), PropertyState.DIRECT_VALUE)
++                        new PropertyValue("ID", SQLFilterOperator.EQUAL, new Integer(2), PropertyState.DIRECT_VALUE)
+                     }
+                 });
+ 
commit 12187e91cb5332c867d344d246dd2a64bec81c28
Author: Petr Mladek <pmladek at walk.suse.cz>
Date:   Wed Sep 8 18:30:25 2010 +0200

    fix forms build with java-1.4

diff --git a/patches/dev300/apply b/patches/dev300/apply
index b6f6bf7..c1a442a 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1079,6 +1079,7 @@ 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
+build-java-1.4-forms.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-forms.diff b/patches/dev300/build-java-1.4-forms.diff
new file mode 100644
index 0000000..ccfc356
--- /dev/null
+++ b/patches/dev300/build-java-1.4-forms.diff
@@ -0,0 +1,351 @@
+--- forms/qa/integration/forms/MasterDetailForms.java.old	2010-08-25 22:34:06.000000000 +0200
++++ forms/qa/integration/forms/MasterDetailForms.java	2010-09-08 18:20:28.000000000 +0200
+@@ -139,7 +139,7 @@ public class MasterDetailForms extends c
+ 
+         m_detailResult = new ResultSet( m_detailForm );
+ 
+-        XNameContainer masterContainer = UnoRuntime.queryInterface( XNameContainer.class, m_masterForm );
++        XNameContainer masterContainer = (XNameContainer) UnoRuntime.queryInterface( XNameContainer.class, m_masterForm );
+         masterContainer.insertByName( "slave", m_detailForm );
+     }
+ 
+@@ -158,8 +158,8 @@ public class MasterDetailForms extends c
+             m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID1", "ID2" } );
+             m_detailForm.setPropertyValue( "DetailFields", new String[] { "FK_ID1", "FK_ID2" } );
+ 
+-            XLoadable loadMaster = UnoRuntime.queryInterface( XLoadable.class, m_masterForm );
+-            XLoadable loadDetail = UnoRuntime.queryInterface( XLoadable.class, m_detailForm );
++            XLoadable loadMaster = (XLoadable) UnoRuntime.queryInterface( XLoadable.class, m_masterForm );
++            XLoadable loadDetail = (XLoadable) UnoRuntime.queryInterface( XLoadable.class, m_detailForm );
+             loadDetail.addLoadListener( this );
+ 
+             // wait until the detail form is loaded
+@@ -223,14 +223,14 @@ public class MasterDetailForms extends c
+             database = new CRMDatabase( m_orb, true );
+ 
+             // create a form document therein
+-            XFormDocumentsSupplier formDocSupp = UnoRuntime.queryInterface( XFormDocumentsSupplier.class, database.getDatabase().getModel() );
+-            XMultiServiceFactory formFactory = UnoRuntime.queryInterface( XMultiServiceFactory.class, formDocSupp.getFormDocuments() );
++            XFormDocumentsSupplier formDocSupp = (XFormDocumentsSupplier) UnoRuntime.queryInterface( XFormDocumentsSupplier.class, database.getDatabase().getModel() );
++            XMultiServiceFactory formFactory = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, formDocSupp.getFormDocuments() );
+             NamedValue[] loadArgs = new NamedValue[] {
+                 new NamedValue( "ActiveConnection", database.getConnection().getXConnection() ),
+                 new NamedValue( "MediaType", "application/vnd.oasis.opendocument.text" )
+             };
+ 
+-            subComponentCommands = UnoRuntime.queryInterface(
++            subComponentCommands = (XCommandProcessor) UnoRuntime.queryInterface(
+                 XCommandProcessor.class,
+                 formFactory.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", loadArgs ) );
+             Command command = new Command();
+@@ -238,7 +238,7 @@ public class MasterDetailForms extends c
+             command.Argument = new Short( OpenMode.DOCUMENT );
+ 
+             DocumentHelper subDocument = new DocumentHelper( m_orb,
+-                UnoRuntime.queryInterface( XComponent.class,
++                (XComponent) UnoRuntime.queryInterface( XComponent.class,
+                     subComponentCommands.execute( command, subComponentCommands.createCommandIdentifier(), null )
+                 )
+             );
+@@ -252,7 +252,7 @@ public class MasterDetailForms extends c
+             m_masterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
+ 
+             // create a detail form
+-            m_detailForm = UnoRuntime.queryInterface( XPropertySet.class, subDocument.createSubForm( m_masterForm, "products" ) );
++            m_detailForm = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, subDocument.createSubForm( m_masterForm, "products" ) );
+             m_detailForm.setPropertyValue( "Command", "SELECT \"ID\", \"Name\", \"CategoryID\" FROM \"products\"" );
+             m_detailForm.setPropertyValue( "CommandType", new Integer( CommandType.COMMAND ) );
+             m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID" } );
+@@ -261,7 +261,7 @@ public class MasterDetailForms extends c
+             // create a grid control in the detail form, with some columns
+             XPropertySet gridControlModel = formLayer.createControlAndShape( "GridControl", 20, 40, 130, 50, m_detailForm );
+             gridControlModel.setPropertyValue( "Name", "product list" );
+-            XIndexContainer gridColumns = UnoRuntime.queryInterface( XIndexContainer.class, gridControlModel );
++            XIndexContainer gridColumns = (XIndexContainer) UnoRuntime.queryInterface( XIndexContainer.class, gridControlModel );
+                                       impl_createGridColumn( gridColumns, "TextField", "ID" );
+             XPropertySet nameColumn = impl_createGridColumn( gridColumns, "TextField", "Name" );
+             nameColumn.setPropertyValue( "Width", new Integer( 600 ) ); // 6 cm
+@@ -271,7 +271,7 @@ public class MasterDetailForms extends c
+             m_masterResult = new ResultSet( m_masterForm );
+             m_detailResult = new ResultSet( m_detailForm );
+ 
+-            XLoadable loadDetail = UnoRuntime.queryInterface( XLoadable.class, m_detailForm );
++            XLoadable loadDetail = (XLoadable) UnoRuntime.queryInterface( XLoadable.class, m_detailForm );
+             loadDetail.addLoadListener( this );
+ 
+             subDocument.getCurrentView().toggleFormDesignMode();
+@@ -306,8 +306,8 @@ public class MasterDetailForms extends c
+         {
+             if ( subComponentCommands != null )
+             {
+-                XComponentSupplier componentSupplier = UnoRuntime.queryInterface( XComponentSupplier.class, subComponentCommands );
+-                XModifiable modifySubComponent = UnoRuntime.queryInterface( XModifiable.class, componentSupplier.getComponent() );
++                XComponentSupplier componentSupplier = (XComponentSupplier) UnoRuntime.queryInterface( XComponentSupplier.class, subComponentCommands );
++                XModifiable modifySubComponent = (XModifiable) UnoRuntime.queryInterface( XModifiable.class, componentSupplier.getComponent() );
+                 modifySubComponent.setModified( false );
+                 Command command = new Command();
+                 command.Name = "close";
+@@ -339,7 +339,7 @@ public class MasterDetailForms extends c
+     /* ------------------------------------------------------------------ */
+     private XPropertySet impl_createGridColumn( final XIndexContainer _gridModel, final String _columnType, final String _boundField ) throws Exception
+     {
+-        final XGridColumnFactory columnFactory = UnoRuntime.queryInterface( XGridColumnFactory.class, _gridModel );
++        final XGridColumnFactory columnFactory = (XGridColumnFactory) UnoRuntime.queryInterface( XGridColumnFactory.class, _gridModel );
+         XPropertySet column = columnFactory.createColumn( _columnType );
+         column.setPropertyValue( "DataField", _boundField );
+         column.setPropertyValue( "Name", _boundField );
+@@ -388,8 +388,8 @@ public class MasterDetailForms extends c
+      */
+     private void verifyColumnValueIdentity( final String masterColName, final String detailColName ) throws SQLException
+     {
+-        XColumnLocate locateMasterCols = UnoRuntime.queryInterface( XColumnLocate.class, m_masterForm );
+-        XColumnLocate locateDetailCols = UnoRuntime.queryInterface( XColumnLocate.class, m_detailForm );
++        XColumnLocate locateMasterCols = (XColumnLocate) UnoRuntime.queryInterface( XColumnLocate.class, m_masterForm );
++        XColumnLocate locateDetailCols = (XColumnLocate) UnoRuntime.queryInterface( XColumnLocate.class, m_detailForm );
+ 
+         int masterValue = m_masterResult.getInt( locateMasterCols.findColumn( masterColName ) );
+         int detailValue = m_detailResult.getInt( locateDetailCols.findColumn( detailColName ) );
+--- forms/qa/integration/forms/FormPropertyBags.java.old	2010-08-25 22:34:06.000000000 +0200
++++ forms/qa/integration/forms/FormPropertyBags.java	2010-09-08 18:16:59.000000000 +0200
+@@ -85,7 +85,7 @@ public class FormPropertyBags extends co
+     {
+         if ( m_document != null )
+         {
+-            XCloseable closeDoc = UnoRuntime.queryInterface( XCloseable.class, m_document.getDocument() );
++            XCloseable closeDoc = (XCloseable) UnoRuntime.queryInterface( XCloseable.class, m_document.getDocument() );
+             closeDoc.close( true );
+         }
+     }
+@@ -102,7 +102,7 @@ public class FormPropertyBags extends co
+         XPropertySet textFieldModel = m_formLayer.createControlAndShape( "DatabaseTextField", 10, 10, 25, 6 );
+ 
+         // check whether adding new properties is successful
+-        XPropertyContainer propContainer = UnoRuntime.queryInterface(
++        XPropertyContainer propContainer = (XPropertyContainer) UnoRuntime.queryInterface(
+             XPropertyContainer.class, textFieldModel );
+         assure("XPropertyContainer not supported!", propContainer != null );
+ 
+@@ -160,7 +160,7 @@ public class FormPropertyBags extends co
+     private void impl_checkPropertyPersistence() throws com.sun.star.uno.Exception
+     {
+         // store the document
+-        XStorable store = UnoRuntime.queryInterface( XStorable.class, m_document.getDocument() );
++        XStorable store = (XStorable) UnoRuntime.queryInterface( XStorable.class, m_document.getDocument() );
+         String documentURL = util.utils.getOfficeTemp( m_orb ) + "document.odt";
+         PropertyValue[] storeArguments = new PropertyValue[] { new PropertyValue() };
+         storeArguments[0].Name = "FilterName";
+--- forms/qa/integration/forms/DocumentHelper.java.old	2010-08-25 22:34:06.000000000 +0200
++++ forms/qa/integration/forms/DocumentHelper.java	2010-09-08 18:07:38.000000000 +0200
+@@ -127,7 +127,7 @@ public class DocumentHelper
+     public static DocumentHelper blankDocument( XMultiServiceFactory orb, DocumentType eType ) throws com.sun.star.uno.Exception
+     {
+         final PropertyValue[] args = new PropertyValue[] {
+-            new PropertyValue( "MacroExecutionMode", -1, MacroExecMode.ALWAYS_EXECUTE, PropertyState.DIRECT_VALUE )
++            new PropertyValue( "MacroExecutionMode", -1, new Short(MacroExecMode.ALWAYS_EXECUTE), PropertyState.DIRECT_VALUE )
+         };
+         return implLoadDocument( orb, getDocumentFactoryURL( eType ), args );
+     }
+--- forms/qa/integration/forms/ListBox.java.old	2010-08-25 22:34:06.000000000 +0200
++++ forms/qa/integration/forms/ListBox.java	2010-09-08 18:27:17.000000000 +0200
+@@ -75,9 +75,9 @@ public class ListBox extends TestCase
+             // create the form document
+             prepareDocument();
+ 
+-            final XIndexAccess formsCollection = UnoRuntime.queryInterface( XIndexAccess.class,
++            final XIndexAccess formsCollection = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class,
+                 m_document.getFormComponentTreeRoot() );
+-            final XNameAccess form = UnoRuntime.queryInterface( XNameAccess.class, formsCollection.getByIndex(0) );
++            final XNameAccess form = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, formsCollection.getByIndex(0) );
+ 
+             final DocumentViewHelper view = m_document.getCurrentView();
+             final XFormController formController = view.getFormController( form );
+@@ -97,7 +97,7 @@ public class ListBox extends TestCase
+                 {
+                     final String columnFKName = fieldTypes[i] + "_fk";
+                     Object listBoxModel = form.getByName( columnFKName );
+-                    XListBox listBoxControl = UnoRuntime.queryInterface(  XListBox.class,
++                    XListBox listBoxControl = (XListBox) UnoRuntime.queryInterface(  XListBox.class,
+                         view.getControl( listBoxModel ) );
+                     if ( !listBoxControl.getSelectedItem().equals( displayValues[row] ) )
+                     {
+@@ -149,7 +149,7 @@ public class ListBox extends TestCase
+     /* ------------------------------------------------------------------ */
+     private String[] impl_getTypedValue( final String _asType, final int _rowNum ) throws SQLException
+     {
+-        Map< String, String[] > valueMap = new HashMap< String, String[] >();
++        Map valueMap = new HashMap();
+         valueMap.put( "bigint",     new String[] { "1111111111", "222222222" } );
+         valueMap.put( "boolean",    new String[] { "false", "true" } );
+         valueMap.put( "date",       new String[] { "2001-01-01", "2002-02-02" } );
+@@ -162,7 +162,7 @@ public class ListBox extends TestCase
+         valueMap.put( "tinyint",    new String[] { "1", "2" } );
+         valueMap.put( "varchar",    new String[] { "first", "second" } );
+ 
+-        return valueMap.get( _asType );
++        return (String[]) valueMap.get( _asType );
+     }
+ 
+     /* ------------------------------------------------------------------ */
+@@ -184,10 +184,10 @@ public class ListBox extends TestCase
+             final String[] keyTypes = fieldDefinitions[0];
+             final String[] keyCreationArgs = fieldDefinitions[1];
+ 
+-            Vector< HsqlColumnDescriptor > foreignKeyColumns = new Vector< HsqlColumnDescriptor >();
++            Vector foreignKeyColumns = new Vector();
+             foreignKeyColumns.add( new HsqlColumnDescriptor( "ID", "integer", HsqlColumnDescriptor.PRIMARY ) );
+ 
+-            Vector< String[] > foreignKeyValues = new Vector< String[] >();
++            Vector foreignKeyValues = new Vector();
+ 
+             StringBuffer foreignKeyInsertSQL = new StringBuffer();
+             foreignKeyInsertSQL.append( "INSERT INTO \"" + m_foreignKeyTableName + "\" VALUES (?" );
+@@ -213,7 +213,7 @@ public class ListBox extends TestCase
+                 sql.append( tableName );
+                 sql.append( "\" VALUES (?, ?)");
+                 XPreparedStatement statement = connection.prepareStatement( sql.toString() );
+-                XParameters statementParameters = UnoRuntime.queryInterface( XParameters.class, statement );
++                XParameters statementParameters = (XParameters) UnoRuntime.queryInterface( XParameters.class, statement );
+ 
+                 final String[] keyValues = impl_getTypedValue( keyTypes[i], 0 );
+ 
+@@ -234,17 +234,17 @@ public class ListBox extends TestCase
+             }
+ 
+             // create the table taking all those foreign keys
+-            m_database.createTable( new HsqlTableDescriptor( m_foreignKeyTableName, foreignKeyColumns.toArray( new HsqlColumnDescriptor[0] ) ) );
++            m_database.createTable( new HsqlTableDescriptor( m_foreignKeyTableName, (HsqlColumnDescriptor[]) foreignKeyColumns.toArray( new HsqlColumnDescriptor[0] ) ) );
+             // fill in some data
+             foreignKeyInsertSQL.append( ")" );
+             XPreparedStatement statement = connection.prepareStatement( foreignKeyInsertSQL.toString() );
+-            XParameters statementParameters = UnoRuntime.queryInterface( XParameters.class, statement );
++            XParameters statementParameters = (XParameters) UnoRuntime.queryInterface( XParameters.class, statement );
+             for ( int row=0; row<2; ++row )
+             {
+                 statementParameters.setInt( 1, row );
+                 for ( int i=0; i<keyTypes.length; ++i )
+                 {
+-                    statementParameters.setString( i+2, foreignKeyValues.get(i)[row] );
++                    statementParameters.setString( i+2, ((String[])foreignKeyValues.get(i))[row] );
+                 }
+                 statement.execute();
+             }
+@@ -266,7 +266,7 @@ public class ListBox extends TestCase
+         // bind the form to the foreign_keys table
+         XPropertySet form = dbfTools.queryPropertySet( dbfTools.getParent( controlModel, XChild.class ) );
+         form.setPropertyValue( "Command", m_foreignKeyTableName );
+-        form.setPropertyValue( "CommandType", CommandType.TABLE );
++        form.setPropertyValue( "CommandType", new Integer (CommandType.TABLE) );
+         form.setPropertyValue( "DataSourceName", m_database.getDocumentURL() );
+ 
+         // create list boxes for the different foreign keys
+--- forms/qa/integration/forms/FormLayer.java.old	2010-08-25 22:34:06.000000000 +0200
++++ forms/qa/integration/forms/FormLayer.java	2010-09-08 18:10:41.000000000 +0200
+@@ -96,9 +96,9 @@ public class FormLayer
+         int nYPos, int nWidth, int nHeight, Object _parentForm ) throws java.lang.Exception
+     {
+         // let the document create a shape
+-        XMultiServiceFactory xDocAsFactory = UnoRuntime.queryInterface(
++        XMultiServiceFactory xDocAsFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(
+             XMultiServiceFactory.class, m_document.getDocument() );
+-        XControlShape xShape = UnoRuntime.queryInterface( XControlShape.class,
++        XControlShape xShape = (XControlShape) UnoRuntime.queryInterface( XControlShape.class,
+             xDocAsFactory.createInstance( "com.sun.star.drawing.ControlShape" ) );
+ 
+         // position and size of the shape
+@@ -112,7 +112,7 @@ public class FormLayer
+ 
+         // create the form component (the model of a form control)
+         String sQualifiedComponentName = "com.sun.star.form.component." + sFormComponentService;
+-        XControlModel xModel = UnoRuntime.queryInterface( XControlModel.class,
++        XControlModel xModel = (XControlModel) UnoRuntime.queryInterface( XControlModel.class,
+             m_document.getOrb().createInstance( sQualifiedComponentName ) );
+ 
+         // insert the model into the form component hierarchy, if the caller gave us a location
+@@ -122,7 +122,7 @@ public class FormLayer
+             if ( _parentForm instanceof XIndexContainer )
+                 parentForm = (XIndexContainer)_parentForm;
+             else
+-                parentForm = UnoRuntime.queryInterface( XIndexContainer.class, _parentForm );
++                parentForm = (XIndexContainer) UnoRuntime.queryInterface( XIndexContainer.class, _parentForm );
+             parentForm.insertByIndex( parentForm.getCount(), xModel );
+         }
+ 
+@@ -132,7 +132,7 @@ public class FormLayer
+         // add the shape to the shapes collection of the document
+         XDrawPage pageWhereToInsert = ( m_page != null ) ? m_page : m_document.getMainDrawPage();
+ 
+-        XShapes xDocShapes = UnoRuntime.queryInterface( XShapes.class, pageWhereToInsert );
++        XShapes xDocShapes = (XShapes) UnoRuntime.queryInterface( XShapes.class, pageWhereToInsert );
+         xDocShapes.add( xShape );
+ 
+         // and outta here with the XPropertySet interface of the model
+@@ -281,7 +281,7 @@ public class FormLayer
+     */
+     public XPropertySet getRadioModelByRefValue( XPropertySet form, String name, String refValue ) throws com.sun.star.uno.Exception, java.lang.Exception
+     {
+-        XIndexAccess indexAccess = UnoRuntime.queryInterface( XIndexAccess.class, form );
++        XIndexAccess indexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, form );
+ 
+         for ( int i=0; i<indexAccess.getCount(); ++i )
+         {
+@@ -305,7 +305,7 @@ public class FormLayer
+     */
+     public XPropertySet getRadioModelByTag( XPropertySet form, String name, String tag ) throws com.sun.star.uno.Exception, java.lang.Exception
+     {
+-        XIndexAccess indexAccess = UnoRuntime.queryInterface( XIndexAccess.class, form );
++        XIndexAccess indexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, form );
+ 
+         for ( int i=0; i<indexAccess.getCount(); ++i )
+         {
+@@ -366,10 +366,10 @@ public class FormLayer
+         // doing a user input, as the latter will trigger a lot of notifications, which the forms runtime environment
+         // (namely the FormController) relies on to notice that the control changed.
+         // Instead, we use the Accessibility interfaces of the control to simulate text input
+-        XAccessible formattedAccessible = UnoRuntime.queryInterface( XAccessible.class,
++        XAccessible formattedAccessible = (XAccessible) UnoRuntime.queryInterface( XAccessible.class,
+             m_document.getCurrentView().getControl( controlModel )
+         );
+-        XAccessibleEditableText textAccess = UnoRuntime.queryInterface( XAccessibleEditableText.class,
++        XAccessibleEditableText textAccess = (XAccessibleEditableText) UnoRuntime.queryInterface( XAccessibleEditableText.class,
+             formattedAccessible.getAccessibleContext() );
+         textAccess.setText( text );
+     }
+--- forms/qa/integration/forms/dbfTools.java.old	2010-08-25 22:34:06.000000000 +0200
++++ forms/qa/integration/forms/dbfTools.java	2010-09-08 18:17:41.000000000 +0200
+@@ -24,7 +24,7 @@ class dbfTools
+     */
+     static public XPropertySet queryPropertySet( Object aComp )
+     {
+-        return UnoRuntime.queryInterface( XPropertySet.class, aComp );
++        return (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, aComp );
+     }
+ 
+     /* ------------------------------------------------------------------ */
+@@ -32,7 +32,7 @@ class dbfTools
+     */
+     static public XIndexContainer queryIndexContainer( Object aComp )
+     {
+-        return UnoRuntime.queryInterface( XIndexContainer.class, aComp );
++        return (XIndexContainer) UnoRuntime.queryInterface( XIndexContainer.class, aComp );
+     }
+ 
+     /* ------------------------------------------------------------------ */
+@@ -40,16 +40,15 @@ class dbfTools
+     */
+     static public XComponent queryComponent( Object aComp )
+     {
+-        return UnoRuntime.queryInterface( XComponent.class, aComp );
++        return (XComponent) UnoRuntime.queryInterface( XComponent.class, aComp );
+     }
+ 
+     /* ------------------------------------------------------------------ */
+     /** retrieves the parent of the given object
+     */
+-    @SuppressWarnings("unchecked")
+     static Object getParent( Object aComponent, Class aInterfaceClass )
+     {
+-        XChild xAsChild = UnoRuntime.queryInterface( XChild.class, aComponent );
++        XChild xAsChild = (XChild) UnoRuntime.queryInterface( XChild.class, aComponent );
+         return UnoRuntime.queryInterface( aInterfaceClass, xAsChild.getParent() );
+     }
+ };


More information about the ooo-build-commit mailing list