Krzysztof Foltman wrote:

Rob Shearman wrote:

However, there are a few superfluous typecasts.


Any examples ?


There are a few HGDIOBJ casts as well as the already mentioned ALLOC_OBJ macro. For example, in paint.c:
DeleteObject((HGDIOBJ)hbr);




In particular, please remove the ALLOC_OBJ macro because the name seems to suggest it does more than it actually does.


I'd prefer to rename the macro, and not remove it completely, it could be used for tracking memory allocations one day. And I don't really like the HeapAlloc API.


What is the ParaStyle structure used for?


Currently, it's not used. It's a placeholder for keeping real paragraph attributes, RICHEDIT's PARAFORMAT/PARAFORMAT2, part of which is currently stored directly in ME_Paragraph (nAlign, nLeftMargin, nRightMargin, nFirstMargin). The whole paragraph handling (para.c) needs lots of work.


Ok.

Each character can have a different style, so why is there a paragraph style?


See above. The current content of the structure is irrelevant, and is a kind of legacy from my misunderstanding of the relationship between CHARFORMAT and PARAFORMAT.


Great. The code looks good so far. I look forward to being able to review a patch against Wine.

Rob



Reply via email to