Commit Graph

1559 Commits

Author SHA1 Message Date
Huw Davies dd134546f4 riched20: Remove the caret at end hack.
The end of one run already has a different cursor
to the beginning of the next run.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02:00
Huw Davies c8862864fe riched20: Use run and para ptrs in the cursor move lines function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02:00
Huw Davies 2c2020ddb5 riched20: Use cell ptrs in the table position to offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02:00
Huw Davies 2809ac2b78 riched20: Use cell ptrs in the wrapping functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02:00
Huw Davies ff23a6d792 riched20: Use cell and para ptrs in the table border drawing function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02:00
Huw Davies 6488613a3a riched20: Simplify some of the drawing code using a few helpers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Huw Davies b2c812e3a3 riched20: Use cell ptrs in the rtf writing code.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Huw Davies 431ee50875 riched20: Use cell ptrs in the rtf parsing code.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Huw Davies 670dadf719 riched20: Return paragraph ptrs from the remaining table insert functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:02 +02:00
Huw Davies caa1d4a480 riched20: Return a para ptr from the insert start table row functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:02 +02:00
Huw Davies 103cd9f2f2 riched20: Return a paragraph ptr from the table insert helper.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:07 +02:00
Huw Davies f0783863f9 riched20: Pass and return paragraph ptrs in the table append row function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:06 +02:00
Huw Davies 75433bc39b riched20: Pass a cursor ptr to the insert style retrieval function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:04 +02:00
Huw Davies e69bb46c06 riched20: Remove a redundant condition.
If the cursor offset is zero, then it is by definition
at the beginning of a run.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:01 +02:00
Huw Davies 887d7e686d riched20: Use the paragraph and run helpers in the delete text function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:07:59 +02:00
Huw Davies 218225548a riched20: Don't split the paragraph at the first \intbl.
The whole of the current paragraph should be included
in the table.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Huw Davies 2b817872cb riched20: Start re-wrap loop at the beginning of any table.
This ensures that cell heights of cells before the first marked
cell are correctly adjusted.

