Commit Graph

41 Commits

Author SHA1 Message Date
Dylan Smith ee6b6f338e richedit: Fixed mistake that didn't cause a bug.
The check to see if the dwOutputBuffer is full was performed incorrectly
in RTFPutUnicodeString, however, this mistake was actually harmless
since it would just cause an extra loop that does nothing, then the
check would work properly with the variable fit equal to 0.
2008-06-27 11:09:02 +02:00
Dylan Smith 632015dc62 richedit: Set error codes and stop parsing for some rtf syntax errors.
Checks were added for hexadecimal values that did not have valid
characters, and for EOF received before the final closing brace of the
rich text stream.  The error values were tested on richedit versions 1,
2, 3 & 4.1, and they were all the same for these cases.
2008-06-27 11:08:33 +02:00
Alex Villacís Lasso 4047df0f56 richedit: Flip the big switch and encode actual CR and LF into end-of-paragraph runs.
Document remaining uses of bEmulateVersion10 and other checks for CRLF in editor.c.
Make RTF reader emit a \r or a \r\n according to emulation, not a \n, which breaks streaming tests.
Remove todo_wine from a bunch of riched32 tests that now succeed.
2008-04-29 14:55:15 +02:00
Eric Pouech 4a01ddca25 richedit: Allow reading an enhanced metafile from an RTF stream. 2008-03-17 14:38:57 +01:00
Eric Pouech 0c2c43d39b richedit: Correctly set the pitch and family for a font when reading an RTF stream. 2008-03-17 14:36:30 +01:00
Eric Pouech a64c22c8b1 richedit: Store shift-enter (keyboard) and \line (rtf) as end of row (and emit \line while saving in RTF). 2008-03-17 14:34:44 +01:00
Dmitry Timoshkov 5a6e0ea46f riched20: Remove a redundant parameter from trace. 2007-12-20 12:17:26 +01:00
Michael Stefaniuc 0a92e10640 riched20: Remove the RTFAlloc() wrapper around heap_alloc(). 2007-12-08 19:55:26 +01:00
Michael Stefaniuc 4210cafc04 riched20: Rename the wrappers around HeapAlloc() &Co to use the new standard naming. 2007-12-08 19:54:58 +01:00
Andrew Talbot da68f3943f riched20: Constify some variables. 2007-08-15 10:41:21 +02:00
Michael Stefaniuc 0152ec0375 janitorial: Remove superfluous casts of void pointers to other pointer types. 2007-06-27 12:53:50 +02:00
Matt Finnicum 306013d4e5 riched20: Remove excessive traces from reader.c. 2007-01-25 11:06:28 +01:00
Mike McCormack 5b670b68f2 riched20: Simplify an array size calculation. 2006-11-21 12:16:10 +01:00
Mike McCormack b5c031b160 riched20: Initialize and free the RTF lookup table in DllMain to avoid memory leaks. 2006-11-02 12:24:55 +01:00
Mike McCormack 14ec1d0c4c riched20: Use WARN() not ERR() on unknown tokens. 2006-11-02 12:24:33 +01:00
Mike McCormack 8939587b19 riched20: Create macro functions for allocating and freeing memory. 2006-10-24 11:44:53 +02:00
Andrew Talbot b038fa18ee riched20: Cast-qual warning fix. 2006-09-26 11:40:06 +02:00
Phil Krylov d360f1db51 riched20: Accept RTF group tokens inside colortbl destination. 2006-08-11 11:55:48 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Phil Krylov 08bf7180f3 riched20: Initial support for simple tables. 2006-02-04 17:01:01 +01:00
Mike McCormack 53858d61d0 riched20: Add newlines to ERR macro output. 2005-12-31 13:14:12 +01:00
Mike McCormack 74fe98a1f8 Convert all RTFPanic and RTFMsg calls to ERR calls. 2005-11-02 10:55:45 +00:00
Krzysztof Foltman e098edcdcb - Remove another potential sources of infinite loops caused by EOF in
the middle of the font and color tables.
- Closing brace on text level is treated as EOF (effectively
  protecting the control from trash after the end of RTF).
