Commit Graph

518 Commits

Author SHA1 Message Date
Dylan Smith bc61a637b9 richedit: Reversed deletion direction so tables are inserted forwards. 2008-08-18 14:34:10 +02:00
Dylan Smith d29f671d1a richedit: Protect deletion of cell boundaries when not deleting row. 2008-08-18 14:34:10 +02:00
Dylan Smith bf5ccefc4c richedit: Handle tab key properly within table cells.
Within table cells the tab key moves to the next cell in the table, or creates
a new table row when at the end of the table.
2008-08-18 14:34:10 +02:00
Dylan Smith 608c54ee69 richedit: Word/Line/Paragraph selection had selection anchor on wrong side.
After selection a word, line, or paragraph with multi click selection or using
the selection bar, then shift can be held and the arrows can be used to move
one of the ends of the selection.
2008-08-18 14:34:10 +02:00
Dylan Smith e568e15142 richedit: Removed assumption about the order of rtf indent control words.
Previously the calculations of dxStartIdent and dxOffset depended on
their order.
2008-08-18 14:34:10 +02:00
Dylan Smith 6a65f3b38e richedit: Fixed rtf reader bug that caused large start indents.
The problem was that the paragraph format was being retrieved,
slightly modified and then used to set the paragraph format, without
limiting the mask to what was being set.  The PFM_OFFSETINDENT mask flag
being valid meant that dxStartIndent specifies a relative offset, thus
dxStartIndent was doubled.
2008-08-18 14:34:10 +02:00
Dylan Smith 4e56a3cda9 richedit: Joined paragraph format depends on number of characters deleted. 2008-08-05 14:09:37 +02:00
Dylan Smith 11c8039699 richedit: Use tabstops to store cell positions. 2008-08-05 14:09:37 +02:00
Dylan Smith edb6304379 richedit: Added OleInitialize for clipboard operations. 2008-07-31 13:01:27 +02:00
Hongbo Ni 3cb685c861 riched32: Implement WM_UNICHAR support. 2008-07-29 14:09:23 +02:00
Dustin Brody 3a805d289e riched20: EM_SETTEXTTEX obeys ST_SELECTION with RTF inputs. 2008-07-29 12:50:35 +02:00
Alex Villacís Lasso acfb6ea210 richedit: Do not read actual scrollbar state for scrollbar update, use internal state instead. 2008-07-23 13:05:27 +02:00
Alex Villacís Lasso 9d39754e93 richedit: Tests for WM_SIZE/scrollbar recursion bug, with todo_wine.
This is a minimal model of what happens in Corman Lisp 3.0 -
subclassed window class that unconditionally calls ShowScrollBar() to
force scrollbar visibility.
2008-07-23 13:04:56 +02:00
Alex Villacís Lasso 47871f69a1 richedit: More tests for visibility behavior of richedit scrollbars, with todo_wine.
Alternate method of forcing (in)visibility of scrollbars, with SetWindowLongA().
2008-07-23 13:04:41 +02:00
Alex Villacís Lasso 86e9e0720c richedit: Tests for visibility behavior of richedit scrollbars, with todo_wine.
Some applications have never heard of ES_DISABLENOSCROLL and attempt
to force scrollbars to be always shown (with ShowScrollBar() or
similar) when otherwise richedit would hide them. If richedit attempts
to wrestle control back, a recursive loop of requests can result if
app overrides WM_SIZE behavior. Apparently native never reads the
scrollbar state, and operates from some sort of internal state, so
that scrollbars can be modified externally without native trying to
wrestle back control. This is confirmed by attached tests. An
exception: EM_SCROLL will restore visibility to a scrollbar that was
forcibly hidden.
2008-07-23 13:04:30 +02:00
Alex Villacís Lasso 43cf3b80af richedit: Shorten EM_AUTOURLDETECT tests.
EM_AUTOURLDETECT tests are taking too much time, so this patch tests
just one URL and one non-URL for all messages but WM_SETTEXT. Also,
remove one trace that spams the output needlessly.
2008-07-22 13:01:57 +02:00
Dylan Smith e86a1d623a richedit: Fixed regression that caused endless loop. 2008-07-18 11:32:38 +02:00
Eric Pouech 6ef6f7167d richedit: Add an assert to point out what we're expecting. 2008-07-17 10:53:41 +02:00
Dylan Smith 97d56caafe richedit: Fixed regression caused by destroying the caret.
The regression was caused by destroying the caret when it didn't need to
be shown in the richedit control, but this affected other controls.
2008-07-16 19:56:24 +02:00
Dylan Smith e3efa88c45 richedit: Cannot undo setting of default character format.
This also reverts commit 2b52dd845097f16076c0185b02a003f63898dcab:
wordpad: Empty the richedit undo buffer on creation.

