Object oDP =
// xMSF.createInstanceWithContext(
// "com.sun.star.document.DocumentProperties", xContext);
xMSF.createInstance("com.sun.star.document.DocumentProperties");
XDocumentProperties xDP = (XDocumentProperties)
UnoRuntime.queryInterface(XDocumentProperties.class, oDP);
log.println("...done");
log.println("Checking initialize ...");
XDocumentProperties xDP2 = (XDocumentProperties)
UnoRuntime.queryInterface(XDocumentProperties.class,
xMSF.createInstance(
"com.sun.star.document.DocumentProperties"));
XInitialization xInit = (XInitialization)
UnoRuntime.queryInterface(XInitialization.class, xDP2);
xInit.initialize(new Object[] { });
log.println("...done");
log.println("Checking storing default-initialized meta data ...");
// xDP2.storeToMedium(temp + "EMPTY.odt", mimeArgs);
xDP2.storeToMedium("", mimeEmptyArgs);
log.println("...done");
log.println("Checking loading default-initialized meta data ...");
// xDP2.loadFromMedium(temp + "EMPTY.odt", noArgs);
xDP2.loadFromMedium("", mimeEmptyArgs);
assure ("Author", "".equals(xDP2.getAuthor()));
log.println("...done");
log.println("(Not) Checking preservation of custom meta data ...");
xDP2.loadFromMedium(util.utils.getFullTestURL("CUSTOM.odt"),
noArgs);
assure ("Author", "".equals(xDP2.getAuthor()));
xDP2.storeToMedium(temp + "CUSTOM.odt", mimeArgs);
//FIXME: now what? comparing for binary equality seems useless
// we could unzip the written file and grep for the custom stuff
// but would that work on windows...