From 31a7f24896b6cd2cad7f459f4af41be543343574 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 1 Aug 2006 15:32:39 +0000 Subject: INTEGRATION: CWS jsc12 (1.6.84); FILE MERGED 2006/07/31 08:00:25 oj 1.6.84.1: #i57664# fix for storable --- odk/examples/DevelopersGuide/Database/CodeSamples.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'odk/examples/DevelopersGuide/Database/CodeSamples.java') diff --git a/odk/examples/DevelopersGuide/Database/CodeSamples.java b/odk/examples/DevelopersGuide/Database/CodeSamples.java index 772bab3b2ca0..8ecd6407c424 100644 --- a/odk/examples/DevelopersGuide/Database/CodeSamples.java +++ b/odk/examples/DevelopersGuide/Database/CodeSamples.java @@ -2,9 +2,9 @@ * * $RCSfile: CodeSamples.java,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2005-01-31 16:19:30 $ + * last change: $Author: ihi $ $Date: 2006-08-01 16:32:39 $ * * The Contents of this file are made available subject to the terms of * the BSD license. @@ -61,6 +61,7 @@ public class CodeSamples { public static XComponentContext xContext; public static XMultiComponentFactory xMCF; + public static void main(String argv[]) throws java.lang.Exception { try { @@ -328,8 +329,10 @@ public class CodeSamples catch(com.sun.star.uno.Exception e) {} xCont.insertByName("Query1",xProp); - XStorable xStore = (XStorable)UnoRuntime.queryInterface(XStorable.class,xQuerySup); - xStore.store(); + XDocumentDataSource xDs = (XDocumentDataSource)UnoRuntime.queryInterface(XDocumentDataSource.class, xQuerySup); + + XStorable xStore = (XStorable)UnoRuntime.queryInterface(XStorable.class,xDs.getDatabaseDocument()); + xStore.store(); } // prints all column names from Query1 -- cgit