[Libreoffice] Replacing tools/color.hxx with new type

Caolán McNamara caolanm at redhat.com
Sun Jan 9 12:48:47 PST 2011


On Sat, 2011-01-08 at 17:29 +0100, Soeren Moeller wrote:
> - Is this strategy: "writing new type, adding casts to old type,
> replacing occurrences, removing old type" appropriate?

Well, whatever works I guess, personally I prefer a big-bang approach.
i.e. remove the class in one fell sweep. Deprecated things just don't go
away in practice :-) Moving stuff into "binfilter" rather than rewriting
that particular beast is always acceptable as an edge-case though.

> - tools/Color uses ResId, do I understand correctly, that it is a way
> of storing/retrieving objects from memory/storage, and is it
> deprecated (it seems only to be implemented in tools)?

The ResId should be the resource id assigned to something in the .res
files (built from .src files) which describe things like dialogs and so
forth. So I suspect its used to set the colour of parts of the UI. e.g.
find . -name "*.src" -exec grep Color {} /dev/null \;

I'm not sure however what's the goal of replacing "Color", seems a
fairly reasonable class if its types are simply updated to use sal_Foo
ones instead of old-school ones.

C.



More information about the LibreOffice mailing list