1. What files are needed -- an xml that describes the specifications of the dialog box?? So I need any other file??
2. Do I need to make changes to the manifest.xml file??
If you pack dialogs into your package as part of basic library or as dialog only library, add entry to manifest file for it according to :
http://wiki.services.openoffice.org/wik ... ile_Format
If you need to use your dialog only through your Python macro or component, you can put them into your package as normal file without their entries in manifest. Simply put xdl files into your package.
3. Finally how do I pop it in python --
Use css.awt.DialogProvider service to instantiate dialog, see:
http://www.openoffice.org/api/docs/comm ... ider2.html
The methods of the interface supported by the service take URL to a dialog to instantiate.
You can get your package location as URL by css.deployment.PackageInformationProvider singleton , see:
http://www.openoffice.org/api/docs/comm ... vider.html
If you do not have extension identifier for your extension, you have to add it, see:
http://wiki.services.openoffice.org/wik ... dentifiers
After version 3.3, once extension identifier is given to your extension package, you do not need to use PackageInformationProvider to get your package location. You can use "vnd.sun.star.extension:" protocol to specify it, see:
http://wiki.services.openoffice.org/wik ... _Providers
Assuming extension identifier of a package is "org.foo.bar.Hoge", a dialog can be instantiated from its package with the protocol mentioned above as follows:
Code: Select all
def create_dialog(ctx, url):
return ctx.getServiceManager().createInstanceWithContext("com.sun.star.awt.DialogProvider", ctx).createDialog(url)
# dialog placed in dialogs/ directory in the package
dialog = create_dialog(ctx, "vnd.sun.star.extension://org.foo.bar.Hoge/dialogs/dialog.xdl")
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04