Assigning Nodes to Modules
In the previous paragraphs we have explained what has to be done so that a node appears in the options dialog of an application no matter what the application is. Now we will explain how one can pick out the application where the node should appear.
Having a look at the schema of the OtionsDialog.xcs one notices that there is another set, named Modules, to which we can add entries which then determine where the nodes are displayed. If one does not care for a particular application then one should use the AllModules property of the Node, so that they are always displayed.
<node oor:name="Modules">
<node oor:name="com.sun.star.text.TextDocument" oor:op="fuse">
<node oor:name="Nodes">
<node oor:name="org.openoffice.framework.desktop.test.deployment.options.nodes4.node 1"
oor:op="fuse">
</node>
<node oor:name="org.openoffice.framework.desktop.test.deployment.options.nodes4.node 2"
oor:op="fuse">
</node>
</node>
</node>
<node oor:name="com.sun.star.sheet.SpreadsheetDocument" oor:op="fuse">
<node oor:name="Nodes">
<node oor:name="org.openoffice.framework.desktop.test.deployment.options.nodes4.node 1"
oor:op="fuse">
</node>
</node>
</node>
</node>
<node oor:name="Nodes">
<node oor:name="org.openoffice.framework.desktop.test.deployment.options.nodes4.node 1"
oor:op="fuse">
<!-- leaving out some properties for the sake of brevity -->
</node>
<node oor:name="org.openoffice.framework.desktop.test.deployment.options.nodes4.node 2"
oor:op="fuse">
<!-- leaving out some properties for the sake of brevity -->
</node>
</node></nowiki>
The example shows the definition of two Node|s. Both are displayed in the options dialog of the Writer but only “node 1” is displayed in the options dialog of Calc. This demonstrates also that a node can be assigned to various Modules.
The names of the application contexts defined by OpenOffice.org can be found here: Framework/Article/Options_Dialog_Configuration
Content on this page is licensed under the Public Documentation License (PDL). |