[Solved] Options Dialog not showing

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
brecht.yperman
Posts: 13
Joined: Wed May 13, 2009 4:59 pm

[Solved] Options Dialog not showing

Post by brecht.yperman »

Hi,

I want to add an options dialog for my extension. I downloaded the sample from the Dev Guide and tried to change everything to my needs.

I have checked every reference five times now, but my options dialog still won't show.

I do get a node in the Options tree under 'Writer', as specified in my OptionsDialog.xcu, but the dialog doesn't show. Neither is the Options... button enabled in the Extension Manager.

How can I find out what's happening?

The references I'm now checking:
- I start from OptionsDialog.xcu.
- This refers to my OptionsPage: %origin%/../../../../../dialogs/OptionsPage.xdl
- This also refers to a schema by Id <packagename>.<schemaname> which are in /registry/schema/<package>/<schema>
- The Uno manifest.xml specifies the xcs and the xcu

Thanks,
Brecht
Last edited by brecht.yperman on Tue Jun 16, 2009 11:39 am, edited 1 time in total.
OOo 3.0.X on MS Windows Vista
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Options Dialog not showing

Post by hanya »

Hi,

I think your EventHandlerService implementation has problems. Try empty "EventHandlerService" value in the OptionsDialog.xcu file like the following.

Code: Select all

            <prop oor:name="EventHandlerService">
              <value></value>
            </prop>
After the modification, install with it and check your option page is shown correctly. If the page is shown, problems are there in your EventHandlerService implementation. If not, OptionsDialog.xcu or other specification may have problems.
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
meaulnes
Posts: 77
Joined: Thu May 07, 2009 8:38 pm

Re: Options Dialog not showing

Post by meaulnes »

Thank you Hanya,

I will try this but as I have been waiting answer for a while I passed to an other subject.
I probably will come back to this later.
OOo 3.1 on Ubuntu 9.10
brecht.yperman
Posts: 13
Joined: Wed May 13, 2009 4:59 pm

Re: Options Dialog not showing

Post by brecht.yperman »

Thanks,

Now it shows in the 'Options' dialog under writer, but the button in the extension manager is still disabled.
OOo 3.0.X on MS Windows Vista
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Options Dialog not showing

Post by hanya »

brecht.yperman wrote: Now it shows in the 'Options' dialog under writer, but the button in the extension manager is still disabled.
Does your extension have its extension identifier ?

In the case of the sample of the OptionsDialog in the DevGuide, you needs to make description.xml file to specify its identifier according to the DevGuide.
http://wiki.services.openoffice.org/wik ... dentifiers

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
	xmlns:xlink="http://www.w3.org/1999/xlink"
	xmlns:d="http://openoffice.org/extensions/description/2006">
	<identifier value="org.openoffice.demo.OptionsPageDemo" />
</description>
And you need to set the Id of the child of the Leaves node to the extension identifier.

Code: Select all

. OptionsDialog.xcu
    <node oor:name="Nodes">
      <node oor:name="Writer" oor:op="fuse">
        <node oor:name="Leaves">
        <node oor:name="org.openoffice.demo.OptionsPageDemo" oor:op="fuse">
            <prop oor:name="Id">
              <value>org.openoffice.demo.OptionsPageDemo</value>  <---
            </prop>
This is described in the DevGuide.
http://wiki.services.openoffice.org/wik ... ions_Pages
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
brecht.yperman
Posts: 13
Joined: Wed May 13, 2009 4:59 pm

Re: Options Dialog not showing

Post by brecht.yperman »

Found the problem with my EventHandlerService: it was not registered as a RegistrationClass. I had to edit the nbproject/project-uno.properties so the registration.classname property also contained my DialogEventHandler.

That's the problem with those wizards: you never really learn what's underneath...
OOo 3.0.X on MS Windows Vista
brecht.yperman
Posts: 13
Joined: Wed May 13, 2009 4:59 pm

Re: Options Dialog not showing

Post by brecht.yperman »

Great, thanks!!! I was messing up some Ids there.
OOo 3.0.X on MS Windows Vista
Post Reply