(XLayerManager)UnoRuntime.queryInterface(
XLayerManager.class, xNameAccess );
// create a layer and set its properties
XPropertySet xLayerPropSet;
XLayer xNotVisibleAndEditable = xLayerManager.insertNewByIndex(
xLayerManager.getCount() );
xLayerPropSet = (XPropertySet)
(XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, xNotVisibleAndEditable );
xLayerPropSet.setPropertyValue( "Name", "NotVisibleAndEditable" );
xLayerPropSet.setPropertyValue( "IsVisible", new Boolean( false ) );
xLayerPropSet.setPropertyValue( "IsLocked", new Boolean( true ) );
// create a second layer
XLayer xNotEditable = xLayerManager.insertNewByIndex(
xLayerManager.getCount() );
xLayerPropSet = (XPropertySet)
(XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, xNotEditable );