Apache OpenOffice (AOO) Bugzilla – Issue 49403
OOoBean: Office looses count of frames
Last modified: 2013-02-24 21:09:49 UTC
Running a test where the bean is repetedly added and removed to a frame, showed that the office looses track of the count of open frame. That is the small cross in the menu bar is not there. When one open a new window (menu Window->New Window) and close that window then the cross appears. try{ final OOoBean bean = new OOoBean(); java.awt.Frame frame = new java.awt.Frame("OpenOffice.org Demo"); frame.add(bean, BorderLayout.CENTER); frame.pack(); frame.setSize(600,300); frame.show(); bean.loadFromURL("private:factory/swriter", null); for (int i = 0; i < 100; i++) { frame.remove(bean); frame.add(bean, BorderLayout.CENTER); frame.validate(); } frame.addWindowListener( new WindowAdapter() { public void windowClosing( java.awt.event.WindowEvent e) { try { bean.stopOOoConnection(); } catch (Exception exc) { } ((java.awt.Window)e.getSource()).dispose(); } }); } catch(Exception e) { int a = 3; } }
Maybe this is merely a painting problem. The cross could be painted outside the top level window.
.
jl->tkr: Please take over.