[Libreoffice-bugs] [Bug 132922] LibreOffice spelling dialog doesn't work correct for LT-4.7+

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon May 25 07:08:36 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=132922

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |caolanm at redhat.com

--- Comment #3 from Mike Kaganski <mikekaganski at hotmail.com> ---
The problem is that edit engine treats every \n as a new paragraph (node),
while in Writer, that is just a line break. So the text split by line breaks
comes as several paragraphs into the spell dialog's edit engine. The dialog
processes its first paragraph's errors (using character properties, which are
bound to that paragraph first and last indices); thus from the dialog's PoV,
each processed error may not end in a next paragraph.

An error like "too\nsee" is reported by spelling checker, with
SpellErrorDescription having sErrorText equal to "too\nsee", and a suggestion
to change that to "to see". When user chooses to skip,
SentenceEditWindow_Impl::RestoreCurrentError compares
SpellErrorDescription::sErrorText with GetErrorText() - the latter returns only
the part of the error that is on the first edit engine paragraph, i.e. "too";
as the strings differ, the dialog considers that as if user modified the text
manually, and the "too" is "replaced back" with "too\nsee".

Caolán: do you have an idea how to fix this?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200525/ee115d10/attachment.htm>


More information about the Libreoffice-bugs mailing list