[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Java Bool type
From: |
PhilipNienhuis |
Subject: |
Re: Java Bool type |
Date: |
Tue, 12 Mar 2013 13:37:45 -0700 (PDT) |
Rik-4 wrote
> On 03/11/2013 02:35 PM, Philip Nienhuis wrote:
>> (maintainers ML added)
>>
>> Rik wrote:
>>> On 03/11/2013 12:46 PM, Philip Nienhuis wrote:
>>>> Rik wrote:
>>>>> On 03/10/2013 02:00 PM,
> octave-maintainers-request@
> wrote:
>>>>>> The issue turned out to be that Octave "logical" class isn't
>>>>>> automatically
>>>>>> "casted" (?) into a Java Boolean class anymore, as it was in the OF
>>>>>> Java
>>>>>> package.
>>>>>> Somewhere higher up in the relevant code I had a statement:
>>>>>>
>>>>>> lProp = javaObject ("com.sun.star.beans.PropertyValue", "Hidden", 0,
>>>>>> true,
>>>>>> []);
>>>>>>
>>>>>> which had to be replaced by:
>>>>>>
>>>>>> jtrue = javaObject ("java.lang.Boolean", "true");
>>>>>> lProp = javaObject ("com.sun.star.beans.PropertyValue", "Hidden", 0,
>>>>>> jtrue,
>>>>>> []);
>>>>>>
>>>>>> (Same had to be done in other parts of the code.)
>>>>>> After that I could use Open/LibreOffice as before from Octave.
>>>>>>
>>>>>> I can't judge whether this is a bug or just new behavior. If you
>>>>>> think
>>>>>> it's
>>>>>> a bug I'll file a bug report.
>>>>> 3/10/13
>>>>>
>>>>> Philip,
>>>>>
>>>>> I would report this as a bug so we can track it. For compatibility
>>>>> with
>>>>> Matlab
>>>>> (http://www.mathworks.com/help/matlab/matlab_external/passing-data-to-a-java-method.html),
>>>>>
>>>>>
>>>>> and because it is the sensible thing to do, logical values should be
>>>>> converted to native boolean Java types where possible. The code for
>>>>> doing
>>>>> this is still in the unbox routine, but it looks like it may not be
>>>>> activated because it is too low down in the if/else if tree. Please
>>>>> try
>>>>> the attached patch (patch -p1< patch.java_bool) and see whether it
>>>>> eliminates the need to create a jtrue object.
Rik,
With your patch OpenOffice / LibreOffice works again, the
io_ods_testscript.m & io_xls_testscript.m gave no errors.
I wonder if I still need to file a bug report (for the statistics?)
Anyway all this searching allowed me to pinpoint a bug in LibreOffice3.6
that I'll report upstream ( invoking UNO/Java to create an .xls-file
("BIFF8" file) actually gets you an .xlsx file ("OOXML") with .xls
extension)
Thanks,
Philip
--
View this message in context:
http://octave.1599824.n4.nabble.com/Re-Java-Bool-type-tp4650718p4650735.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.