Bug 92627 - Pass several options to OfficeBean (see comment 3)
Summary: Pass several options to OfficeBean (see comment 3)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Java-Runtime-JRE
  Show dependency treegraph
 
Reported: 2015-07-08 16:17 UTC by thierry
Modified: 2023-10-03 14:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thierry 2015-07-08 16:17:16 UTC
Hi,

I take a java application that uses 'officebean.jar'. I want to use 'LibreOffice' and 'openjava-7', previously the application using 'OpenOffice3.2' and 'sun-java-6'.
With 'LibrOffice' and 'sun-java-6', I have resize problem. The bean is drawn on a small portion of the top / left corner. So I decided to update 'java'. With 'LibreOffice' and 'openjava-7', no resize problems, seizure, works. The only problem is the cursor, it is not visible. I spent the apps in 'awt' nothing works.
If somebody to ideas, thank you for your help.

Bye
Comment 1 Joel Madero 2015-07-12 17:23:29 UTC
We're going to need some expert advise for this one. Requesting such now.
Comment 2 thierry 2015-07-12 19:00:27 UTC
I look forward to your advice !
thank you
Comment 3 thierry 2015-07-28 10:06:15 UTC
Problem solved, LO 4.4 does not have the bug.
Aure concern impossible to pass several option bean
(-Dcom.sun.star.officebean.Options="--norestore -env:UserInstallation=file://$HOME/.myconf/bureautissimo")

, here is a correction:

svn diff -r 28332 officebean/com/sun/star/comp/beans/LocalOfficeConnection.java
Index: officebean/com/sun/star/comp/beans/LocalOfficeConnection.java
===================================================================
--- officebean/com/sun/star/comp/beans/LocalOfficeConnection.java	(révision 28332)
+++ officebean/com/sun/star/comp/beans/LocalOfficeConnection.java	(copie de travail)
@@ -683,6 +683,7 @@
         {
             int nSizeCmdArray = 4;
             String sOption = null;
+            String[] aOption = 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
@@ -692,7 +693,10 @@
             try {
                 sOption = System.getProperty("com.sun.star.officebean.Options");
                 if (sOption != null)
-                    nSizeCmdArray ++;
+								{
+									aOption = sOption.split(" ");
+									nSizeCmdArray += aOption.length;
+								}
             } catch (java.lang.SecurityException e)
             {
                 e.printStackTrace();
@@ -717,7 +721,11 @@
                 throw new java.io.IOException( "not connection specified" );
 
             if (sOption != null)
-                cmdArray[4] = sOption;
+						{
+							int i = 0;
+							for (i = 0; i < aOption.length; i++)
+								cmdArray[4 + i] = aOption[i];
+						}
 
             // start process
             mProcess = Runtime.getRuntime().exec(cmdArray);
Comment 4 Buovjaga 2015-07-28 10:38:49 UTC
Ok, I changed the summary to match your other issue.

Please submit your patch to gerrit for review: https://wiki.documentfoundation.org/Development/gerrit

Note in that wiki page: "If this is the first time you are contributing a patch to the LibreOffice project, please add yourself to the developer and contributor list (following the instructions there) and state the license of your contributions."
Comment 5 Robinson Tryon (qubit) 2015-12-10 10:13:27 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2016-09-19 15:29:49 UTC Comment hidden (obsolete)