[Libreoffice-bugs] [Bug 137737] REPLACE not working if there is a footnote or endnote anchor at end of paragraph

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 26 11:45:44 UTC 2021


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

--- Comment #20 from Mike Kaganski <mikekaganski at hotmail.com> ---
My proposal now is:

1. Fix this by excluding special processing of footnote/endnote anchor. This
will change the behavior: the footnote anchor will be considered a "character"
(non-word, so e.g. regex g\b will find "following" in the first body
paragraph). Note: "$ will *not* find the first body paragraph's last " anymore,
while "[:control:]$ will (but of course, one would need to use captures or
look-ahead assertions to not replace the footnote/endnote character itself,
also removing the note itself).

2. In the long run, see how to process the rest of the special characters
consistently. Namely, they are RES_TXTATR_FLYCNT (fly anchor), RES_TXTATR_FIELD
(field), RES_TXTATR_REFMARK (reference), RES_TXTATR_TOXMARK (index entry),
RES_TXTATR_META and RES_TXTATR_METAFIELD (no idea when these are used). The
problem here is that each of them will create the same problem; and for those
that conceptually can't be considered "control characters", we need to drop
them from the string at *all* times, not only when they are at start/end of
string, and also when they are outside of the nStart/rEnd boundaries.

Please reply what you think specifically about #1 here. Note again, that this
would fix it in a very different way compared to what OP wanted.

-- 
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/20210826/d03f4d9e/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list