diff options
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java b/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java index c234003caf8c..7e071d8e504d 100644 --- a/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java +++ b/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java @@ -27,7 +27,8 @@ import lib.TestParameters; import util.SOfficeFactory; import com.sun.star.beans.XPropertySet; -import com.sun.star.document.XDocumentInfoSupplier; +import com.sun.star.document.XDocumentPropertiesSupplier; +import com.sun.star.document.XDocumentProperties; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.text.XTextDocument; import com.sun.star.uno.UnoRuntime; @@ -153,24 +154,17 @@ public class XMLMetaImporter extends TestCase { tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ; - XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface - (XDocumentInfoSupplier.class, xTextDoc) ; - final XPropertySet docInfo = UnoRuntime.queryInterface - (XPropertySet.class, infoSup.getDocumentInfo()) ; + XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface + (XDocumentPropertiesSupplier.class, xTextDoc); + final XDocumentProperties xDocProps = xPropSup.getDocumentProperties(); final PrintWriter logF = log ; tEnv.addObjRelation("XDocumentHandler.ImportChecker", new ifc.xml.sax._XDocumentHandler.ImportChecker() { public boolean checkImport() { - try { - String title = (String) docInfo.getPropertyValue("Title") ; - logF.println("Title returned = '" + title + "'") ; - return impTitle.equals(title) ; - } catch (com.sun.star.uno.Exception e) { - logF.println("Exception occurred while checking filter :") ; - e.printStackTrace(logF) ; - return false ; - } + String title = xDocProps.getTitle(); + logF.println("Title returned = '" + title + "'") ; + return impTitle.equals(title) ; } }) ; |