summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-01-26 13:09:27 +0100
committerIvo Hinkelmann <ihi@openoffice.org>2010-01-26 13:09:27 +0100
commitd9ed7227b8d4dd6cbdceb7ca86997982e8680874 (patch)
treeda53d067567694b566b21175df135328d48bd6c6
parent1d4b8987ffdfc93fb61e05dd40c6967993268a6e (diff)
parent97cc93cbc829184a5863bf3c01fd45ebc2e5bdcb (diff)
CWS-TOOLING: integrate CWS kso42
Notes
Notes: split repo tag: sdk_ooo/DEV300_m71
-rw-r--r--odk/examples/DevelopersGuide/UCB/ResourceCreator.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/odk/examples/DevelopersGuide/UCB/ResourceCreator.java b/odk/examples/DevelopersGuide/UCB/ResourceCreator.java
index 202941e1772a..c28bc47ea866 100644
--- a/odk/examples/DevelopersGuide/UCB/ResourceCreator.java
+++ b/odk/examples/DevelopersGuide/UCB/ResourceCreator.java
@@ -43,7 +43,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.ucb.ContentInfo;
import com.sun.star.ucb.InsertCommandArgument;
import com.sun.star.ucb.XContent;
-import com.sun.star.ucb.XContentCreator;
import com.sun.star.io.XInputStream;
@@ -154,18 +153,17 @@ public class ResourceCreator {
boolean result = false;
if ( stream != null && name != null && !name.equals( "" )) {
- // Obtain content creator interface.
- XContentCreator creator = ( XContentCreator )UnoRuntime.queryInterface(
- XContentCreator.class, m_content );
-
- // Note: The data for info may have been obtained using
- // XContentCreator::queryCreatableContentsInfo().
+ // Note: The data for info may have been obtained from
+ // property CreatableContentsInfo.
ContentInfo info = new ContentInfo();
info.Type = "application/vnd.sun.staroffice.fsys-file";
info.Attributes = 0;
- // Create new, empty content.
- XContent newContent = creator.createNewContent( info );
+ // Create new, empty content (execute command "createNewContent").
+ XContent newContent = ( XContent )UnoRuntime.queryInterface(
+ XContent.class,
+ m_helper.executeCommand( m_content, "createNewContent", info ) );
+
if ( newContent != null ) {
/////////////////////////////////////////////////////////////////////
@@ -181,7 +179,7 @@ public class ResourceCreator {
props[ 0 ] = prop;
// Execute command "setPropertyValues".
- m_helper.executeCommand( newContent, "setPropertyValues",props );
+ m_helper.executeCommand( newContent, "setPropertyValues", props );
/////////////////////////////////////////////////////////////////////
// Write the new file to disk...