Re: PATCH - PD_Style::isList()

From: Tomas Frydrych <tomasfrydrych_at_yahoo.co.uk>
Date: Fri May 20 2005 - 16:31:56 CEST

Hi Rob,

Robert Staudinger wrote:
> Hi,
>
> while working at the new gtk combos i noticed a problem related to
> PD_Style::isList().
> It returns TRUE even when "list-style:None" is set. I'm proposing the
> attached (very simple) patch to the list because of the feature freeze
> and because this is very central in abiword. Caching of the list
> attribute is also removed because the cache is never reset, so it
> might lead to inconsistencies when changing the style (i read through
> the source code, this should not be called frequently anyways).

This looks like the best solution to the bug; keeping the cache uptodate
is not simple because of the nested nature of styles, and this function
is only used once when merging APs in the varset, so as Rob said,
expanding the styles should not singificantly impact performance.

The one thing that needs to be changed is the return values; boolean
functions should not return ints, i.e.,

return UT_stricmp() != 0; and return false;

Otherwise I think this should be commited, although I would prefer if
Martin had a look at it -- he knows all that is to be known about lists.

Tomas
Received on Fri May 20 16:32:12 2005

This archive was generated by hypermail 2.1.8 : Fri May 20 2005 - 16:32:12 CEST