Fixes last part of a regression caused by commit
195f84cfa1

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Huw Davies 9098d5b300 riched20: Update both co-ords during layout.
This partially fixes a regression caused by
commit 195f84cfa1

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Huw Davies 4a30e0601e riched20: Pass paragraph ptrs to the paragraph property writers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Huw Davies 0033253777 riched20: Pass run ptrs to the font and colour table writer function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Huw Davies db6c554909 richedit: Use the correct ptr to the cell.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:47 +02:00
Huw Davies 53959eb7d4 riched20: Use helpers in the cursor to start/end functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:45 +02:00
Huw Davies 87c4d217ed riched20: Pass a run ptr to the run drawing function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:44 +02:00
Huw Davies 7875a77b23 riched20: Pass a paragraph ptr to a couple of the drawing helpers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:42 +02:00
Huw Davies 00824a032f riched20: Pass a paragraph ptr to the paragraph destruction function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:40 +02:00
Huw Davies 434feab6a2 riched20: Pass and return a paragraph ptr in the paragraph joining function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:53 +02:00
Huw Davies f758d1effd riched20: Pass a run ptr to, and return a para ptr from, the para splitting function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:50 +02:00
Huw Davies d3fb8b29c1 riched20: Use paragraph and run ptrs in the paragraph splitting function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:47 +02:00
Huw Davies 9b3a538c35 riched20: Return a paragraph ptr from the paragraph creation function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:45 +02:00
Huw Davies 77f1894f21 riched20: Pass a paragraph ptr to the table update flags function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:42 +02:00
Damjan Jovanovic aa1ef09fef riched20: Implement ITextRange/ITextSelection Copy and Cut.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:40 +02:00
Huw Davies a9a2a68be9 riched20: Use a run ptr in GetXForArrow().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:37 +02:00
Huw Davies fe0a7a78db riched20: Remove InternalInsertTextFromCursor().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:35 +02:00
Huw Davies 120ee0de1b riched20: Simplify the char offset from run offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:33 +02:00
Huw Davies 57c2580a73 riched20: Simplify the cursor from char offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:30 +02:00
Huw Davies 1994d21ddb riched20: Use run ptrs in GetCharFormat().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:28 +02:00
Huw Davies 579618c0d7 riched20: Return a run ptr from the run insert function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:32:03 +02:00
Huw Davies 1797d2124a riched20: Use run ptrs in SetCharFormat().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:59 +02:00
Huw Davies bfac43798b riched20: Don't return the diTextStart paragraph from para_prev().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:56 +02:00
Huw Davies 02f4a178ff riched20: Don't mark the diTextStart paragraph as requiring repainting.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:52 +02:00
Huw Davies 0b01b40a7c riched20: Return a run ptr from the run splitting function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:49 +02:00
Huw Davies a37147c083 riched20: Return a run ptr from the run creation function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:37 +02:00
Huw Davies 3cade70f14 riched20: Pass a run ptr to the run joining function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:35 +02:00
Huw Davies 4366c81f49 riched20: Use paragraph ptrs in FindPixelPos().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:33 +02:00
Huw Davies 586e31a1e6 riched20: Use the run and para helpers in the cursor movement functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:31 +02:00
Huw Davies 468609ae7b riched20: Use paragraph and run ptrs in InsertTextFromCursor().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:29 +02:00
Huw Davies a6d41a0391 riched20: Use ME_Paragraph ptrs in InternalDeleteText().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:34 +02:00
Huw Davies f648eff162 riched20: Use ME_Paragraph and ME_Run ptrs in GetCursorCoordinates().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:32 +02:00
Huw Davies bb50c5a845 riched20: Use the table_row_start/end() helpers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:30 +02:00
Huw Davies 88cfc04be0 riched20: Use ME_Paragraph ptrs for the update range.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:28 +02:00
Huw Davies efa45652a9 riched20: Use a structure to hold the repaint range.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:26 +02:00
Huw Davies 1bda5913fc riched20: Use ME_Paragraph ptrs in a few of the table functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Huw Davies c3e6cb5b70 riched20: Don't create a display context in InvalidateParagraphRange().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Huw Davies b466eefbdf riched20: Move the marked paragraph list to a rbtree.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Huw Davies 3a1aaf2655 riched20: Use ME_Paragraph ptrs to iterate in WrapMarkedParagraphs().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Huw Davies 02cf14cf43 riched20: Pass a ME_Paragraph ptr to the marking functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Huw Davies 749c80bdaf riched20: Pass a ME_Paragraph ptr to shape_para().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 19:45:35 +02:00
Huw Davies 7ef2c6c8d5 riched20: Pass a ME_Paragraph ptr to itemize_para().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 19:45:35 +02:00
Huw Davies 1500cfe8fa riched20: Pass a ME_Paragraph ptr to WrapTextParagraph().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 19:45:35 +02:00
Huw Davies 94e34fa8ee riched20: Store a ME_Paragraph ptr in the wrap context.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 19:45:35 +02:00
Huw Davies 7291506667 riched20: Move several of the wrapping functions to use ME_Run directly.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 19:45:35 +02:00
Huw Davies 14044d93fd riched20: Simplify SplitByBacktracking().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-07 18:40:09 +02:00
Huw Davies 5dc422d4e5 riched20: Simplify FindPixelPos().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-07 18:40:07 +02:00
Damjan Jovanovic 7a347c20dc riched20: Implement ITextRange::StartOf() and ITextRange::EndOf() for tomCharacter.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:58 +02:00
Damjan Jovanovic 55d4cf27af riched20: Implement ITextRange::Move() for tomCharacter.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:56 +02:00
Damjan Jovanovic 41915acaed riched20: Implement ITextRange::MoveStart() and ITextRange::MoveEnd() for tomCharacter.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:53 +02:00
Alexandre Julliard 0c5ebf4231 riched20: Fix potentially uninitialized variable compiler warnings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 14:59:30 +02:00
Jacek Caban 9763f5189f riched20: Include wine/asm.h in editstr.h.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49068
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Jacek Caban 650aebadb7 riched20: Use __ASM_USE_THISCALL_WRAPPER macro.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:51:05 +02:00
Jacek Caban 270599cc81 riched20/tests: Don't use thiscall wrappers on clang MSVC target.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:50:59 +02:00
Gijs Vermeulen 55ca155ab8 riched20: Turn FIXME into a TRACE for ITextRange::SetRange.
It was implemented in fec6920638.

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 17:06:21 +02:00
Serge Gautherie 7770e26f2d include: Remove now useless forced _WIN32_IE defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:38:38 +01:00
Mathew Hodson 3808b61967 riched20/tests: Fix function names in two ok() messages.
Signed-off-by: Mathew Hodson <mathew.hodson@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:13 +01:00
Huw Davies ebe31c7919 riched20: Don't calculate the para numbering data if numbering is disabled.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:12:35 +02:00
Huw Davies cfeb4358b5 riched20: Use PatBlt() instead of FillRect() to paint the background area.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:12:22 +02:00
Huw Davies 6f1cc1f3b5 riched20: Allow the style to remain selected in the context.
This avoids swapping out the font if the next run uses the same style.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:12:05 +02:00
Huw Davies da9bc7cd95 riched20: Move release_font_cache() further up the file.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:11:54 +02:00
Huw Davies b9e1ed0668 riched20: Only invalidate the selection if it's not hidden.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:11:46 +02:00
Huw Davies 5419a9804a riched20: Clearly separate the selection setting functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:11:38 +02:00
Huw Davies 04040d0aca riched20: Don't force an update when styles are changed.
The appropriate region has already been invalidated and will be
repainted in due course.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-15 20:17:17 +02:00
Huw Davies 03a93eb80e riched20: Move handling of EM_SETCHARFORMAT to a helper function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-15 20:17:14 +02:00
Alexandre Julliard a6d57b0add riched20: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:22:47 +02:00
Jactry Zeng fec6920638 riched20: Implement ITextRange::SetRange.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-28 12:06:46 +02:00
Alexandre Julliard 0a79eb3608 include: Use the __thiscall attribute directly for the Mingw build.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 19:00:10 +02:00
Alexandre Julliard f3e45c37a2 riched20: Declare thiscall functions as __thiscall.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 20:11:19 +02:00
Alexandre Julliard ee4db2005e include: Define thiscall assembly wrappers globally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 20:11:19 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Gijs Vermeulen 840af642db riched20: Handle tomEnd in ITextRange::ScrollIntoView.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46899
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-15 21:33:07 +02:00
Sergio Gómez Del Real 5868c664c1 riched20: Handle efficiently caret creation/destruction.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:35:34 +02:00
Thomas Faber b64511c00a riched20: Implement MSVC asm wrappers.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:09:45 +01:00
Jactry Zeng 74b17a353a riched20: Handle REO_IOB_SELECTION in IRichEditOle::GetObject().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:54:01 +01:00
Michael Stefaniuc 350123e183 riched20/tests: Avoid using the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 09:37:31 +01:00
Sven Baars d917f0ef09 riched20: Fix IRichEditOle COM aggregation (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Sergio Gómez Del Real 4f007da8d3 riched20: Mask out extended flags introduced by CHARFORMAT2 when converting to CHARFORMAT.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Sven Baars 9d79aa686b riched20/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-17 10:45:58 +01:00
Zhiyi Zhang 62d80cff69 riched20: Fix a use after free.
In ME_DestroyEditor(), the item list is being freed when
calling get_total_width() in destroy_para().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46328
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-02 12:28:07 +01:00
Andrey Gusev ec2c2f9fa0 riched20: Remove redundant comparison.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-13 22:37:46 +01:00
Fabian Maurer 52c106418c riched32: Handle enter press in WM_CHAR instead of WM_KEYDOWN.
This fixes an old regression when VK_RETURN handling was implemented

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=23282
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:10:13 +01:00
Fabian Maurer c03c5397a2 riched20/tests: Refactor tests testing VK_RETURN.
This is basically a no-op to make the tests and the following
additions simpler

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:10:11 +01:00
Fabian Maurer 4d72bde62f riched20: Extract handling of VK_RETURN into a method.
This is basically a no-op to make the following fix simpler

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:09:52 +01:00
Alex Henrie 55a3dfe35e riched20: Turn several constants and variables into static constants.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:49:03 +01:00
Sergio Gómez Del Real 14984a169a riched20: ME_CheckCharOffsets() calls should only be done when tracing.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real a60965a156 riched20: Cache number of rows in editor.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real 195f84cfa1 riched20: Implement list of marked paragraphs.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real 618f0a8b2a riched20: Guard paragraph wrapping against special case where type is diTextStart.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real ad58875642 riched20: Add helper function to mark paragraphs for rewrapping.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real 70a2fe5886 riched20: Move y-adjust to its own function.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real 3c0b519bba riched20: Add get_total_width() to get widest paragraph number.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real 118908d0af riched20: Add destroy_para() helper.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Andrey Gusev 00d232fff4 riched20/tests: Fix typos in ok() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 15:55:36 +01:00
Fabian Maurer 4600169fd4 riched20: Properly handle \0 inside rtf input.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43630
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-09 21:08:09 +01:00
Jactry Zeng e20142aea6 riched20: Add stub for ITextDocument2Old interface.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 11:05:20 +02:00
Alex Henrie e11c3ddd59 riched20: Avoid using GCC's typeof extension.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-27 11:04:01 +02:00
Michael Stefaniuc 90aea35b9e riched20: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 11:12:08 +02:00
Jactry Zeng 563bfdfc18 riched20: Handle NULL in ITextServices::{TxGetHScroll, TxGetVScroll}.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43488
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-07 13:03:24 +02:00
Jactry Zeng 13e523297e riched20: Call ITextHost_TxGetCharFormat() for setting default charformat.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-20 17:27:22 +02:00
Jactry Zeng 0120e35a7d riched20: Initialize style_list before ME_MakeFirstParagraph().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-20 17:27:20 +02:00
Jactry Zeng 8d506cb216 riched20: Some cleanup for CHARFORMAT convertor functions.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:44 +02:00
Jactry Zeng 6e264bbd1d riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:44 +02:00
Michael Stefaniuc f002aec139 riched20: Avoid an ARRAY_SIZE-like macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-10 10:36:49 +02:00
Michael Stefaniuc ecd16fed38 riched20/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-19 20:49:59 +02:00
Jactry Zeng 42b325b855 riched20/tests: Free retext after use.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-23 17:32:51 +02:00
Jactry Zeng 5c2522d713 riched20: Use ME_GetSelectionType() in ME_ShowContextMenu() for getting type of selection.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-19 12:51:21 +02:00
Jactry Zeng 915201a13f riched20: Implement EM_SELECTIONTYPE.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-19 12:51:21 +02:00
Jactry Zeng c964674e82 riched20/tests: Add tests for IRichEditOle::{GetObject,GetObjectCount}.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 10:20:42 +02:00
Jactry Zeng 7409454345 riched20: Implement IRichEditOle::GetObject.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 10:20:36 +02:00
Jactry Zeng 2ab2c51df3 riched20: Implement IRichEditOle::GetObjectCount.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 10:20:29 +02:00
Jactry Zeng 0154b59c7e riched20: Save reobj in linked list.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 10:20:13 +02:00
Jactry Zeng ea7186348f riched20: Check para before use in ME_PrevRun.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 10:20:05 +02:00
Jactry Zeng 5e81e917a1 riched20: Get ITextRange interface from QueryInterface instead of casting.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 18:22:36 +02:00
Jactry Zeng 125fbf7b2f riched20: Implement {ITextRange,ITextSelection}::MoveEnd.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 18:22:36 +02:00
Jactry Zeng ad5da1462f riched20/tests: Add helpers for simplifying tests of ITextRange and ITextSelection.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 18:22:36 +02:00
Huw Davies ec2bcdf279 riched20: Underline links.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 16:55:08 +01:00
Huw Davies 08c15246ca riched20: Return the underline pen as the return value.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 16:55:08 +01:00
Huw Davies ff8fba389d riched20: Don't use logfont-style underlining for links.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 16:55:08 +01:00
Michael Stefaniuc c03b41c896 riched20: Get rid of the ALLOC_N_OBJ macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:08:42 +01:00
Michael Stefaniuc 965dc38175 riched20: Get rid of the ALLOC_OBJ macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:08:40 +01:00
Michael Stefaniuc 7153b5593e riched20: Get rid of the FREE_OBJ() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:08:38 +01:00
Michael Stefaniuc f9016830a6 riched20: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:08:36 +01:00
Rafał Harabień 585dfa1409 riched20: Protect against pasting multi-line text in single-line control.
Signed-off-by: Rafał Harabień <rafalh1992@o2.pl>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 20:20:13 +01:00
Rafał Harabień 55412553e8 riched20: Protect read-only Richedit against pasting and cutting data.
Signed-off-by: Rafał Harabień <rafalh1992@o2.pl>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-07 18:13:12 +01:00
Alexandre Julliard 70eef947a1 riched20: Specify cursor hotspots separately for each size.
This is supported in icoutils as of version 0.32.0.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-17 16:23:18 +02:00
Fabian Maurer 6d62904497 riched20: In ME_ProtectPartialTableDeletion properly set out parameter (cppcheck).
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-04 10:44:00 +02:00
Huw Davies 7020f47e0d riched20: Don't scale the picture size with dpi.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-14 17:32:56 +02:00
Huw Davies e534582555 riched20: Don't special case the non-stretching case.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-14 17:32:54 +02:00
Huw Davies 9249f7c4e7 riched20: Correctly release the STGMEDIUM.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-14 17:32:51 +02:00
Huw Davies 3cc1ef6bca riched20: Remove an unused parameter.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-14 17:32:49 +02:00
Huw Davies 58cac9c633 riched20: Remove the separate implementation of IOleWindow as IOleInPlaceSite inherits from IOleWindow.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 16:58:27 +02:00
Huw Davies adf53a9cdb riched20: Add support for pasting EMFs.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:21 +09:00
Huw Davies bbf34a4ab1 riched20: Use the implementation of EM_PASTESPECIAL for EM_CANPASTE.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:17 +09:00
Huw Davies 46fef3daa1 riched20: Use the implementation of EM_PASTESPECIAL for WM_PASTE.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:08 +09:00
Huw Davies 9bec53fbad riched20: Add support for EM_PASTESPECIAL.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:04 +09:00
Huw Davies 417c80d6fe riched20: Don't create a special richedit ole instance for the RTF parser.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:59 +09:00
Huw Davies 1bc48be4a7 riched20: Initialize ME_TextEditor members in ME_MakeEditor().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:52 +09:00
Huw Davies 5cc8c9fe83 riched20: Retrieve the default paragraph alignment from the text host.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:48 +09:00
Huw Davies 4cb7578d0b riched20: Move the editor initialization out of CreateTextHost().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:40 +09:00
Alexandre Julliard 2d91663f7a riched20: New high resolution cursor generated from SVG.
Based on a cursor set published by Ludvig Hummel under the X11 license.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-14 13:30:21 +02:00
Huw Davies 17b7cde00e riched20: The background colour is set using \highlight.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:48:47 +02:00
Huw Davies d4b1938cfb riched20: Only write out non-default pattern colours.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 13:58:13 +02:00
Huw Davies 5f3772a730 riched20: Don't compare the colours if the old and new states are both auto.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 16:40:37 +02:00
Huw Davies 6bcf4d6037 riched20: Add linefeeds after the colortbl and generator groups.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-03 13:23:18 +01:00
Huw Davies 8b79854d70 riched20: Remove a hack that should be longer be needed.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-03 13:23:10 +01:00
Huw Davies 3d291dd7ee riched20: Write the char format for the end-of-paragraph marker.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-03 13:23:04 +01:00
Hans Leidekker 5ac4766476 riched20/tests: Add a test to show that empty paragraphs get a font size declaration.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-02 22:01:53 +01:00
Nikolay Sivov 440b92131f riched20: Return proper interface pointers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-09 16:07:26 +01:00
Francois Gouget e63cea5dfc riched20: A spelling fix in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-10 19:19:15 +01:00
Fabian Maurer 9f37f6afb4 riched20: Check for NULL in fnTextSrv_TxSetText and add test.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-09 20:49:11 +01:00
Marcus Meissner c1a8fbbb77 riched20: Swap check for NULL ptr and first usage (Coverity).
Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-19 08:16:55 -07:00
Huw Davies 6e97ddc930 riched20: Remove unnecessary spaces before carriage returns.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-14 14:28:22 +02:00
Huw Davies a25c6f64b5 riched20: Remove the question marks from the generator string.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-14 14:28:22 +02:00
Huw Davies ee68e100b4 riched20: Simplify call to ME_StreamOutRTFParaProps().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-14 14:28:21 +02:00
Huw Davies 452c9a7124 riched20: Incrementally update the character format.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-14 14:28:21 +02:00
Huw Davies aa57db38dd riched20: Fix the interaction between CFE_UNDERLINE and bUnderlineType.
The effect specifies whether underlining is turned on, while bUnderlineType
indicates the type of underlining.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-14 14:28:21 +02:00
Huw Davies 3ac78b763b riched20: Initialize the remaining CHARFORMAT2 members.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-14 14:28:21 +02:00
Huw Davies f1ef14e023 include: Add a padding WORD to ensure that wWeight is at the correct offset.
This is a bug in MS's C version of these structures.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-13 18:11:24 +02:00
Huw Davies 9bce3e6113 riched20/tests: Add a test to show the insert style is cleared if the selection changes.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-13 18:11:18 +02:00
Huw Davies 9d248938ed riched20: Draw the paragraph numbering text in the correct colour.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-12 16:57:02 +02:00
Huw Davies c69e60efbc riched20: Emit RTF for paragraph numbering.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-12 16:57:00 +02:00
Huw Davies 3e9a31ed26 riched20: Add a helper to find a colour in the colour table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-12 16:56:57 +02:00
Huw Davies 48c0c6648b riched20: Add a helper to find a font in the font table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-12 16:56:55 +02:00
Huw Davies 074fafab65 riched20: Add any paragraph numbering fonts to the font table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-12 16:56:51 +02:00
Huw Davies a06dcd46bb riched20: Move the check for cell border colours into the same loop as the other colours.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:59:32 +02:00
Huw Davies b8e55779fe riched20: Add a helper to add a colour to the colour table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:59:31 +02:00
Huw Davies 6ee979c7e6 riched20: Add a helper to add a font to the font table.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:59:31 +02:00
Huw Davies 1e1ee175f0 riched20: Don't emit default values.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:59:31 +02:00
Huw Davies 8739f450ce riched20: Don't emit paragraph props if they're the same as the previous paragraph's.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:59:31 +02:00
Huw Davies 2019ec38db riched20: The new eop style when typing a list is a copy of the existing eop style.
Normally the new eop style is the insert style, however in a list the existing eop
style is used.  This prevents the list label style from changing when the new eop
is inserted.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:59:31 +02:00
Huw Davies 0df058d847 riched20: Add support for roman numeral labelled lists.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-10 21:11:09 +02:00
Huw Davies 9265a91513 riched20: Add support for letter labelled lists.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-10 21:11:06 +02:00
Huw Davies db783986dc riched20: Add support for arabic number labelled lists.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-10 21:11:03 +02:00
Huw Davies 123b0c699a riched20: Update the paragraph numbering style if the end-of-paragraph style changes.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:15 +02:00
Huw Davies 8a428d52a7 riched20: Add support for displaying bulleted lists.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:13 +02:00
Huw Davies d132009ae9 riched20: Maintain a ptr to the end-of-paragraph run.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:11 +02:00
Huw Davies 1abe4cc738 riched20: Add the ability to create ME_Strings from constants.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:09 +02:00
Huw Davies 880b45ffb0 riched20: Implement parsing of the paragraph numbering destination.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:06 +02:00
Huw Davies 57446ceed3 riched20: Reset the numbering style info after a \pard .
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:02 +02:00
Huw Davies ab65c269f7 riched20: Don't try to wrap the end-of-paragraph run.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:11:58 +02:00
Huw Davies beffb6f671 riched20: Remove an unnecessary call to ME_SaveTempStyle().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:46:53 +02:00
Huw Davies e1f943863b riched20: Set the format of the final eop to be that of the last char.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:46:53 +02:00
Huw Davies 2dbcddc660 riched20: Set a temporary insert style for the new paragraph.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:43:43 +02:00