Commit Graph

85 Commits

Author SHA1 Message Date
Juan Lang fb30d61c97 riched20: Use helper function rather than goto to return found position. 2008-09-11 11:45:23 +02:00
Dylan Smith 300db3765f richedit: Each cell can contain multiple paragraphs in msftedit. 2008-08-18 14:34:11 +02:00
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 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 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 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 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 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 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 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 66f948c010 richedit: Clicking below end of text now selects closest character.
Before the end of the text was selected when clicking below the end of
the text, rather than using the x position to find the appropriate
character on the last row that is closest to the pixel position.
2008-06-30 12:10:02 +02:00
Dylan Smith fad2b57cd7 richedit: Ensure caret is seen if moved past end of view over trailing spaces. 2008-06-27 11:09:37 +02:00
Dylan Smith 438d8e1c58 richedit: Caret size must match font size characters to be inserted.
When the caret is at the start of a run, it uses the font of the
previous run for inserting characters.  The caret size previously was
the wrong height for the characters being inserted when the caret was at
the start of a line, but not the start of a paragraph so this patch
fixes this bug.
2008-06-27 11:09:14 +02:00
Dylan Smith 461830a83d richedit: Removed redundant code for getting the insert style.
The function ME_GetInsertStyle already checks for the case where there
is a selection, so there is no need to duplicate this code for
ME_GetSelectionInsertStyle.
2008-06-27 11:08:19 +02:00
Dylan Smith 9b67a38f1a richedit: Make cursor visible when selecting via mouse above/below editor. 2008-06-26 21:18:28 +02:00
Dylan Smith eaf7becabd richedit: Null pointer check missing on optional parameter.
The function ME_FindRunInRow uses two parameters to return values by
reference, and treated these parameters as if they were optional except
for the start of the function which set *pbCaretAtEnd without checking
to see if was a NULL pointer.
2008-06-26 21:14:52 +02:00
Dylan Smith 6f9f01f28f richedit: bCaretAtEnd should not be reset from rewrapping text.
The bCaretAtEnd value in ME_TextEditor is used to identify that the
caret is at the end of a wrapped line instead of the start of the next
line in the paragraph since both these positions correspond to the
same position in the document. The bCaretAtEnd value was previously
being set back to FALSE whenever the window was resized.
2008-06-25 11:24:13 +02:00
Dylan Smith 308582b4f5 richedit: Allow cursor to move over trailing spaces in wrapped lines. 2008-06-25 11:23:39 +02:00
Alex Villacís Lasso c7873afbb2 richedit: Insertion style must NOT be cleared unless selection actually changed. 2008-06-19 12:10:13 +02:00
Alex Villacís Lasso 1fa39b50c0 richedit: Only notify selection change when selection has actually changed from previous notification.
Otherwise, redundant and early notifications are sent to apps that do not expect them. Fixes crash #1 with Perfect! TextEdit.
2008-04-29 14:56:11 +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
Alex Villacís Lasso e8aa9dee56 richedit: Modify ME_GetTextW() to honor CR and LF encodings.
ME_GetTextLengthEx should ignore GTL_USECRLF in 1.0 emulation mode.
2008-04-29 14:54:46 +02:00
Alex Villacís Lasso fd55773680 richedit: Remove reliance on bEmulateVersion10 for end-of-line handling in ME_InternalDeleteText. 2008-04-29 14:54:12 +02:00
Alex Villacís Lasso d47f66191e richedit: Add support for encoding number of CR and LF contained within a line break. 2008-04-29 14:53:46 +02:00
Alex Villacís Lasso 820de0bd59 riched32: Implement a portion of suggested interpretation of CRLF handling for richedit 1.0 emulation.
Fixes a few todos introduced by previous patch.
2008-04-21 20:27:52 +02:00
Eric Pouech 5d36c47e1f richedit: Fixed object leaks generated by context creation & destruction. 2008-03-17 14:37:58 +01:00
Eric Pouech a86d7bdcea richedit: Pass left margin around when computing the size of a run, so that a tab will get a correct size. 2008-03-17 14:36:06 +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
Eric Pouech 00de77517a riched20: Start handling OLE objects inside richedit. 2008-02-05 11:11:32 +01:00
Eric Pouech d48905cf21 richedit: Small optimisation in ME_GetSelectionInsertStyle. 2008-01-02 13:55:24 +01:00
Eric Pouech e9be142d78 richedit: Rewrote FindPixelPos so that it always return something.
Made the function static as well.
2008-01-02 13:55:14 +01:00
Maarten Lankhorst b81335501f riched20: Implement ECO/EM SELECTIONBAR. 2007-12-17 11:34:40 +01:00
Alex Villacís Lasso 3b636b58ba riched20: EM_GETTEXTLENGTHEX must not count last paragraph break if GTL_USECRLF. 2007-12-07 17:36:01 +01:00
Alex Villacís Lasso 469669e629 riched20: 2.0 and higher inserts CRCRLF as space (with tests). 2007-10-22 13:50:13 +02:00
Clinton Stimpson f34cb461e7 riched20: Only WM_CHAR respects text limit. 2007-09-21 12:05:39 +02:00
Lei Zhang 13ae5f8e8c riched20: Add missing scroll bar update. 2007-08-16 11:35:06 +02:00
Huw Davies 0dcebea44d riched20: Add some test for EM_GETTEXTLENGTHEX and fix the single line edit cases. 2007-08-16 11:10:25 +02:00
Andrew Talbot 2e2efd448a riched20: Constify some variables. 2007-08-13 12:24:28 +02:00
Huw Davies 94dfc0e80e riched20: Don't mess with the caret if we don't have focus. 2007-06-06 12:09:53 +02:00
Clinton Stimpson 552bc81f1e riched20: Set modify state when removing text. 2007-04-26 14:24:52 +02:00
Clinton Stimpson 4152c14df4 riched20: Fix text replacement with text limit. 2007-03-29 21:07:52 +02:00
Clinton Stimpson bf86302e19 riched20: Fix modification state for several operations. 2007-01-11 12:04:46 +01:00