Apache OpenOffice (AOO) Bugzilla – Issue 120282
OOoBean don´t open dialogs
Last modified: 2017-05-20 11:55:38 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.
(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?
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?
(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].