- Removed misleading comment about incomplete buffers (I was
  definitely wrong).
2005-10-03 18:45:39 +00:00
Krzysztof Foltman 4f60ac2ace - Optional destinations in stylesheets are now skipped properly (and
not treated as the "proper" styles as they were before).
- EOF condition in the middle of the stylesheet is no longer putting
  the reader into infinite loop,
- Half-full input buffers don't trigger EOF anymore (although it
  could, in theory, break some apps, I find it unlikely - and the
  change makes Out from Boneville installer display license properly).
2005-09-26 09:53:49 +00:00
Marcus Meissner bd7ec9aca5 The last argument to MultiByteToWideChar is wide character count and
not the buffer size in bytes. Fixed all places where it was wrong.
2005-09-12 22:07:53 +00:00
Phil Krylov eee54d95ad Fixed a RichEdit RTF reader bug which resulted in loss of text.
Eliminated unneeded recursion in ME_InsertTextFromCursor().
2005-08-23 18:16:15 +00:00
Phil Krylov 0789483dfc Automatically set default font after parsing a font table in RichEdit
RTF reader.
2005-08-22 14:08:04 +00:00
Phil Krylov 4c9f013f8b Added handling of deff RTF control word. 2005-08-22 10:06:08 +00:00
Phil Krylov bd10348ec9 Fixed UTF-8 RTF parsing. 2005-08-08 11:05:36 +00:00
Phil Krylov 1e9c200f61 Make RTF reader fall back to simple text if a correct RTF header is
not detected. This should fix some installers.
2005-04-13 11:11:03 +00:00
Phil Krylov 0fdbec319b Made RTF reader and writer handle codepages mostly similar to the
original riched20.dll.
2005-03-22 16:41:36 +00:00
Mike McCormack 3a0f930ab4 Remove casts and unused code. 2005-03-21 11:24:38 +00:00
Phil Krylov 297cd99ca3 Fixed support for RTF documents using ANSI charset and added support
for multibyte charsets, so that BIG5 and UTF-8 RTF documents are
working now.
2005-03-18 10:24:51 +00:00
Phil Krylov 0284930129 Replaced slow and outdated character set handling in RTF reader by
Unicode/codepages support. Added charset->codepage conversion.
2005-03-17 13:57:27 +00:00
Krzysztof Foltman f089de1f4d - RTF reader doesn't use RichEdit messages anymore (which saves on
unnecessary repaints)
- added unicode character support to RTF import (like: \u12345 ?)
- small fixes
- fixed whitespace identification bug
- removed drawing of paragraph marks
- improved stub implementations for IRichEditOle
2005-03-17 10:23:40 +00:00
Krzysztof Foltman c4c11d2515 - Unknown destinations are now correctly skipped (so loading an RTF
file generated by, for example, OpenOffice doesn't produce lots of
  garbage anymore).
- Format stack for RTF groups (so that RTF reader can correctly read
  what RTF writer wrote :) )
2005-03-16 11:27:43 +00:00
Phil Krylov bf4dc2e152 Implemented hash table lookup for RTF keywords in RTF reader. 2005-03-15 19:31:44 +00:00
Phil Krylov e3d8bf9d70 Added "generator" RTF destination handling. 2005-03-14 21:40:48 +00:00
Krzysztof Foltman 898068f3ce - EM_STREAMIN can now deal with undo in a reasonable manner (no
multiple undo actions in one EM_STREAMIN).
- Related changes to undo code (umIgnore mode is now handled
  correctly).
- Numerous improvements in the RTF reader: it reads some character
  attributes now (you will have proper small print in license agreements
  now).
- Fixed a memory overwrite bug in conversion from CHARFORMAT2A to
  CHARFORMAT2W.
2005-03-11 10:24:56 +00:00
Krzysztof Foltman 5c01752254 - Single quotes are now handled properly (previously they were
inserted as [[']]).
- Better handling of callback function's results.
2005-03-08 19:01:25 +00:00
Mike McCormack 38f932c823 Port the RTF parser to the richedit 2.0 control. 2005-03-07 17:15:33 +00:00