[Libreoffice] about bug fdo 36519 ("writer8" instead of "ODF Text" in options UI)

Jean-Baptiste Faure jbf.faure at orange.fr
Sun May 29 02:40:27 PDT 2011


Le 25/05/2011 08:53, Jean-Baptiste Faure a écrit :
> Hi Cédric,
> 
> Le 23/05/2011 13:58, Cedric Bosdonnat a écrit :
> [...]
>>
>> It may be that it never worked properly before or that a tiny thing
>> changed in the way to get the list of properties. In fact that function
>> should try to get the properties in the following order of importance:
>>   1/ UIName
>>   2/ Name
>> The problem with the current algorithm is that it uses the last one
>> found in the loop... which isn't robust at all as it completely depends
>> on the order of the properties.

Hi Cédric,

It works if I add a break statement when UIName is found :

    for(int nProp = 0; nProp < rProperties.getLength(); nProp++)
    {
        if(!pProperties[nProp].Name.compareToAscii("UIName"))
        {
            pProperties[nProp].Value >>= sRet;
+            break;
        }

If UIName is found first then the loop terminates. Is it a good method
to fix the problem ?

Best regards
JBF

-- 
Seuls des formats ouverts peuvent assurer la pérennité de vos documents.


More information about the LibreOffice mailing list