Issue 120282 - OOoBean don´t open dialogs
Summary: OOoBean don´t open dialogs
Status: UNCONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: sdk (show other issues)
Version: 3.4.0
Hardware: PC Windows 7
: P3 Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact: Peggy Fobbe
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-15 13:44 UTC by schorschlan
Modified: 2017-05-20 11:55 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 schorschlan 2012-07-15 13:44:11 UTC
I have insert the open office 3.4 in a java application. I use the OOoBean. Open office writer will display with menu and all toolbars.

oBean = new OOoBean();
add(oBean, BorderLayout.CENTER);
oBean.loadFromURL("private:factory/swriter", null);
oBean.aquireSystemWindow();

The problem is:

I click on open button in toolbar or the menu item and it will not opened the filechooser dialog. The same applies to save as button.

I have insert a table in the writer document. Right mouse button on table cell open the popup menu. But if i click on menu item "number format" than it will not opened the dialog.
Comment 1 Ariel Constenla-Haile 2012-07-15 14:46:47 UTC
(In reply to comment #0)
> The problem is:
> 
> I click on open button in toolbar or the menu item and it will not opened
> the filechooser dialog. The same applies to save as button.
> 
> I have insert a table in the writer document. Right mouse button on table
> cell open the popup menu. But if i click on menu item "number format" than
> it will not opened the dialog.

I cannot reproduce it. Did you try the SDK example?
sdk/examples/DevelopersGuide/OfficeBean
Does this example work in your environment?
Can you attach your code?
Comment 2 schorschlan 2012-07-15 18:07:47 UTC
Yes, this example work. I have found the reason. In the maintance application class was created an OOoBean und connected with office.

private static String interProcCommunicationString = "pipe,name=DocumentManager";
Thread t1 = new Thread()
{
 @Override
 public void run()
 {
   try
   {
     oBean = new OOoBean();
     String path = System.getenv("UNO_PATH");
     path = path.replace('\\', '/');
     String commandLine = "\"" + path + "/soffice\" -headless -nologo    -accept=" + interProcCommunicationString + ";urp;StarOffice.ServiceManager";
     Runtime.getRuntime().exec(commandLine);
     // suspend the current thread to let OO server start
     Thread.sleep(500);
    oBean.startOOoConnection("uno:" + interProcCommunicationString + ";urp;StarOffice.ServiceManager");
   }
 catch (Exception e)
 {
  logger.error(e);
 }
}
};
t1.start();

In the other class i have create a new OOoBean object.

oBean = new OOoBean();
add(oBean, BorderLayout.CENTER);
oBean.loadFromURL("private:factory/swriter", null);
oBean.aquireSystemWindow()

And than it will not opened the dialogs. If i don´t start the Thread than it will opened the dialogs.
It that problem the parameter -headless?
Comment 3 Ariel Constenla-Haile 2012-07-15 21:12:27 UTC
(In reply to comment #2)
> It that problem the parameter -headless?

From ./soffice -help

-headless     like invisible but no userinteraction at all.

I guess you don't want that.
This does not seem to be a bug. Please send further questions to the development mailing list. Tag your message with [API].