[dev] OO 2.0 behaves different than OO 1.5

2006-02-22 Thread Bernhard Donaubauer
Hello!

I use the UNO API via Java and have a problem with OO2.0.  I first send this 
post to the API and Macro forum but Andrew Pitonyak told me this is a 
better place to discuss my problem.

Here is my original post:

Hello! 
 
 I have a small Java application that uses OO (started with parameter 
-invisible) to open or print OO - Files without user interaction. The user 
normally edits the opened document and closes it after he/she finished 
his/her work. Here is my problem! In OO1 the application disappeared after 
the user closed (menu file/close) the last document. In OO2 the application 
stays visible. 
 
 Can I make OO2 to behave like OO1? Can I make OO invisible by API calls? 
 I tried to cast my desktop object to XFrame and called 
 
 ooDesktop.getXFrame().getComponentWindow().setVisible(false); 
 
 but this ended OO instead of making it invisible and my next API call gets 
this exception: 
 
 Exception in thread AWT-EventQueue-0 com.sun.star.lang.DisposedException: 
java_remote_bridge 
[EMAIL PROTECTED] is 
disposed 
 
 What can I do? 
 
 Regards, 
 Bernhard Donaubauer

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



Re: [dev] OO 2.0 behaves different than OO 1.5

2006-02-22 Thread Stephan Wunderlich

Hi Bernhard,

 I have a small Java application that uses OO (started with parameter 
-invisible) to open or print OO - Files without user interaction. The user 
normally edits the opened document and closes it after he/she finished 
his/her work. Here is my problem! In OO1 the application disappeared after 
the user closed (menu file/close) the last document. In OO2 the application 
stays visible. 
 
 Can I make OO2 to behave like OO1? Can I make OO invisible by API calls? 
 I tried to cast my desktop object to XFrame and called 
 
 ooDesktop.getXFrame().getComponentWindow().setVisible(false); 
 
 but this ended OO instead of making it invisible and my next API call gets 
this exception: 
 
 Exception in thread AWT-EventQueue-0 com.sun.star.lang.DisposedException: 
java_remote_bridge 
[EMAIL PROTECTED] is 
disposed 
 
 What can I do? 


you could start the office with the parameter -headless instead of 
-invisible ... this should also work with OOo1.x


Hope that helps

Regards

Stephan

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



Re: [dev] OO 2.0 behaves different than OO 1.5

2006-02-22 Thread Bernhard Donaubauer
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]



Re: [dev] OO 2.0 behaves different than OO 1.5

2006-02-22 Thread Stephan Wunderlich

Hi Bernhard

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. 


when you open OOo with

./soffice -headless

it will be invisible.

When you afterwards connect to this office via java and open a document, 
this document will be visible unless you open it hidden ;-)


I thought that is what you wanted.

Regards

Stephan

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



Re: [dev] OO 2.0 behaves different than OO 1.5

2006-02-22 Thread Mathias Bauer
Mathias Bauer wrote:

 OOo1.0(!).x indeed had a different behavior concering File-Close, in
 this case the last window stayed open (this was a user request), 

Sorry, I wanted to say: in this case (OOo1.0) the last window was closed
while in OOo2 it stays open (this was a user request).

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [dev] OO 2.0 behaves different than OO 1.5

2006-02-22 Thread Mathias Bauer
Bernhard Donaubauer wrote:

  I have a small Java application that uses OO (started with parameter 
 -invisible) to open or print OO - Files without user interaction. The user 
 normally edits the opened document and closes it after he/she finished 
 his/her work. Here is my problem! In OO1 the application disappeared after 
 the user closed (menu file/close) the last document. In OO2 the application 
 stays visible. 

OOo1.0(!).x indeed had a different behavior concering File-Close, in
this case the last window stayed open (this was a user request), but
OOo1.1.x behaves exactly like OOo2.0 in this regard. As you are talking
about OOo1.5 (whatever this is, I guess it's 1.1.5) your problem must be
something else.

So please describe exactly(!) *how* the document is closed and what
exactly you mean with visible and of course the exact version number
of the old OOo version you are talking about.

  Can I make OO2 to behave like OO1? Can I make OO invisible by API calls? 
  I tried to cast my desktop object to XFrame and called 
  
  ooDesktop.getXFrame().getComponentWindow().setVisible(false); 

Really bad idea. You should desribe your goals in understandable terms
and I'm sure we will find a solution.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.



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



Re: [dev] OO 2.0 behaves different than OO 1.5

2006-02-22 Thread Christian Junker
I find it very strange that the setVisible method made OOo terminate.
The exception afterwards is nothing special, it's just the logical
consequence (if there is no OOo process anymore the initiated UNO
Runime environment extinguishes as well of course, thus the
DisposedException).

So it seems to me, in the case you can reproduce this behavior, that
this is a bug.

2006/2/22, Bernhard Donaubauer [EMAIL PROTECTED]:
  Can I make OO2 to behave like OO1? Can I make OO invisible by API calls?
  I tried to cast my desktop object to XFrame and called

  ooDesktop.getXFrame().getComponentWindow().setVisible(false);

  but this ended OO instead of making it invisible and my next API call gets
 this exception:

  Exception in thread AWT-EventQueue-0 com.sun.star.lang.DisposedException:
 java_remote_bridge
 [EMAIL PROTECTED] is
 disposed


--
Best Regards
Christian Junker

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