Dylan Smith wrote:
The ME_TextBuffer structure is what is used to store the document (as a linked list), so the ME_Document structure isn't being used. There was also a document pointer in the ME_Paragraph structure that was also unused, so I removed it because it is probably related to this used structure.
Would this be needed for EM_FORMATRANGE support or can this safely be removed. Don't want to delete and then add back code.
James McKenzie
On Mon, Feb 16, 2009 at 3:19 PM, James McKenzie jjmckenzie51@earthlink.netwrote:
Would this be needed for EM_FORMATRANGE support or can this safely be removed. Don't want to delete and then add back code.
This wouldn't be needed for EM_FORMATRANGE. If it were to duplicate the text to cache the formatting it could also use ME_TextBuffer, however the previous patch sent for EM_FORMATRANGE didn't even use that, it just duplicated a the text and stored the pointer to the linked list for the text as local variables and destroyed them before returning from ME_FormatRange.
The easier way to handle this message would probably be to rewrap the text, for the specified target device, and then rewrap it again to restore the text before returning from ME_FormatRange. This would then allow ME_SETTARGETDEVICE to be implemented properly, and wouldn't be as bad as duplicating all the text and destoying it while processing each EM_FORMATRANGE message.
The wrapping code needs to be looked at first though, because currently it is slow since it joins and splits runs each time it rewraps the text.