Am Mittwoch, 22. Februar 2006 12:40 schrieb Stephan Wunderlich:
> you could start the office with the parameter -headless instead of
> -invisible ... this should also work with OOo1.x
>
> Hope that helps

No! I just want OO invisible if no documents are open. OO1.0 got visible at 
the time I opened a document via Java/UNO and got invisible at the time the 
user closed the document. With OO2.0 OpenOffice stays visible with no 
document open. It gets even worse when my progam opens another document. This 
document is displayed in a new frame next to the old one. As a workaround I 
tried to set OO invisible in my Java application in the 
queryTermination() - Method when the user tries to exit OO (in fact the user 
can't exit OO; when my application exits it closes OO).

public void queryTermination(EventObject a) throws TerminationVetoException {
    //BD close all documents I have opened
    ooDesktop.closeDocuments();
    //BD make OO invisible
    //BD getXFrame() casts the desktop object to an XFrame object 
    //BD and returns it
    ooDesktop.getXFrame().getComponentWindow().setVisible(false); 
    //BD prevent OO from beeing closed
    throw new TerminationVetoException();
}

But it seems it closes the application instead of making it unvisible.

Still need help!

Regards,
Bernhard Donaubauer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to