prop[2].Name = "Type";
prop[2].Value = new Short((short)0);
prop[3] = new PropertyValue();
prop[3].Name = "ItemDescriptorContainer";
XSingleComponentFactory xFactory = (XSingleComponentFactory)UnoRuntime.queryInterface(
XSingleComponentFactory.class, xMenuBarSettings);
try {
XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xMSF);
XComponentContext xContext = (XComponentContext)UnoRuntime.queryInterface(
XComponentContext.class, xProp.getPropertyValue("DefaultContext"));
prop[3].Value = xFactory.createInstanceWithContext(xContext);
}
catch(com.sun.star.uno.Exception e) {
log.println("Could not create an instance for ItemDescriptorContainer property.");
e.printStackTrace(log);
return null;