Andreas Schlüns schrieb:
Harald Weyhing schrieb:
The property "NoRestore" is unknwon and so not supported by
loadComponentFromURL(). The only way to disable recovery is using
of the command line parameter "-norestore" on starting the office.
But that can be a problem for you. I do not know if the bean provide
a way to influence the start process of an used office instance ...
I use the following property:
System.setProperty("com.sun.star.officebean.Options", "-norestore");
OK - you set the value "-norestore" on another place ..
But are you sure that the bean use this system property
realy within a command line starting the office ?
Yes, here is a code snipp from LocalOfficeConnection.java:
sOption is the variable you are interested in.
Cheers
Harald
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[nSizeCmdArray];
cmdArray[0] = (new File(getProgramPath(),
OFFICE_APP_NAME)).getPath();
cmdArray[1] = "-nologo";
cmdArray[2] = "-nodefault";
if ( mConnType.equals( "pipe" ) )
cmdArray[3] = "-accept=pipe,name=" + getIdentifier() +
";" +
mProtocol + ";" + mInitialObject;
else if ( mConnType.equals( "socket" ) )
cmdArray[3] = "-accept=socket,port=" + mPort + ";urp";
else
throw new java.io.IOException( "not connection
specified" );
if (sOption != null)
cmdArray[4] = sOption;
// start process
mProcess = Runtime.getRuntime().exec(cmdArray);
The only way to disable AutoRecovery currently is "soffice.exe
-norestore".
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]