OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Java : load a document and OpenOffice extension

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Alexius
General User
General User


Joined: 30 Apr 2009
Posts: 13
Location: France

PostPosted: Wed Jul 08, 2009 11:13 pm    Post subject: Java : load a document and OpenOffice extension Reply with quote

I can load an OpenOffice document helped by a code snippet http://codesnippets.services.openoffice.org/Office/Office.OpenDocumentFromURL.snip

This document comes from a server (used to workflow) with special reference of an object "Workflow" for instance.

I want to open this document without lost of Java object references.

For instance : you have writer opened : you download the document and load it into writer (no new window)

Is it possible ? Do you have some Idea ?

Code:
// Load a given document
   try   {
      XComponent xComponent = xComponentLoader.loadComponentFromURL(
            createUNOFileURL(source_File),  // For createUNOFileURL see: ../Office/Office.CreateUNOCompatibleURL.snip
            "_blank",                       // New windos
            0,                              // Is ignored
            myProperties);            // Special properties
   }
   catch(Exception e) {
   }


Properties and results :
"_blank" : always creates a new frame (new instance of writer)
"_default" : special UI functionality (e.g. detecting of already loaded documents, using of empty frames of creating of new top frames as fallback) (new instance of writer)
"_self", ""(!) : means frame himself (doesn't work)
"_parent" : address direct parent of frame (new instance of writer)
"_top" : indicates top frame of current path in tree (doesn't work)
"_beamer" : means special sub frame (new instance of writer)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group