[Libreoffice] [PATCH] fix for fdo#36519 (was: about bug fdo 36519 ...)
Jean-Baptiste Faure
jbf.faure at orange.fr
Wed Jun 1 04:30:24 PDT 2011
Le 30/05/2011 09:23, Cedric Bosdonnat a écrit :
> On Sun, 2011-05-29 at 11:40 +0200, Jean-Baptiste Faure wrote:
>> 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 ?
>
> A algorithm teacher would tell you it's ugly... Do we want to possibly
> use the two other fallbacks? In that case you would need to set some
> priority between the two remaining properties that are looked for. But
> may by just greping through the filters definitions you'll find out that
> it's pointless ;)
>
> Thanks for your investigations on that bug.
>
Hi,
Well, after having discussed with Cédric, it is not so ugly.
Here is the patch: it adds the break statement and removes the third
case "Flags" which has nothing to do with the aim of the function "find
the human readable name of the filter".
Best regards
JBF
--
Seuls des formats ouverts peuvent assurer la pérennité de vos documents.
More information about the LibreOffice
mailing list