incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1381972 - in /incubator/ooo/trunk/test/testuno/source: org/openoffice/test/uno/ testcase/uno/db/ testcase/uno/pvt/ testcase/uno/sd/ testcase/uno/sd/chart/ testcase/uno/sd/shape/ testcase/uno/sw/bookmark/ testcase/uno/sw/crossreference/ tes...
Date Fri, 07 Sep 2012 10:12:48 GMT
Author: liuzhe
Date: Fri Sep  7 10:12:47 2012
New Revision: 1381972

URL: http://svn.apache.org/viewvc?rev=1381972&view=rev
Log:
Fix compiliance error again old uno jars

Modified:
    incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/db/DBAccess.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/pvt/Conversion.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomAnimation.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomShow.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphStyle.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphTextProperty.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/SlideShow.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/chart/ChartTypes.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeProperties.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeTypes.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/bookmark/CheckBookmarks.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/crossreference/CheckCrossReferences.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/CheckDateTimeField.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageCountField.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageNumberField.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/SubjectField.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/frame/CheckFrames.java
    incubator/ooo/trunk/test/testuno/source/testlib/uno/DBUtil.java
    incubator/ooo/trunk/test/testuno/source/testlib/uno/SCUtil.java
    incubator/ooo/trunk/test/testuno/source/testlib/uno/SWUtil.java

