summaryrefslogtreecommitdiff
path: root/bean/com
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-08-27 14:22:37 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-08-27 14:22:37 +0000
commitb6cb37b233628fbd66896728d0dc97b0dc6d3f5c (patch)
tree360024eb7449f8bb8998faf628492421ce80e4ac /bean/com
parent36de4530761352a5f6f49e2484199a2ffa6dc299 (diff)
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')
-rw-r--r--bean/com/sun/star/comp/beans/LocalOfficeConnection.java14
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 6df584817..c02e2eaad 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" ) )