Alexius General User

Joined: 30 Apr 2009 Posts: 13 Location: France
|
Posted: Wed Jul 08, 2009 11:13 pm Post subject: Java : load a document and OpenOffice extension |
|
|
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) |
|