OOoBean in 2 Java windows, one disappears

Java, C++, C#, Delphi, ??? - Using the UNO bridges

OOoBean in 2 Java windows, one disappears

Postby oliviergeorg » Thu Apr 08, 2021 12:31 pm

Hi everyone,

I am working on a Java legacy code to show o edit some odt documents in a web application. I have to solve a problem that I do not know how to tackle!

The documents used to be displayed using an applet, and the OOoBean within the applet. But due to security problems, that was replaces a custom browser uri scheme, ooviewer:..., that launches a java desktop application with the ooobean inside.

Now the problem I have been told to solve is that when 2 windows are opened, the first ooobean disappears when the second window is opened. Exactly when the method setVisible is called on the JFrame object.

I suppose it could be some kind of swing or awt hierarchy that cannot be displayed twice, i.e. in both windows, a problem I had had in a former project.

I could show you some code, but I do not know what could be important/interesting

(Note that I did not write the original applet code, nor the transformation to desktop application. Also the version of openoffice is 3.1)

Thanks in advance

Olivier Georg
Legacy OpenOffice 3.1 on Windows
oliviergeorg
 
Posts: 2
Joined: Thu Apr 08, 2021 11:48 am

Re: OOoBean in 2 Java windows, one disappears

Postby RoryOF » Thu Apr 08, 2021 1:10 pm

I can't answer your specific problem, but I offer a small piece of information that might be relevant.

MS Office supports MDI (Multiple Document Interface), which I understand allows multiple windows from the one running instance of MS Office's code. Because of its cross-platform capability, OpenOffice only supports SDI (Single Document Interface), as MDI libraries of identical behaviour are not (certainly were not - situation may have changed?) available for all platforms, so if one wishes multiple windows of documents in OpenOffice one has to use multiple running instances of the code.

The above information is a memory of perhaps 10/12 years ago, and the availability of such libraries may have changed, but they are not currently employed in OpenOffice (I don't know about LibreOffice). You may be running into some instance of this SDI restriction.
Apache OpenOffice 4.1.10 on Xubuntu 20.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 32534
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: OOoBean in 2 Java windows, one disappears

Postby oliviergeorg » Thu Apr 08, 2021 1:57 pm

Thanks Rory for your quick answer,

So you mean I would need several underlying instances of soffice.exe running in the background or several jvm? I do not think i need several soffice.exe, since using applets (2 web pages each with its applet and ooobean) it runs just fine
Legacy OpenOffice 3.1 on Windows
oliviergeorg
 
Posts: 2
Joined: Thu Apr 08, 2021 11:48 am


Return to External Programs

Who is online

Users browsing this forum: No registered users and 3 guests