[PATCH 7/7] riched20: Allow to return text with OLE object mark.
Huw Davies
huw at codeweavers.com
Mon May 24 04:43:37 CDT 2021
On Thu, May 20, 2021 at 03:56:15PM +0800, Jactry Zeng wrote:
> @@ -4247,7 +4247,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam,
> */
> int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen,
> const ME_Cursor *start, int srcChars, BOOL bCRLF,
> - BOOL bEOP)
> + BOOL bEOP, BOOL object)
> {
Let's combine the last three params into a DWORD flags.
> ME_Run *run, *next_run;
> const WCHAR *pStart = buffer;
> @@ -4275,6 +4275,11 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen,
> nLen = 2;
> str = L"\r\n";
> }
> + else if (object && run->nFlags & MERF_GRAPHICS)
> + {
> + srcChars--;
> + str = L"\xfffc";
> + }
I think it would be cleaner to do the opposite. So have
ME_InsertOLEFromCursor() insert a '\xfffc' and then return a space
here if we explicitly don't want it (and similarly invert the meaning
of the "object" flag so that it's set if we want to return a space).
Huw.
More information about the wine-devel
mailing list