Hi Carsten,

please allow me a more detailed question.

-----%<-----
PropertyValue[] oDateiMenuSettings = (PropertyValue[])
        UnoRuntime.queryInterface(PropertyValue[].class,
        oMenuBarSettings.getByIndex(0));
-----%<-----

I have now as you adviced a PropertyValue[] oFileMenuSettings.

>> Can you tell me how to rename a single item of the file menu?
> 
> No, problem. You have to search for the properties "Label" and
> "CommandURL". You have to change both to your needs, call
> replaceByIndex() and provide your changed sequence< PropertyValue >.
> 
> PropertyValue [] aPropValue = (PropertyValue [])
> oMenuBarSettings.getByIndex(0);
> String aLabel( "Label" );
> String aCommandURL( "CommandURL" );
> for (int i = 0; i < aPropValue.length; i++) {
>   if (aLabel.equals(aPropValue[i].Name)){
>     ..
>   }
>   else if ( aCommandURL.equals(aPropValue[i].Name)) {
>     ..
>   }
> }
> 
> Important: If you want to access a sub menu, you have to look for the
> property called "ItemDescriptorContainer".

If I understand correctly my PropertyValue[] oDateiMenuSettings contains
now the whole menu "Datei" (in English "File").

Here it contains five values: CommandURL, HelpURL,
ItemDescriptorContainer, Label, Type. (Question: why is there no value
for Label? In my own menu the value is set to "JUDAS", but in all the
menus that already exist, the Label value is ""...)

Is it true that the ItemDescriptorContainer contains all the Items and
Submenus. My Debugger says the ItemDescriptorContainer is the type
XIndexAccess. But I think I need a XIndexContainer or again a
PropertyValue[]. How can I get it?

Greetings, Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to