diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-04-18 10:55:22 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-04-18 10:55:22 +0000 |
commit | 47e3768ee8274975b13fecaa719a640b67bba8e8 (patch) | |
tree | ac3c52a5f974fb6f30d2f7db842f3533fcc10fce /bean/com | |
parent | 1f2ee097e8c3da563e1c400eca54d518f7a4ffe0 (diff) |
INTEGRATION: CWS fwkfinal8 (1.5.14); FILE MERGED
2005/04/02 12:14:20 jl 1.5.14.1: #120731# one can specifya a additional
Diffstat (limited to 'bean/com')
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index a037ad2646c7..3abcd3272cd4 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -2,9 +2,9 @@ * * $RCSfile: LocalOfficeConnection.java,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: mi $ $Date: 2004-10-28 15:49:00 $ + * last change: $Author: obo $ $Date: 2005-04-18 11:55:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -695,8 +695,24 @@ public class LocalOfficeConnection public void startupService() throws java.io.IOException { + int nSizeCmdArray = 4; + String sOption = null; + //examine if user specified command-line options in system properties. + //We may offer later a more sophisticated way of providing options if + //the need arises. Currently this is intended to ease the pain during + //development with pre-release builds of OOo where one wants to start + //OOo with the -norestore options. The value of the property is simple + //passed on to the Runtime.exec call. + try { + sOption = System.getProperty("com.sun.star.officebean.Options"); + if (sOption != null) + nSizeCmdArray ++; + } catch (java.lang.SecurityException e) + { + e.printStackTrace(); + } // create call with arguments - String[] cmdArray = new String[4]; + String[] cmdArray = new String[nSizeCmdArray]; cmdArray[0] = (new File(getProgramPath(), OFFICE_APP_NAME)).getPath(); cmdArray[1] = "-nologo"; cmdArray[2] = "-nodefault"; @@ -708,6 +724,9 @@ public class LocalOfficeConnection else throw new java.io.IOException( "not connection specified" ); + if (sOption != null) + cmdArray[4] = sOption; + // start process mProcess = Runtime.getRuntime().exec(cmdArray); if ( mProcess == null ) |