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

Cedric Bosdonnat cedric.bosdonnat.ooo at free.fr
Mon May 23 04:58:13 PDT 2011

Hi Jean-Baptiste,

On Mon, 2011-05-23 at 07:30 +0200, Jean-Baptiste Faure wrote:
> No suggestion to help me to fix this bug ?
> I think this bug is a bad communication about the LibO's involment for ODF.

Sure, read below:

> Le 15/05/2011 11:31, Jean-Baptiste Faure a écrit :
> > Hi,
> > 
> > I try to fix the bug fdo 36519. With the help of Cédric I found that
> > commenting four lines in
> > ../clone/components/cui/source/options/optsave.cxx solves the problem.
> > Precisely the four lines are
> > 
> >         else if(!pProperties[nProp].Name.compareToAscii("Name"))
> >         {
> >             pProperties[nProp].Value >>= sRet;
> >         }
> > 
> > at the end of lcl_ExtracUIName() method.

Greping on that function name (mistyped one), you'll see that this one
is used in only one place... so no need to worry about its impact:
you'll see it pretty quickly.

> > I thing it is only the first step to the right solution of the problem
> > because I can't find any previous modification of this piece of code.

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.

You should rather store both values in separate variables when looping
and checking which one to use when you found both.


Cédric Bosdonnat
LibreOffice hacker
OOo Eclipse Integration developer

More information about the LibreOffice mailing list