try {
PropertyValue[] aDocProperties;
XModel xDocumentModel = (XModel) UnoRuntime.queryInterface(XModel.class, _xComponent);
String sPath = xDocumentModel.getURL();
String basename = FileAccess.getBasename(sPath, "/");
XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, _xComponent);
_xComponent.dispose();
xCloseable.close(false);
if (_bcreateTemplate)
aDocProperties = new PropertyValue[5];
else
aDocProperties = new PropertyValue[4];
aDocProperties[0] = Properties.createProperty("Name", basename);