com.sun.star.comp.beans.LocalOfficeConnection has a bug[1].

In the setUnoUrl() function the mPipe variable is not initialized properly.
It is set to null regardless of the value passed in.

This null value causes problems later. In the OfficeService.getIdentifier() 
function, a null mPipe means that getPipeName() is called again to provide a 
value.
So if you would like to set a custom UNO connection you cannot, as getPipeName 
always returns a JVM wide constant.

The bug is that the requested key is "pipe", when in fact the key should be 
"name".

My suggested fix (r1.10) is to change the line in setUnoUrl():

mPipe = (String) aURL.getConnectionParameters().get( "pipe" );

to

mPipe = (String) aURL.getConnectionParameters().get( "name" );

Unfortunately all the member variables are marked private, so you cannot fix 
the binary jar at runtime: by creating a subclass and overriding the setUnoUrl 
method.
Maybe to reduce further unfixable binaries most member variables and methods 
could be changed to protected instead.

At the moment I have altered the binary officebean.jar to remove the 
LocalOfficeConnection class and compiled my own revision based on the source.

Cheers!

Terry.

-----------------------------------
[1] 
http://api.openoffice.org/source/browse/api/bean/com/sun/star/comp/beans/LocalOfficeConnection.java?view=markup



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to