Apache OpenOffice (AOO) Bugzilla – Issue 97007
LocalOfficeWindow can't gain focus or any keyboard input if running them in JDK6.0
Last modified: 2013-02-24 21:08:58 UTC
Run the test case in OOBeanTest with JDK5.0, the local office window can gain the focus and input words. However, the integrated window can't gain the focus and no response for any keyboard event if running it with JDK6.
jsc -> tkr: bean issue
accepted
.
Is there somthin going on with this bug. Our great app NOA4e (http://ubion.ion.ag/loesungen/003officeintegrationeditor) to integrate OpenOffice.org into eclipse does not work anymore on Linux. First, the issue was just when using gnome. But with latest kubuntu 10.04 the issue also occurs in KDE. Our app uses the SWT_AWT bridge from SWT to integrate OOO. This way it doesn't even work in JDK 5.0, just stopped working (maybe because of some changes in Linux). I also read the following article http://wiki.services.openoffice.org/wiki/OOoBean I also tried setting "sun.awt.xembedserver" to "true". This makes keyboard interactions possible with AWT As I thought the problem is SWT I started testing around with with a simple AWT app and even with the OOOBeanViewer applet. I figured out the following: Using JDK 5.0 and "sun.awt.xembedserver" is not set: AWT applications and the OOOBeanViewer work and show the office window in correct size Using JDK 5.0 and "sun.awt.xembedserver" is set to "true": AWT applications and the OOOBeanViewer do not work as it does not show the office window. Using JDK 6.0 and "sun.awt.xembedserver" is not set: AWT applications and the OOOBeanViewer do not work. There is no keyboard interaction possible, not even navigating in the menu, but shows office window in correct size. Using JDK 6.0 and "sun.awt.xembedserver" is set to "true": AWT applications and the OOOBeanViewer do not work. Keybord interaction is possible, but the office window get always resized to a 200px by 200px window, even trying to re-layout and setting size manually on every component I could find. For a simple SWT viewer found here http://www.eclipsezone.com/eclipse/forums/t48966.html I figured out the following: Using JDK 5.0 and "sun.awt.xembedserver" is not set: SWT application does not work. There is no keyboard interaction possible, not even navigating in the menu, but shows office window in correct size. Using JDK 5.0 and "sun.awt.xembedserver" is set to "true": SWT application do not work as it does not show the office window, just a gray area. Using JDK 6.0 and "sun.awt.xembedserver" is not set: SWT application o not work. There is no keyboard interaction possible, not even navigating in the menu, but shows office window in correct size. Using JDK 6.0 and "sun.awt.xembedserver" is set to "true": SWT application do not work. Keybord interaction is possible, but the office window get always resized to a 200px by 200px window, even trying to re-layout and setting size manually on every component I could find. I even tried with the environment variables SAL_USE_VCLPLUGIN and USE_VCLPLUGIN with all possible values ("gtk","kde","gen") for all above cases. This does not seem to change anything. This means, that a lot of integrations do not work with linux anymore, which means that this is a very very high important bug (at least for us and our community and customers). Could someone please comment on what is the current state of the bug and when this gets fixed, if ever, please? Regards, Markus Krüger
A workaround for AWT and SWT would help, too, for now...
There is another way to embed OOo into swt widget. SWT is a wrapper of gtk, so you can create a swt composite as gtk socket, and create OOo window as gtk client. see XEmbed protocol for more detail
My understanding was, that the SWT_AWT bridge use XEmbed. Also, I could not find an example on how to do it "manually" with the XEmbed protocol. What about the issue with AWT/OOOBeanViewer and JDK 1.6? I need both, SWT and AWT, to be running under linux to satisfy our community and customers.
And we need to support java 1.5 and 1.6 :-(
Due lack of time I'm currently not able to fix this issue. But you can take a look on your own (OOO Repos. Module bean). I would appreciate any patch to fix this issue.
What classes are responsible for displaying the window? I looked into LocalOfficeWindow but could not find anything that might be responsible for displaying the window 200px by 200px when using "sun.awt.xembedserver" is set to "true" and jdk1.6.
hi tkr, I know I can not make it faste to fix this, but is this actually in progress? The status states "STARTED", but I don't see anything happen. I don't want to bother you, but this is a bug which make our app only work with windows, for know. Regards, Markus
I'm using benzmans library (Nice Office Access) for my application and I have the same issue...
if anybody accidentally fixes this in the next weeks please claim bounty #2 (http://www.usegroup.de/?p=bounty-2-en), it may be related and it will not be granted if it is not claimed.
I just tested again with a fresh installed kubuntu. It works with 1.5 and 1.6. So the issue seems only to be related to gnome.
Can anyone else confirm that it works on kde again?
I never experienced any issues in KDE, for me this always seemed to be a bug in combination with gnome(2, never tested with 3, I think it worked in 1)
Same problem here trying to embed openoffice in SWT on Linux. How can we get some more focus on this bug? tkr - can you suggest any steps that can help to debug this?
I had also tried SAL_USE_VCLPLUGIN and USE_VCLPLUGIN some months ago but the link http://wiki.services.openoffice.org/wiki/OOoBean#nofocus provided some more insight, if not a workaround. (Benzman: I actually got it from the NOA forum, more precisely from the libreoffice mailing list posts that NOA forum user bt10000 mentioned on http://ubion.ion.ag/mainForumFolder/noa_forum/0247/) I started my software with -Dsun.awt.xembedserver=true and, although the caret still seemed to be absent, text input worked in Ubuntu 10.10.
(In reply to comment #18) > I started my software with -Dsun.awt.xembedserver=true and, although the caret > still seemed to be absent, text > input worked in Ubuntu 10.10. Which version of java were you using?
Hi > > > I started my software with -Dsun.awt.xembedserver=true and, although the caret > > still seemed to be absent, text > > input worked in Ubuntu 10.10. > > Which version of java were you using? Sun Java, must have been 1.6.
> > I started my software with -Dsun.awt.xembedserver=true and, although the caret > still seemed to be absent, text > input worked in Ubuntu 10.10. I did try this and confirmed it did not work. I suspect it works on Ubuntu 10.10 because this issue seems limited to Linux with Gome 2.x. I have tested this issue with Windows and Linux + KDE and it does not occur on either of those platforms.
Hi > I did try this and confirmed it did not work. I suspect it works on Ubuntu > 10.10 because this issue seems limited to Linux with Gome 2.x. I thought 10.10 was Gnome 2.32? > I have tested this issue with Windows and Linux + KDE and it does not occur on > either of those platforms. It works on Windows but did you try the Fedora 14 KDE spin? It really astonished me, it was the only KDE based distro which did not seem to work. kind regards Jochen
(In reply to comment #22) > I thought 10.10 was Gnome 2.32? My mistake! I was thinking of 11.04. That's very interesting though - will download a copy and test it too. > > It works on Windows but did you try the Fedora 14 KDE spin? It really > astonished me, it was the only KDE based distro which did not seem to work. No - I didn't try the Fedora spin. I got some pointers on the Libre Office mailing list about how to debug the underlying issue - so am planning to do that when I get some time.
Please note that it now works on Fedora 17 and on Ubuntu (both unity and gnome2). The caret is still missing but the text input is passed to the officebean, at least with LibreOffice 3.6.1.