Modified: incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java (original)
+++ incubator/ooo/trunk/test/testuno/source/org/openoffice/test/uno/UnoApp.java Fri Sep  7
10:12:47 2012
@@ -95,10 +95,10 @@ public class UnoApp {
 		for (int i = 0; i < reconnectCount; i++) {
 			try {
 				XUnoUrlResolver resolver = UnoUrlResolver.create(Bootstrap.createInitialComponentContext(null));
-				componentContext = UnoRuntime.queryInterface(XComponentContext.class, resolver.resolve("uno:"
+ unoUrl + ";StarOffice.ComponentContext"));
+				componentContext = (XComponentContext) UnoRuntime.queryInterface(XComponentContext.class,
resolver.resolve("uno:" + unoUrl + ";StarOffice.ComponentContext"));
 				componentFactory = componentContext.getServiceManager();
-				serviceFactory = UnoRuntime.queryInterface(XMultiServiceFactory.class, componentFactory);
-				desktop = UnoRuntime.queryInterface(XDesktop.class, serviceFactory.createInstance("com.sun.star.comp.framework.Desktop"));
+				serviceFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class,
componentFactory);
+				desktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, serviceFactory.createInstance("com.sun.star.comp.framework.Desktop"));
 				return;
 			} catch (Exception e) {
 				// e.printStackTrace(); // for debugging

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/db/DBAccess.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/db/DBAccess.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/db/DBAccess.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/db/DBAccess.java Fri Sep  7 10:12:47
2012
@@ -102,9 +102,9 @@ public class DBAccess {
 	public void testSaveAs() throws Exception, IOException, java.lang.Exception {
 
 		m_databaseDocument = saveAndReloadDoc(m_databaseDocument, "", "odb");
-		XModel docModel = UnoRuntime.queryInterface(XModel.class,
+		XModel docModel = (XModel) UnoRuntime.queryInterface(XModel.class,
 				m_databaseDocument);
-		m_documentUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
+		m_documentUI = (XDatabaseDocumentUI) UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
 				docModel.getCurrentController());
 		m_documentUI.connect();
 		assertTrue("could not connect to " + DBUtil.getDocumentURL(),
@@ -123,12 +123,12 @@ public class DBAccess {
 		// ---save and reload database document
 		m_databaseDocument = saveAndReloadDoc(m_databaseDocument, "", "odb");
 
-		XModel docModel = UnoRuntime.queryInterface(XModel.class,
+		XModel docModel = (XModel) UnoRuntime.queryInterface(XModel.class,
 				m_databaseDocument);
-		m_documentUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
+		m_documentUI = (XDatabaseDocumentUI) UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
 				docModel.getCurrentController());
 		m_documentUI.connect();
-		XTablesSupplier suppTables = UnoRuntime.queryInterface(
+		XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(
 				XTablesSupplier.class, m_documentUI.getActiveConnection());
 		XNameAccess tables = suppTables.getTables();
 		assertTrue("the newly created table has not been written",
@@ -136,7 +136,7 @@ public class DBAccess {
 	}
 
 	protected XMultiServiceFactory getMSF() {
-		final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(
+		final XMultiServiceFactory xMSF1 = (XMultiServiceFactory) UnoRuntime.queryInterface(
 				XMultiServiceFactory.class, app.getComponentContext()
 						.getServiceManager());
 		return xMSF1;
@@ -156,7 +156,7 @@ public class DBAccess {
 				XStorable.class, m_databaseDocument2);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XOfficeDatabaseDocument.class,
+		return (XOfficeDatabaseDocument) UnoRuntime.queryInterface(XOfficeDatabaseDocument.class,
 				app.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/pvt/Conversion.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/pvt/Conversion.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/pvt/Conversion.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/pvt/Conversion.java Fri Sep  7 10:12:47
2012
@@ -54,7 +54,7 @@ public class Conversion {
 	@Rule
 	public Logger log = Logger.getLogger(this);
 	
-	public static String repos = System.getProperty("user.home") + "/pvt_conversion_data";
+	public static String repos = Testspace.getPath("pvt_conversion_data");
 
 	public static String[] params = {
 		".*\\.((doc)|(dot)|(odt)|(ott))$", "writer_pdf_Export", "pdf", 

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomAnimation.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomAnimation.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomAnimation.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomAnimation.java Fri Sep 
7 10:12:47 2012
@@ -274,7 +274,7 @@ public class CustomAnimation {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomShow.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomShow.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomShow.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/CustomShow.java Fri Sep  7 10:12:47
2012
@@ -199,7 +199,7 @@ public class CustomShow {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphStyle.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphStyle.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphStyle.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphStyle.java Fri Sep  7
10:12:47 2012
@@ -195,7 +195,7 @@ public class ParagraphStyle {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphTextProperty.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphTextProperty.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphTextProperty.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/ParagraphTextProperty.java Fri
Sep  7 10:12:47 2012
@@ -162,7 +162,7 @@ public class ParagraphTextProperty {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/SlideShow.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/SlideShow.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/SlideShow.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/SlideShow.java Fri Sep  7 10:12:47
2012
@@ -164,7 +164,7 @@ public class SlideShow {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/chart/ChartTypes.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/chart/ChartTypes.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/chart/ChartTypes.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/chart/ChartTypes.java Fri Sep
 7 10:12:47 2012
@@ -285,7 +285,7 @@ public class ChartTypes {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeProperties.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeProperties.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeProperties.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeProperties.java Fri
Sep  7 10:12:47 2012
@@ -398,7 +398,7 @@ public class ShapeProperties {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeTypes.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeTypes.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeTypes.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sd/shape/ShapeTypes.java Fri Sep
 7 10:12:47 2012
@@ -172,7 +172,7 @@ public class ShapeTypes {
 				XStorable.class, presentationDocument);
 		xStorable.storeToURL(FileUtil.getUrl(filePath), aStoreProperties);
 
-		return UnoRuntime.queryInterface(XComponent.class,
+		return (XComponent) UnoRuntime.queryInterface(XComponent.class,
 				unoApp.loadDocument(filePath));
 	}
 }

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/bookmark/CheckBookmarks.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/bookmark/CheckBookmarks.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/bookmark/CheckBookmarks.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/bookmark/CheckBookmarks.java Fri
Sep  7 10:12:47 2012
@@ -53,14 +53,14 @@ public class CheckBookmarks {
 	@Before
 	public void setUp() throws Exception {
 		app.start();
-		document = UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
+		document = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
 		XText xText = document.getText();
 		XTextCursor xTextCursor = xText.createTextCursor();
 		xTextCursor.setString("Contents");
 		
 		for (int i = 0; i < initBookmarkNames.length; i++) {
 			xTextCursor.gotoEnd(false);
-			XTextRange xTextRange = UnoRuntime.queryInterface(XTextRange.class, xTextCursor);
+			XTextRange xTextRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xTextCursor);
 			xText.insertControlCharacter(xTextRange, ControlCharacter.PARAGRAPH_BREAK, false);
 			xTextCursor.gotoEnd(false);
 			xTextCursor.setString(initBookmarkContents[i]);
@@ -92,7 +92,7 @@ public class CheckBookmarks {
 
 	@Test
 	public void createBookmark() throws Exception {
-		XNameAccess xBookmarks = UnoRuntime.queryInterface(XBookmarksSupplier.class, document).getBookmarks();
+		XNameAccess xBookmarks = ((XBookmarksSupplier)UnoRuntime.queryInterface(XBookmarksSupplier.class,
document)).getBookmarks();
 		assertArrayEquals("Bookmark name list:", initBookmarkNames, xBookmarks.getElementNames());
 		assertArrayEquals("Bookmark content list:", initBookmarkContents, getBookmarkContents(xBookmarks));
 	}
@@ -109,7 +109,7 @@ public class CheckBookmarks {
 		xTextCursor.setString("new");
 		
 		// Let's see the bookmarks
-		XNameAccess xBookmarks = UnoRuntime.queryInterface(XBookmarksSupplier.class, document).getBookmarks();
+		XNameAccess xBookmarks = ((XBookmarksSupplier)UnoRuntime.queryInterface(XBookmarksSupplier.class,
document)).getBookmarks();
 		assertArrayEquals("Bookmark name list after updating some content:", expectedBookmarkNames,
xBookmarks.getElementNames());
 		assertArrayEquals("Bookmark content list after updating some content:", expectedBookmarkContents,
getBookmarkContents(xBookmarks));
 	}
@@ -125,7 +125,7 @@ public class CheckBookmarks {
 		xTextCursor.setString("");
 		
 		// Let's see the bookmarks
-		XNameAccess xBookmarks = UnoRuntime.queryInterface(XBookmarksSupplier.class, document).getBookmarks();
+		XNameAccess xBookmarks = ((XBookmarksSupplier)UnoRuntime.queryInterface(XBookmarksSupplier.class,
document)).getBookmarks();
 		assertArrayEquals("Bookmark name list after deleting some content:", expectedBookmarkNames,
xBookmarks.getElementNames());
 		assertArrayEquals("Bookmark content list after deleting some content:", expectedBookmarkContents,
getBookmarkContents(xBookmarks));
 	}

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/crossreference/CheckCrossReferences.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/crossreference/CheckCrossReferences.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/crossreference/CheckCrossReferences.java
(original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/crossreference/CheckCrossReferences.java
Fri Sep  7 10:12:47 2012
@@ -61,7 +61,7 @@ public class CheckCrossReferences {
 	@Before
 	public void setUpDocument() throws Exception {
 		app.start();
-		document = UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.prepareData("uno/sw/CheckCrossReferences.odt")));
+		document = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.prepareData("uno/sw/CheckCrossReferences.odt")));
 	}
 
 	@After
@@ -77,21 +77,21 @@ public class CheckCrossReferences {
 	public XTextField getNextField() throws Exception {
 		if (xPortionEnum != null) {
 			while (xPortionEnum.hasMoreElements()) {
-				XPropertySet xPortionProps = UnoRuntime.queryInterface(XPropertySet.class, xPortionEnum.nextElement());
+				XPropertySet xPortionProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
xPortionEnum.nextElement());
 				final String sPortionType = xPortionProps.getPropertyValue("TextPortionType").toString();
 				if (sPortionType.equals("TextField"))
-					return UnoRuntime.queryInterface(XTextField.class, xPortionProps.getPropertyValue("TextField"));
+					return (XTextField) UnoRuntime.queryInterface(XTextField.class, xPortionProps.getPropertyValue("TextField"));
 			}
 		}
 
 		while (xParaEnum.hasMoreElements()) {
-			XEnumerationAccess aPara = UnoRuntime.queryInterface(XEnumerationAccess.class, xParaEnum.nextElement());
+			XEnumerationAccess aPara = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class,
xParaEnum.nextElement());
 			xPortionEnum = aPara.createEnumeration();
 			while (xPortionEnum.hasMoreElements()) {
-				XPropertySet xPortionProps = UnoRuntime.queryInterface(XPropertySet.class, xPortionEnum.nextElement());
+				XPropertySet xPortionProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
xPortionEnum.nextElement());
 				final String sPortionType = xPortionProps.getPropertyValue("TextPortionType").toString();
 				if (sPortionType.equals("TextField"))
-					return UnoRuntime.queryInterface(XTextField.class, xPortionProps.getPropertyValue("TextField"));
+					return (XTextField) UnoRuntime.queryInterface(XTextField.class, xPortionProps.getPropertyValue("TextField"));
 			}
 		}
 
@@ -115,11 +115,11 @@ public class CheckCrossReferences {
 	@Test
 	public void checkCrossReferences() throws Exception {
 		// setup paragraph enumeration
-		xParaEnum = UnoRuntime.queryInterface(XEnumerationAccess.class, document.getText()).createEnumeration();
+		xParaEnum = ((XEnumerationAccess)UnoRuntime.queryInterface(XEnumerationAccess.class, document.getText())).createEnumeration();
 
 		// get field refresher
-		XTextFieldsSupplier xFieldSupp = UnoRuntime.queryInterface(XTextFieldsSupplier.class, document);
-		xFldsRefresh = UnoRuntime.queryInterface(XRefreshable.class, xFieldSupp.getTextFields());
+		XTextFieldsSupplier xFieldSupp = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
+		xFldsRefresh = (XRefreshable) UnoRuntime.queryInterface(XRefreshable.class, xFieldSupp.getTextFields());
 
 		// strings for checking
 		final String FldResult1 = "*i*";
@@ -172,7 +172,7 @@ public class CheckCrossReferences {
 		// insert a certain cross-reference bookmark and a reference field to this bookmark
 
 		// restart paragraph enumeration
-		xParaEnum = UnoRuntime.queryInterface(XEnumerationAccess.class, document.getText()).createEnumeration();
+		xParaEnum = ((XEnumerationAccess)UnoRuntime.queryInterface(XEnumerationAccess.class, document.getText())).createEnumeration();
 
 		// iterate on the paragraphs to find certain paragraph to insert the bookmark
 		XTextRange xParaTextRange = null;
@@ -207,7 +207,7 @@ public class CheckCrossReferences {
 		xFldsRefresh.refresh();
 
 		// check inserted reference field
-		xField = UnoRuntime.queryInterface(XTextField.class, xNewField);
+		xField = (XTextField) UnoRuntime.queryInterface(XTextField.class, xNewField);
 		assertEquals("inserted reference field doesn't has correct field result", "J", xField.getPresentation(false));
 		xParaTextRange.getStart().setString("Hallo new bookmark: ");
 		xFldsRefresh.refresh();

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/CheckDateTimeField.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/CheckDateTimeField.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/CheckDateTimeField.java
(original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/CheckDateTimeField.java
Fri Sep  7 10:12:47 2012
@@ -137,11 +137,11 @@ public class CheckDateTimeField {
 		assertTrue("Verify time field is creatd, by verify it's minutes",  dateString.indexOf(String.valueOf(dateField.Minutes).trim())
!= -1);
 		int expectHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
 		assertEquals("Verify time field is creatd, value is right, by compare Hour", expectHour,
dateField.Hours);
-		XStorable store = UnoRuntime.queryInterface(XStorable.class, document);
+		XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class, document);
 		store.storeAsURL(url, propsValue);
 		app.closeDocument(document);
 		document = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.loadDocumentFromURL(url));
-		XTextFieldsSupplier fieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
+		XTextFieldsSupplier fieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
 		XEnumerationAccess xEnumeratedFields = fieldsSupplier.getTextFields();
 		XEnumeration enumeration = xEnumeratedFields.createEnumeration();
 		while (enumeration.hasMoreElements()) {
@@ -205,11 +205,11 @@ public class CheckDateTimeField {
 		assertTrue("Verify date field is creatd, by verify it's Day",  dateString.indexOf(String.valueOf(dateField.Day).trim())
!= -1);
 		int expectDay = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
 		assertEquals("Verify date field is creatd, value is right, by compare Day", expectDay,
dateField.Day);
-		XStorable store = UnoRuntime.queryInterface(XStorable.class, document);
+		XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class, document);
 		store.storeAsURL(url, propsValue);
 		app.closeDocument(document);
 		document = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.loadDocumentFromURL(url));
-		XTextFieldsSupplier fieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
+		XTextFieldsSupplier fieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
 		XEnumerationAccess xEnumeratedFields = fieldsSupplier.getTextFields();
 		XEnumeration enumeration = xEnumeratedFields.createEnumeration();
 		while (enumeration.hasMoreElements()) {

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageCountField.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageCountField.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageCountField.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageCountField.java Fri
Sep  7 10:12:47 2012
@@ -173,7 +173,7 @@ public class PageCountField {
 	 * @throws Exception
 	 */
 	private boolean isContainPageCountField(XTextDocument document) throws Exception {
-		XTextFieldsSupplier fieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
+		XTextFieldsSupplier fieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
 		XEnumerationAccess xEnumeratedFields = fieldsSupplier.getTextFields();
 		
 		XEnumeration enumeration = xEnumeratedFields.createEnumeration();

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageNumberField.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageNumberField.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageNumberField.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/PageNumberField.java Fri
Sep  7 10:12:47 2012
@@ -179,7 +179,7 @@ public class PageNumberField {
 	 * @throws Exception
 	 */
 	private boolean isContainPageNumberField(XTextDocument document) throws Exception {
-		XTextFieldsSupplier fieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
+		XTextFieldsSupplier fieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
 		XEnumerationAccess xEnumeratedFields = fieldsSupplier.getTextFields();
 		XEnumeration enumeration = xEnumeratedFields.createEnumeration();
 		while (enumeration.hasMoreElements()) {

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/SubjectField.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/SubjectField.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/SubjectField.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/field/SubjectField.java Fri Sep
 7 10:12:47 2012
@@ -183,7 +183,7 @@ public class SubjectField {
 	 * @throws Exception
 	 */
 	private boolean isContainSubjectField(XTextDocument document, String content) throws Exception
{
-		XTextFieldsSupplier fieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
+		XTextFieldsSupplier fieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class,
document);
 		XEnumerationAccess xEnumeratedFields = fieldsSupplier.getTextFields();
 		XEnumeration enumeration = xEnumeratedFields.createEnumeration();
 		while (enumeration.hasMoreElements()) {

Modified: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/frame/CheckFrames.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/frame/CheckFrames.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/frame/CheckFrames.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/frame/CheckFrames.java Fri Sep
 7 10:12:47 2012
@@ -50,7 +50,7 @@ public class CheckFrames {
 	@Test(expected = NoSuchElementException.class)
 	public void testLoadTextFrame() throws Exception {
 		document = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.prepareData("uno/sw/CheckFlies.odt")));
-		XTextFramesSupplier xTFS = UnoRuntime.queryInterface(XTextFramesSupplier.class, document);
+		XTextFramesSupplier xTFS = (XTextFramesSupplier) UnoRuntime.queryInterface(XTextFramesSupplier.class,
document);
 		String[] expectedNames = { "Frame1", "Frame2" };
 		String[] expectedContents = { "PageBoundFrame", "ParaBoundFrame" };
 		XNameAccess xTextFrames = xTFS.getTextFrames();
@@ -58,12 +58,12 @@ public class CheckFrames {
 		assertTrue("Has text frame named Frame1", xTextFrames.hasByName(expectedNames[0]));
 		assertFalse("Has nonexisting text frame.", xTextFrames.hasByName("Nonexisting text frame"));
 
-		XIndexAccess xTextFramesIdx = UnoRuntime.queryInterface(XIndexAccess.class, xTextFrames);
+		XIndexAccess xTextFramesIdx = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,
xTextFrames);
 		assertEquals("Text frame count", expectedNames.length, xTextFramesIdx.getCount());
 		String[] contents = new String[expectedNames.length];
 		for (int i = 0; i < xTextFramesIdx.getCount(); i++) {
 			Object obj = xTextFramesIdx.getByIndex(i);
-			XTextFrame frame = UnoRuntime.queryInterface(XTextFrame.class, obj);
+			XTextFrame frame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, obj);
 			contents[i] = frame.getText().getString();
 		}
 		assertArrayEquals("Text frame contents", expectedContents, contents);

Modified: incubator/ooo/trunk/test/testuno/source/testlib/uno/DBUtil.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testlib/uno/DBUtil.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testlib/uno/DBUtil.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testlib/uno/DBUtil.java Fri Sep  7 10:12:47 2012
@@ -103,10 +103,10 @@ public class DBUtil {
 	public static void getDocument(final String _docURL) throws Exception {
 		m_databaseDocumentFile = _docURL;
 
-		final XNameAccess dbContext = UnoRuntime.queryInterface(
+		final XNameAccess dbContext = (XNameAccess) UnoRuntime.queryInterface(
 				XNameAccess.class,
 				m_orb.createInstance("com.sun.star.sdb.DatabaseContext"));
-		final XDocumentDataSource dataSource = UnoRuntime.queryInterface(
+		final XDocumentDataSource dataSource = (XDocumentDataSource) UnoRuntime.queryInterface(
 				XDocumentDataSource.class, dbContext.getByName(_docURL));
 
 		m_databaseDocument = dataSource.getDatabaseDocument();
@@ -259,7 +259,7 @@ public class DBUtil {
 	 */
 	static public void close() {
 		// close connection
-		final XCloseable closeConn = UnoRuntime.queryInterface(
+		final XCloseable closeConn = (XCloseable) UnoRuntime.queryInterface(
 				XCloseable.class, m_connection != null ? m_connection : null);
 		if (closeConn != null) {
 			try {
@@ -270,7 +270,7 @@ public class DBUtil {
 		m_connection = null;
 
 		// close document
-		final com.sun.star.util.XCloseable closeDoc = UnoRuntime
+		final com.sun.star.util.XCloseable closeDoc = (com.sun.star.util.XCloseable) UnoRuntime
 				.queryInterface(com.sun.star.util.XCloseable.class,
 						m_databaseDocument);
 		if (closeDoc != null) {

Modified: incubator/ooo/trunk/test/testuno/source/testlib/uno/SCUtil.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testlib/uno/SCUtil.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testlib/uno/SCUtil.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testlib/uno/SCUtil.java Fri Sep  7 10:12:47 2012
@@ -520,7 +520,7 @@ public class SCUtil {
 		closeFile(xSpreadsheetDocument);
 		
 		String filePath = Testspace.getPath(scTempDir + fullFileName);
-		XSpreadsheetDocument xScDocument = UnoRuntime.queryInterface(XSpreadsheetDocument.class,
unoApp.loadDocument(filePath));
+		XSpreadsheetDocument xScDocument = (XSpreadsheetDocument) UnoRuntime.queryInterface(XSpreadsheetDocument.class,
unoApp.loadDocument(filePath));
 		
 		return xScDocument;
 	}

Modified: incubator/ooo/trunk/test/testuno/source/testlib/uno/SWUtil.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testlib/uno/SWUtil.java?rev=1381972&r1=1381971&r2=1381972&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testlib/uno/SWUtil.java (original)
+++ incubator/ooo/trunk/test/testuno/source/testlib/uno/SWUtil.java Fri Sep  7 10:12:47 2012
@@ -59,7 +59,7 @@ public class SWUtil {
  	}
 
 	public static void saveAs(XTextDocument document, String filterValue, String url) throws
IOException {
-		XStorable store = UnoRuntime.queryInterface(XStorable.class, document);
+		XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class, document);
  		PropertyValue[] propsValue = new PropertyValue[1];
  		propsValue[0] = new PropertyValue();
  		propsValue[0].Name = "FilterName";
@@ -69,12 +69,12 @@ public class SWUtil {
  	}
 	
 	public static void save(XTextDocument document) throws IOException {
- 		XStorable store = UnoRuntime.queryInterface(XStorable.class, document);
+ 		XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class, document);
 		store.store();
 	}
 	
 	public static XTextDocument saveAndReload(XTextDocument document, UnoApp app) throws Exception
{
- 		XStorable store = UnoRuntime.queryInterface(XStorable.class, document);
+ 		XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class, document);
 		store.store();
 		String url = document.getURL();
 		app.closeDocument(document);
@@ -117,7 +117,7 @@ public class SWUtil {
 	 * @throws Exception
 	 */
 	public static void setDocumentProperty(XTextDocument document, String prop, String propValue)
throws Exception {
-		XDocumentInfoSupplier docInfoSupplier = UnoRuntime.queryInterface(XDocumentInfoSupplier.class,
document);
+		XDocumentInfoSupplier docInfoSupplier = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class,
document);
 		XDocumentInfo docInfo = docInfoSupplier.getDocumentInfo();
 		XPropertySet propsDocInfo = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,
docInfo);
 		propsDocInfo.setPropertyValue(prop, propValue);
@@ -132,10 +132,10 @@ public class SWUtil {
 	 * @throws Exception
 	 */
 	public static void insertBookmark(XTextDocument document, XTextCursor textCursor, String
bookmarkName) throws Exception {
-		XMultiServiceFactory xDocFactory = UnoRuntime.queryInterface(XMultiServiceFactory.class,
document);
+		XMultiServiceFactory xDocFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class,
document);
 		Object xBookmark = xDocFactory.createInstance("com.sun.star.text.Bookmark");
-		XTextContent xBookmarkAsTextContent = UnoRuntime.queryInterface(XTextContent.class, xBookmark);
-		XNamed xBookmarkAsNamed = UnoRuntime.queryInterface(XNamed.class, xBookmark);
+		XTextContent xBookmarkAsTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class,
xBookmark);
+		XNamed xBookmarkAsNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class, xBookmark);
 		xBookmarkAsNamed.setName(bookmarkName);
 		document.getText().insertTextContent(textCursor, xBookmarkAsTextContent, true);
 	}



Mime
View raw message