diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-03-13 12:48:07 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-03-14 10:17:43 +0100 |
commit | ed85a358d4aed976ec19578fbfbe00d31c6430fe (patch) | |
tree | 068edb91f6599b32caf68d7e34199ac413f78c97 /sfx2 | |
parent | e9a3be4d95834b056557cd166bdb1ce3cd857cfb (diff) |
tdf#123293 Add test
Test for commit 0a5ca5768f56db481dd3b947b3dddaab7ed96450
Change-Id: I53b72c385d9ef4d51cefa687f07a75c9520d3e71
Reviewed-on: https://gerrit.libreoffice.org/69165
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit e9ce7acaf5cc87a4fb40f12ea0aac8cb9df3562f)
Reviewed-on: https://gerrit.libreoffice.org/69182
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/qa/complex/sfx2/DocumentMetadataAccess.java | 15 | ||||
-rw-r--r-- | sfx2/qa/complex/sfx2/tools/TestDocument.java | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java index 9a0e7b8170a7..5697bba07e20 100644 --- a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java +++ b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java @@ -615,6 +615,21 @@ public class DocumentMetadataAccess } } + @Test + public void checkTdf123293() throws Exception + { + XComponent xComp = null; + try { + xComp = util.DesktopTools.loadDocUsingStream(xMSF, TestDocument.getPath("TESTRDFA.odt")); + + // Metadata was discarded when loading from stream, make sure it's there now + XRepositorySupplier xRepoSupplier = UnoRuntime.queryInterface(XRepositorySupplier.class, xComp); + assertNotNull("No metadata loaded", xRepoSupplier); + } finally { + close(xComp); + } + } + private void storeRDFa(XComponent xComp, String file) throws com.sun.star.io.IOException { System.out.println("Storing test document..."); diff --git a/sfx2/qa/complex/sfx2/tools/TestDocument.java b/sfx2/qa/complex/sfx2/tools/TestDocument.java index d10a4b0cb5d6..462c97fb99b7 100644 --- a/sfx2/qa/complex/sfx2/tools/TestDocument.java +++ b/sfx2/qa/complex/sfx2/tools/TestDocument.java @@ -26,6 +26,9 @@ public final class TestDocument { public static String getUrl(String name) { return OfficeFileUrl.getAbsolute(new File(Argument.get("tdoc"), name)); } + public static String getPath(String name) { + return new File(Argument.get("tdoc"), name).toString(); + } private TestDocument() {} } |