summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-11-21 22:21:40 +0100
committerMichael Stahl <mstahl@redhat.com>2012-11-22 12:10:30 +0100
commit117fdb9898dcc379b4f83437e858c57fd1d11911 (patch)
tree809d9346dd75a6317f9f726a27b06807781c86e0 /qadevOOo/tests/java/mod/_sw
parentfe3303b3dce8f4cecf15b859c465ced6ff547386 (diff)
convert users of XDocumentInfo to XDocumentProperties
Change-Id: I10f395f90d554d0ec26fe9f2654ae839e21c7ee5
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw')
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java13
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java22
2 files changed, 14 insertions, 21 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java b/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java
index dadcd90ddbd5..1de4f4baee13 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java
@@ -28,7 +28,8 @@ import util.SOfficeFactory;
import util.XMLTools;
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.document.XExporter;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.text.XTextDocument;
@@ -129,12 +130,10 @@ public class XMLMetaExporter extends TestCase {
xEx.setSourceDocument(xTextDoc);
//set some meta data
- XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface
- (XDocumentInfoSupplier.class, xTextDoc) ;
- XPropertySet docInfo = UnoRuntime.queryInterface
- (XPropertySet.class, infoSup.getDocumentInfo()) ;
- docInfo.setPropertyValue("Title", TITLE);
-
+ XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface
+ (XDocumentPropertiesSupplier.class, xTextDoc);
+ final XDocumentProperties xDocProps = xPropSup.getDocumentProperties();
+ xDocProps.setTitle(TITLE);
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log) ;
throw new StatusException("Can't create component.", e) ;
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) ;
}
}) ;