richedit: Use tabstops to store cell positions

Dylan Smith dylan.ah.smith at gmail.com
Mon Aug 4 18:18:54 CDT 2008


This patch is only concerned with table implmentation before version
4.1. The changes added in version 4.1 of the richedit controls will be
addressed in later patches.

Calls to get the paragraph format of a table row will show that tab
stops are set to the right boundaries of cells.  I have also noticed
that tabs characters (not the \tab control word) in rich text will also
be treated the same way as cells, and will be streamed out with the
\cell control word.

In addition, typing too much text into a cell will push the text in
following cells over one cell, which is additional behaviour that in
consistent with normal tabs being used.

These changes also prevent some nasty assertion failures from rich text
that is not in the expected form.  For instance, the table definition
can come at the end of the text for the row (i.e. just before the \row
controls word), and still be valid rich text according to the
specification, but previously this caused an assertion failure.
---
 dlls/riched20/caret.c   |   27 ------------
 dlls/riched20/editor.c  |  104 ++++++++++++++++++++++++++++++++--------------
 dlls/riched20/editor.h  |    2 -
 dlls/riched20/editstr.h |   14 +------
 dlls/riched20/list.c    |   18 --------
 dlls/riched20/paint.c   |    2 +-
 dlls/riched20/para.c    |   29 -------------
 dlls/riched20/reader.c  |   10 ++++-
 dlls/riched20/rtf.h     |   18 ++++++++-
 dlls/riched20/run.c     |    9 +---
 dlls/riched20/writer.c  |   55 ++++++++++++++++---------
 11 files changed, 138 insertions(+), 150 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Use-tabstops-to-store-cell-positions.diff.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080804/5a507442/attachment-0001.txt 


More information about the wine-patches mailing list