Issue 49403 - OOoBean: Office looses count of frames
Summary: OOoBean: Office looses count of frames
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-17 17:04 UTC by joachim.lingner
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description joachim.lingner 2005-05-17 17:04:41 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;
       }       
   }
Comment 1 joachim.lingner 2005-05-18 13:01:21 UTC
Maybe this is merely a painting problem. The cross could be painted outside the
top level window.
Comment 2 joachim.lingner 2006-05-19 08:30:37 UTC
.
Comment 3 joachim.lingner 2008-05-08 13:14:02 UTC
jl->tkr: Please take over.
Comment 4 tkr 2009-06-19 13:50:18 UTC
.