- 24 Oct, 2011 1 commit
-
-
Thomas Faber authored
-
- 01 Aug, 2011 1 commit
-
-
Andrew Talbot authored
-
- 30 Jul, 2010 2 commits
-
-
Dylan Smith authored
ME_SplitRun is only called by wrapping code. In all but one call the returned second half of the split run will be returned, get passed back to ME_WrapHandleRun, then ME_CalcRunExtent will be called at the start of ME_WrapHandleRun through ME_WrapSizeRun.
-
Dylan Smith authored
The paragraph needed to be included in the parameters to avoid needing traverse the linked list of display items to find the paragraph.
-
- 25 Jan, 2010 1 commit
-
-
Dylan Smith authored
NULL may be returned by ITextHost::TxGetDC. Caught by valgrind.
-
- 13 Aug, 2009 2 commits
-
-
Dylan Smith authored
The function was used in one place, and was simply a wrapper around a call to ME_InsertRunAtCursor, so I removed it to avoids it use in other parts of the code.
-
Dylan Smith authored
Missed an assignment for end_run when the end cursor is provided and the end position doesn't cause a split.
-
- 12 Aug, 2009 3 commits
-
-
Dylan Smith authored
The test that succeeded from this change was as a result of allowing the end of the character format change be specified using NULL as the rest of the text. Before, the end paragraph run at the end of the text was not being set for this case, when all the text was supposed to have its character format changed.
-
Dylan Smith authored
Prevent extra conversions from character offset to ME_Cursor.
-
Dylan Smith authored
Previously the only convenient way to get the start and end of the selection was through offsets, which eventually need to get converted back into items in the linked list storing the text. The new function will help with eliminating these inefficiencies.
-
- 26 May, 2009 1 commit
-
-
Francois Gouget authored
-
- 10 Feb, 2009 1 commit
-
-
Dylan Smith authored
This prevents some needless searching for the start of the paragraph from a run stored in a cursor. Usually a pointer to the paragraph is already available when the cursor is set anyway.
-
- 09 Feb, 2009 4 commits
-
-
Dylan Smith authored
These functions were just being used for addition, so it was simpler to remove the functions and modify the places it was used. The ME_StrRelPos2 and ME_PosToVPos were just simple wrappers around ME_StrRelPos, and ME_PosToVPos wasn't being used.
-
Dylan Smith authored
These two functions were being used for simple operations, to get the first or last character when pre-computing flags for splitting runs. The call to ME_GetCharBack wasn't even giving the correct result, it would always return -1 since it is being called with nPos of 0. This patch simplifies the code by removing the functions and getting the characters directly from the string.
-
Dylan Smith authored
These functions were probably previously needed because of some wierd special handling of backspace characters, but currently there is no reason why the nLen field can't be accessed directly. Having to functions that just access the string length field just causes slightly more effort for someone to look at the code, because they need to enter the function to find out what it actually is doing.
-
Dylan Smith authored
The function was just returning the second parameter. It had some commented out code that indicated that previously backslashes weren't included in the length. Native wordpad doesn't handle backspaces in a special way, so this must have been an internal representation that complicated finding the position of characters.
-
- 06 Feb, 2009 3 commits
-
-
Dylan Smith authored
Rather than get the paragraph from the run, the function allows the caller to provide the paragraph, since it is already available. This reduces unnecessary traversals of lists that take longer as more runs and rows are in the paragraph.
-
Dylan Smith authored
The ME_RunOfsFromCharOfs function finds the paragraph before finding the run and offset within the run, so the function may as well be able to return this paragraph to the caller. Many callers to the function instead find the paragraph from the run, which ends up unnecessarily traversing a linked list of runs within the paragraph.
-
Dylan Smith authored
Whenever ME_InitContext is called, ME_DestroyContext should be used to clean it up. This way the context can be extended easily by modifying those two functions. Instead, these two places of code just released the DC, without using ME_DestroyContext, so the created brush for the margin was not deleted.
-
- 28 Jan, 2009 1 commit
-
-
Dylan Smith authored
Previously a count of the carraige returns and line feeds were stored for end of paragraph runs, and a paragraph sign was stored as the actual string. This was causing many special cases where the length of the run needed to be determined differently if the run was or wasn't an end of paragraph run. There wasn't any use for storing the paragraph sign unless some drawing code gets commented out to allow the end paragraphs to be shown, therefore I changed the code to store the actual string that gets retrieved by WM_GETTEXT.
-
- 27 Jan, 2009 1 commit
-
-
Dylan Smith authored
The two functions ME_FindItemAtOffset and ME_RunOfsFromCharOfs were almost identically used, since ME_FindItemAtOffset was always used to find a run. The only difference was how they returned the offset within the run for an end of paragraph run. For ME_FindItemAtOffset it would return the next run if it was in between \r and \n. ME_RunOfsFromCharOfs would instead return an nOffset of 0 for end paragraph runs. This subtle difference introduced bugs, so I decided to avoid having special case in this function when creating this patch, and instead let the caller handle this case.
-
- 21 Jan, 2009 1 commit
-
-
Dylan Smith authored
The methods in ITextHost are mostly thin wrappers around functions that take a handle to a window as their first parameter. This patch just uses the wrapper functions provided by ITextHost instead of using the functions that require a handle to a window that the editor might now have (for windowless richedit controls).
-
- 18 Dec, 2008 1 commit
-
-
Dylan Smith authored
The formatting rectangle is set with EM_SETRECT, and retrieved with EM_GETRECT, so it corresponds to rcFormat in the code. This defines the area that the richedit control should draw the text so that it is offset by the top-left corner of the formatting rectangle, and clipped so that it doesn't draw past the bottom or right hand side. Thus this is important for implementing windowless richedit controls to not interfere with the rest of the window.
-
- 26 Nov, 2008 1 commit
-
-
Francois Gouget authored
-
- 17 Nov, 2008 1 commit
-
-
Dylan Smith authored
-
- 18 Aug, 2008 2 commits
-
-
Dylan Smith authored
-
Dylan Smith authored
-
- 05 Aug, 2008 1 commit
-
-
Dylan Smith authored
-
- 14 Jul, 2008 1 commit
-
-
Dylan Smith authored
This also reverts commit 2b52dd84: 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.
-
- 30 Jun, 2008 1 commit
-
-
Dylan Smith authored
-
- 26 Jun, 2008 1 commit
-
-
Dylan Smith authored
-
- 25 Jun, 2008 1 commit
-
-
Dylan Smith authored
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.
-
- 19 Jun, 2008 1 commit
-
-
Alex Villacís Lasso authored
Remove workaround put in place by a previous patch, due to buggy flag reporting. Tests to verify fixed behavior.
-
- 29 Apr, 2008 1 commit
-
-
Alex Villacís Lasso authored
Text streamout now honors CR and LF counters. Tests to pin down required EM_STREAMOUT behavior.
-
- 17 Mar, 2008 2 commits
-
-
Eric Pouech authored
-
Eric Pouech authored
richedit: Pass left margin around when computing the size of a run, so that a tab will get a correct size.
-
- 05 Feb, 2008 2 commits
-
-
Eric Pouech authored
-
Eric Pouech authored
-
- 07 Jan, 2008 1 commit
-
-
Eric Pouech authored
-
- 02 Jan, 2008 1 commit
-
-
Eric Pouech authored
Use a ME_Context for style selection/unselection. Store the (x,y) dpi information for a given DC in the corresponding ME_Context structure.
-