You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by li...@apache.org on 2012/09/12 09:14:51 UTC

svn commit: r1383812 - in /incubator/ooo/trunk/test/testcommon/source/org/openoffice/test: OpenOffice.java vcl/widgets/VclApp.java

Author: liuzhe
Date: Wed Sep 12 07:14:51 2012
New Revision: 1383812

URL: http://svn.apache.org/viewvc?rev=1383812&view=rev
Log:
Use ./soffice instead ./soffice.bin to start OpenOffice

Modified:
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java?rev=1383812&r1=1383811&r2=1383812&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java Wed Sep 12 07:14:51 2012
@@ -49,7 +49,7 @@ public class OpenOffice {
 	};
 	
 	private static final String USERHOME = System.getProperty("user.home");
-	private static final String BIN = SystemUtil.isWindows() ? "program/soffice.exe" : SystemUtil.isMac() ? "MacOS/soffice.bin": "program/soffice.bin"; 
+	private static final String BIN = SystemUtil.isWindows() ? "program/soffice.exe" : SystemUtil.isMac() ? "MacOS/soffice": "program/soffice"; 
 	private static final String SYSUSERCONFIG = SystemUtil.isWindows()? System.getenv("APPDATA") : SystemUtil.isMac() ?  USERHOME + "/Library/Application Support" : USERHOME;
 
 	private static OpenOffice defaultInstance = null;
@@ -236,8 +236,8 @@ public class OpenOffice {
 	 */
 	public void kill() {
 		SystemUtil.killProcess(".*soffice.*" + id + ".*");
-		process = null;
 		SystemUtil.sleep(1);
+		process = null;
 	}
 
 	/**

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java?rev=1383812&r1=1383811&r2=1383812&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java Wed Sep 12 07:14:51 2012
@@ -85,7 +85,7 @@ public class VclApp {
 	public void start() {
 		if (openOffice != null) {
 			// workaround for crash when connect to automation server too early
-			double sleep = openOffice.getUserInstallation().exists() ? 3 : 6;
+			double sleep = openOffice.getUserInstallation().exists() ? 3 : 10;
 			if (openOffice.start()) 
 				sleep(sleep);
 		}
@@ -99,20 +99,6 @@ public class VclApp {
 		start();
 	}
 	
-	public void loadDocument(String file) {
-		dispatch(".uno:Open");
-		VclComboBox FilePicker_Path = new VclComboBox("SVT_HID_FILEDLG_AUTOCOMPLETEBOX");
-		FilePicker_Path.setText(file);
-		VclButton FilePicker_Open = new VclButton("fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_OPEN");
-		FilePicker_Open.click();
-		VclWindow writer = new VclWindow("SW_HID_EDIT_WIN");
-		writer.waitForExistence(10, 2);
-	}
-	
-	public void newDocument(String type) {
-		dispatch(type);
-	}
-	
 	public OpenOffice getOpenOffice() {
 		return this.openOffice;
 	}