diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-08-27 14:22:37 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-08-27 14:22:37 +0000 |
commit | fe260a91e799e3a83491a6a45b0dfbe2ce5584b6 (patch) | |
tree | 77ca582d4dbd9fe12b13334bd619c1ecfa38bda4 /bean/com/sun/star/comp | |
parent | INTEGRATION: CWS sb91 (1.7.8); FILE MERGED (diff) | |
download | core-fe260a91e799e3a83491a6a45b0dfbe2ce5584b6.tar.gz core-fe260a91e799e3a83491a6a45b0dfbe2ce5584b6.zip |
INTEGRATION: CWS oobeanfix_DEV300 (1.11.12); FILE MERGED
2008/08/26 13:29:45 jsc 1.11.12.1: #i93126# read UNO_PATH variable to get path to soffice binary
Diffstat (limited to 'bean/com/sun/star/comp')
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index db31127d07e4..0f888412c225 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: LocalOfficeConnection.java,v $ - * $Revision: 1.11 $ + * $Revision: 1.12 $ * * This file is part of OpenOffice.org. * @@ -142,9 +142,6 @@ public class LocalOfficeConnection } // load shared library for JNI code -// String aSharedLibName = getProgramPath() + java.io.File.separator + -// System.mapLibraryName(OFFICE_LIB_NAME); -// System.load( aSharedLibName ); NativeLibraryLoader.loadLibrary( LocalOfficeConnection.class.getClassLoader(), "officebean" ); } @@ -770,7 +767,14 @@ public class LocalOfficeConnection } // create call with arguments String[] cmdArray = new String[nSizeCmdArray]; - cmdArray[0] = (new File(getProgramPath(), OFFICE_APP_NAME)).getPath(); + + // read UNO_PATH environment variable to get path to soffice binary + String unoPath = System.getenv("UNO_PATH"); + if (unoPath == null) + throw new java.io.IOException( "UNO_PATH environment variable is not set (required system path to the office program directory)" ); + +// cmdArray[0] = (new File(getProgramPath(), OFFICE_APP_NAME)).getPath(); + cmdArray[0] = (new File(unoPath, OFFICE_APP_NAME)).getPath(); cmdArray[1] = "-nologo"; cmdArray[2] = "-nodefault"; if ( mConnType.equals( "pipe" ) ) |