The reverted commit I created to fix an issue that only applied to Wine,
but it just masked the issue which was in richedit controls.  The
default character format was set in two places while wordpad was
starting up, and caused wordpad to have two undo items at startup.
2008-07-14 12:22:44 +02:00
Dylan Smith 43ad427a15 richedit: Enforce the maximum font size.
Trying to set the font size to a value larger than 1638
in points (yHeightCharPtsMost) using EM_SETCHARFORMAT will cause it to be
set to actually set to the maximum.
2008-07-14 12:22:13 +02:00
Aurimas Fischer 88c25518d5 richedit: Spelling fixes. 2008-07-14 12:21:55 +02:00
Dylan Smith 0f14d65c70 richedit: Use system colour for highlighting after v2.0.
In version 1.0 of the richedit controls highlighting is done by
inverting the colours.  Version 2.0 and up highlight instead draw
the text using system colours for the background and the text.
2008-07-11 14:25:17 +02:00
Dylan Smith 9bcfa942a0 richedit: Prevented underlining the end of paragraph character. 2008-07-11 14:25:02 +02:00
Dylan Smith 5ec188d955 richedit: Tabs are now highlighted and underlined. 2008-07-11 14:24:51 +02:00
Dylan Smith db3991257f richedit: Handle overflow of only spaces on first line of paragraph.
The uncommon case that this patch handles is enough whitespace being
on the first line of a paragraph to cause it to wrap.  In this case the
first non-space character will be wrapped onto the next line.
2008-07-10 18:13:38 +02:00
Dylan Smith feda29bb0c richedit: Fixed position of runs in some situations during wrapping.
Runs that are skipped over still need to affect the wrapping position,
otherwise they won't affect further run positions.
2008-07-10 18:13:25 +02:00
Dylan Smith 49468e1824 richedit: Tabs cause lines to wrap but not end of paragraph run. 2008-07-10 18:13:13 +02:00
Dylan Smith e4007e9f97 richedit: Removed redundant wrapping code.
Lines in ME_WrapHandleRun were removed because ME_CalcRunExtent is
already called unconditionally just before it in the call to
ME_WrapSizeRun.
2008-07-10 18:12:48 +02:00
Francois Gouget dbaec0a101 Assorted spelling fixes. 2008-07-10 13:40:15 +02:00
Dylan Smith 7de6c2674a richedit: Added more conditional cursor changes.
Previously the cursor was either an IBEAM, or a reversed arrow when over
the selectionbar.
2008-07-10 12:16:58 +02:00
Dylan Smith d293b3fc98 richedit: Prevented cursor flicker while moving over selection bar.
When the cursor is moved over the selection bar, without holding any
mouse buttons down, the cursor would be repeatably set between the
normal cursor, set by DefWindowProc for the WM_SETCURSOR message, and
the reversed cursor, set by ME_MouseMove.
2008-07-10 12:16:39 +02:00
Dylan Smith 12bc51ca26 richedit: Fixed 2 minor paragraph format effect errors.
In ME_SetParaFormat the wEffects that were being set needed to be set
rather than the dwMask.
2008-07-09 11:31:22 +02:00
Dylan Smith 8172d69e8f richedit: Set the default paragraph format consistently.
I created a function to set the default paragraph format to ensure
consistency when this is done.  This initial paragraph format is also
now more consistent with native richedit controls.  The dwMask value
always appears to have the same value when retrieved from the native
richedit controls, so all the mask values are now initialized when the
PARAFORMAT2 structure is created.
2008-07-09 11:31:22 +02:00
Dylan Smith aba425eb70 richedit: PFE_TABLE flag is now used instead of private bTable value.
The PARAFORMAT structure has a bit in wEffects to indicate whether the
paragraph is a table or not, so this should be used instead of a private
bTable value, since this structure can be retrieved with EM_GETPARAFORMAT.
2008-07-09 11:31:21 +02:00
Dylan Smith eb4ed9cadf richedit: Removed unused variable bCaretShown in ME_TextEditor. 2008-07-08 21:08:53 +02:00
Michael Stefaniuc 0164bffd9a riched20: Fix typo. 2008-07-08 20:37:30 +02:00
Alexandre Julliard 79c64acc7b tests: Don't depend on the static uuid libraries in the tests.
This avoids trouble with the broken MingW libraries when
cross-compiling the tests.
2008-07-08 17:51:45 +02:00
Dylan Smith 762e5818d1 richedit: Hide cursor when text is selected.
The cursor should only be shown when there is no selection, since this
is how it is done in Windows.  This patch avoids showing the cursor when
there is a selection, and destroys the cursor when a selection is made.
2008-07-08 10:44:45 +02:00
Dylan Smith 69cf4e9ac4 richedit: Implemented triple click selection. 2008-07-08 10:44:32 +02:00
Dylan Smith 7c352b9638 richedit: Implemented paragraph selection. 2008-07-08 10:44:12 +02:00
Dylan Smith abefc28fe7 richedit: Fixed drag and shift selection for words and lines.
Previously word drag and shift selection was not implemented.  Line
drag selection was working, but shift selection wasn't.
2008-07-08 10:43:55 +02:00
Dylan Smith ebded1636b richedit: Fixed Valgrind error related to undoing.
The error was a memory access of a freed object.  In ME_AddUndoItem I
checked the top of the undo stack to end a coalescing undo transaction,
assuming that this should be either a valid undo item, or NULL, instead
it was already freed.
2008-07-07 14:16:07 +02:00
Dylan Smith 5b2bdc06d0 richedit: Fixed double click issues by sharing code with single click. 2008-07-07 14:16:07 +02:00
Dylan Smith 379835b634 richedit: Made sure word selection selects only one word. 2008-07-07 14:16:07 +02:00
Dylan Smith 2eec4f03ed richedit: Fixed the selection bar width. 2008-07-07 11:10:49 +02:00
Dylan Smith db95d69f99 richedit: Made sure the caret position is stored when moving up/down.
The caret's x position is stored in ME_TextEditor.nUDArrowX so that when
the caret is moved up or down, it will stay along the same horizontal
position, or at the end of a line.  Unfortunately, the value stored in
nUDArrowX was being unconditionally discarded in ME_ArrowKey, preventing
it from serving its purpose.
2008-07-07 11:10:33 +02:00
Dylan Smith 31a2d64fa4 richedit: Fixed simulated keyboard events on tests. 2008-07-03 13:07:45 +02:00
Dylan Smith 2a139746cc richedit: Added missing DestroyWindow in a test. 2008-07-01 13:47:03 +02:00
Juan Lang c40c08b3d3 richedit: Only send update events in 1.0 emulation mode if the event mask specifies it.
Fixes a crash in native cryptui.dll when viewing certificate properties.
2008-07-01 13:45:37 +02:00