diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-04 10:38:39 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-04 10:38:39 +0100 |
commit | 5b41f1c3927c02d03baaf438741c4ca04694eaca (patch) | |
tree | ae32f4fe4fd932bbc2a51a4e23f835797e74a7ea | |
parent | 6a35ea7299d8c34e86a5ec69ccb064a51d27ae1a (diff) | |
parent | d9ed7227b8d4dd6cbdceb7ca86997982e8680874 (diff) |
autorecovery: commit resolved merge (after rebase to m71)
-rw-r--r-- | odk/examples/DevelopersGuide/UCB/ResourceCreator.java | 18 |
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... |