Object oDP =
// xMSF.createInstanceWithContext(
// "com.sun.star.document.DocumentProperties", xContext);
xMSF.createInstance("com.sun.star.document.DocumentProperties");
XDocumentProperties xDP = UnoRuntime.queryInterface(XDocumentProperties.class, oDP);
System.out.println("...done");
System.out.println("Checking initialize ...");
XDocumentProperties xDP2 = UnoRuntime.queryInterface(XDocumentProperties.class, xMSF.createInstance("com.sun.star.document.DocumentProperties"));
XInitialization xInit = UnoRuntime.queryInterface(XInitialization.class, xDP2);
xInit.initialize(new Object[] { });
System.out.println("...done");
System.out.println("Checking storing default-initialized meta data ...");
// xDP2.storeToMedium(temp + "EMPTY.odt", mimeArgs);
xDP2.storeToMedium("", mimeEmptyArgs);
System.out.println("...done");
System.out.println("Checking loading default-initialized meta data ...");
// xDP2.loadFromMedium(temp + "EMPTY.odt", noArgs);
xDP2.loadFromMedium("", mimeEmptyArgs);
assertTrue ("Author", "".equals(xDP2.getAuthor()));
System.out.println("...done");
System.out.println("(Not) Checking preservation of custom meta data ...");
xDP2.loadFromMedium(TestDocument.getUrl("CUSTOM.odt"),
noArgs);
assertTrue ("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...