System.out.println("The property 'KeepDocument' is set and so the document won't be disposed");
return;
}
XModifiable modified = (XModifiable) UnoRuntime.queryInterface(
XModifiable.class, DocumentToClose);
XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
XCloseable.class, DocumentToClose);
try {
modified.setModified(false);
closer.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
System.out.println("Couldn't close document");
} catch (com.sun.star.lang.DisposedException e) {
System.out.println("Couldn't close document");
} catch (java.lang.NullPointerException e) {