Thanks again. I guess I have to thank you many times in near future. ;)
But, new questions rises all the time:
Tobias Krais wrote:
If you want to remove a whole menu, use this:
-----%<-----
/**
* This method removes the first menu from OpenOffice menubar.
* Changes are transient.
*
* @param xLayoutManager
* @param CommandURL
* @param action
* @throws Exception
*/
public void changeMenus(String CommandURL, String action)
{
// Init menu elements
// 1. Getting the menubar
com.sun.star.ui.XUIElement myMenubar
= xLayoutManager.getElement(
"private:resource/menubar/menubar");
// 2. Getting the menubar settings
XUIElementSettings myMenuBarSettings = (XUIElementSettings)
UnoRuntime.queryInterface(XUIElementSettings.class,
myMenubar);
// 3. Casting the settings into a container to be able to get
// the properties
XIndexContainer myMenuBarSettingsContainer = (XIndexContainer)
UnoRuntime.queryInterface(
XIndexContainer.class,
myMenuBarSettings.getSettings(true));
try
{
// Make changes only transient (temporary).
com.sun.star.beans.XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, myMenubar);
xPropSet.setPropertyValue("Persistent", new Boolean(false));
1. Where did you find that "Persistent" property? I didn't find any
suitable XUIElement's properties from IDL Ref.
Where should I look for properties of interfaces in general? It seems
like IDL Reference hasn't got answers for every questions. Or I just
don't know how to look for.
2. Can I somehow acces Styles and Fromatting - dialogs properties and
remove/disable/rename stylecategories?
I'm glad that there is persons like you Tobias, always willing to help
persons like me, newbies. Let just couple of weeks pass and I shall help
others like you do now. I hope.
Tuomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]