summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_xmloff/Impress
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/_xmloff/Impress
parentfe3303b3dce8f4cecf15b859c465ced6ff547386 (diff)
convert users of XDocumentInfo to XDocumentProperties
Change-Id: I10f395f90d554d0ec26fe9f2654ae839e21c7ee5
Diffstat (limited to 'qadevOOo/tests/java/mod/_xmloff/Impress')
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java14
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java23
2 files changed, 15 insertions, 22 deletions
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java
index 1ab04a13492c..5a21079cd266 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/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.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
@@ -128,12 +129,11 @@ public class XMLMetaExporter extends TestCase {
XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
xEx.setSourceDocument(xImpressDoc);
- //change title name
- XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface
- (XDocumentInfoSupplier.class, xImpressDoc) ;
- XPropertySet docInfo = UnoRuntime.queryInterface
- (XPropertySet.class, infoSup.getDocumentInfo()) ;
- docInfo.setPropertyValue("Title", NAME);
+ // change title name
+ XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface
+ (XDocumentPropertiesSupplier.class, xImpressDoc);
+ final XDocumentProperties xDocProps = xPropSup.getDocumentProperties();
+ xDocProps.setTitle(NAME);
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log) ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java
index b504d262572a..6dbd37f6c12d 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/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.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
@@ -151,25 +152,17 @@ public class XMLMetaImporter extends TestCase {
tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ;
- XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface
- (XDocumentInfoSupplier.class, xImpressDoc) ;
- final XPropertySet docInfo = UnoRuntime.queryInterface
- (XPropertySet.class, infoSup.getDocumentInfo()) ;
+ XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface
+ (XDocumentPropertiesSupplier.class, xImpressDoc);
+ 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) ;
}
} );