summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Forms/KeyGenerator.java
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-01-31 15:30:50 +0000
committerRüdiger Timm <rt@openoffice.org>2005-01-31 15:30:50 +0000
commitea32261775ce7e547ef8a00a7adb22be51f3ee1e (patch)
tree23af3d779d4eb73a1351780c5a644ccf80113d82 /odk/examples/DevelopersGuide/Forms/KeyGenerator.java
parent3821462f20f1cb007093245e60cbf3e522279f99 (diff)
INTEGRATION: CWS sdksample (1.3.124); FILE MERGED
2004/10/28 15:31:58 jsc 1.3.124.2: #i29308# use new bootstrap mechanism 2004/10/07 09:20:57 jsc 1.3.124.1: #i29208# updated
Diffstat (limited to 'odk/examples/DevelopersGuide/Forms/KeyGenerator.java')
-rw-r--r--odk/examples/DevelopersGuide/Forms/KeyGenerator.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/Forms/KeyGenerator.java b/odk/examples/DevelopersGuide/Forms/KeyGenerator.java
index 9516a4cb1bf9..809e4e262a77 100644
--- a/odk/examples/DevelopersGuide/Forms/KeyGenerator.java
+++ b/odk/examples/DevelopersGuide/Forms/KeyGenerator.java
@@ -2,9 +2,9 @@
*
* $RCSfile: KeyGenerator.java,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2003-06-30 15:28:33 $
+ * last change: $Author: rt $ $Date: 2005-01-31 16:30:50 $
*
* The Contents of this file are made available subject to the terms of
* the BSD license.
@@ -70,7 +70,8 @@ class UniqueColumnValue
if ( CommandType.COMMAND == aCommandType.intValue() )
{
// get the connection from the form
- XConnection xFormConn = (XConnection)xForm.getPropertyValue( "ActiveConnection" );
+ XConnection xFormConn = (XConnection)UnoRuntime.queryInterface( XConnection.class,
+ xForm.getPropertyValue( "ActiveConnection" ) );
// and let it create a composer for us
XSQLQueryComposerFactory xComposerFac =
(XSQLQueryComposerFactory)UnoRuntime.queryInterface(
@@ -374,11 +375,12 @@ public class KeyGenerator
@param sFieldName
specifies the field which's value should be manipulated
*/
- public KeyGenerator( XPropertySet xForm, String sFieldName, XMultiServiceFactory xMSF )
+ public KeyGenerator( XPropertySet xForm, String sFieldName,
+ XComponentContext xCtx )
{
m_xForm = xForm;
- DocumentHelper aDocument = DocumentHelper.getDocumentForComponent( xForm, xMSF );
+ DocumentHelper aDocument = DocumentHelper.getDocumentForComponent( xForm, xCtx );
m_aResetKeyGenerator = new KeyGeneratorForReset( sFieldName, aDocument.getCurrentView() );
m_aUpdateKeyGenerator = new KeyGeneratorForUpdate( sFieldName );