[Libreoffice-bugs] [Bug 120290] Clicking behind a sentence ending in a commented word places cursor before final period

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Nov 12 13:32:41 UTC 2020


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

Justin L <jluth at mail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #148844|0                           |1
        is obsolete|                            |

--- Comment #8 from Justin L <jluth at mail.com> ---
Created attachment 167239
  --> https://bugs.documentfoundation.org/attachment.cgi?id=167239&action=edit
comment.odt: tweaked to test the thinest character (|), and multi-comments.

Miklos cautiously handled a similar issue in
https://cgit.freedesktop.org/libreoffice/core/commit/?id=27c46ecf34b32bae1806d3fc0e1684179301feb8
for comments after flies. I guess in theory it could be extended for any
portion with width zero. 

Handling a comment (or other zero width portions) at the very end of the line
can be accomplished with:
    if (nWidth30 >= nX && (!pPor->IsFlyCntPortion() ||
!pPor->GetNextPortion()->IsPostItsPortion()))
-        return false;
+        return nWidth30 == nX && !pPor->GetNextPortion()->Width();

But who knows what all portions can have zero width, and that could have a LOT
of unintended consequences. Also, this routine is called every time the cursor
quivers - so tight coding is very important.

Proposed fix:
https://gerrit.libreoffice.org/c/core/+/105746 tdf120290 sw: move cursor behind
comment at line end
https://gerrit.libreoffice.org/c/core/+/105747 tdf#120290 sw: comment no longer
needs any width

-- 
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/20201112/4e970d83/attachment.htm>


More information about the Libreoffice-bugs mailing list