[PATCH 1/2] riched20: Implement ITextSelection::GetText. (try 3)

Jactry Zeng jactry92 at gmail.com
Tue Jul 15 09:58:00 CDT 2014


2014-07-04 19:00 GMT+08:00 Jactry Zeng <jactry92 at gmail.com>:
>
> 1. end-of-story is different from end-of-paragraph
> From document of ITextDocument::GetStoryCount: Rich edit controls have
only one story.[1]
> So ‘story’ may is an unit like 'paragraph' in Rich edit control. We may
need add a MERF_ENDSTORY to implement it.[2]
>
> 2. What does the end-of-story looks like?
> When we run the wordpad with native riched20, we can use ‘ctrl + shitf +
→’ to select the ‘space’ at the end of the Rich edit control. But we cannot
set the cursor behind it.(a picture here[3])
> And wine’s riched20 didn’t implement this ‘space’. This 'space' may is
the end-of-story.
>
> A crash will happen when we copy the ‘space’ from a native Rich edit
control to a builtin one.(backtrace.txt[4])
>
> BTW, there is a know bug of EM_SETSEL: cannot select the last character
of Rich edit control.[5]
>
> 3.
> From the last paragraph of this blog:
http://blogs.msdn.com/b/murrays/archive/2008/11/22/paragraphs-and-paragraph-formatting.aspx
> It is sure there is a final EOP in a Rich edit control.
>
> There seems to be every indication that we should implement the final EOP
of Rich edit control rather than just append a ‘\r’ in
ITextSelection::GetText.
> So I just let a FIXME comment there. I am not sure if I am right.

I missed some links here:
[1]
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774027(v=vs.85).aspx
[2]
http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/editstr.h#l115
 [3] http://img.vim-cn.com/6f/dbc090928d97b2cdf53838278087fa95660b9b.png
[4] https://gist.github.com/Jactry/cae7d739162fca4f072f
[5]
http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/tests/editor.c#l4366



-- 
Regards,
Jactry Zeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20140715/abecf3b3/attachment.html>


More information about the wine-devel mailing list