LO fdo#38244 & 57938

Miklos Vajna vmiklos at suse.cz
Tue Dec 11 00:21:38 PST 2012

Hi Udo,

On Mon, Dec 10, 2012 at 06:43:47PM -0500, Udo Schuermann <udo.schuermann at gmail.com> wrote:
> You did the work for LibreOffice fdo#38244 (comments on text ranges)
> back in July, and I reported an issue that relates to it (57938). I
> dug through the code myself, but I've no experience with the LO code
> base, and little enough exposure to C++: after spending a long
> evening digging around, I have some vague ideas, but I'm more
> confused than enlightened.
> I suspect that you might at least have an idea what could be causing
> the problem, and even if you have no solution in sight, perhaps you
> could nudge me in the right direction.

So, internally, the commented text ranges are represented with two
special constructs: one is the comment (called "annotation" in the
code), and one is a fieldmark (think of it as an invisible bookmark).
when there is a fieldmark of type ODF_COMMENTRANGE ending at the
annotation character, Writer will assume that's a commented textrange,
whose start / end positions are defined by the fieldmark.

I assume the reason why you can't delete just the start / end character
of the fieldmark is that nobody added support for deleting the whole
fieldmark in that case, and just deleting one end of it would lead to

So, the way I would start hacking on this is checking how deletion of
the special annotation character works (open a new Writer doc, type some
words, add a comment, type in something to the comment, then if you
delete the invisible comment character in the main text, the comment
disappears), and do something similar for fieldmarks as well.

Hope this helps,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20121211/ce85f31d/attachment.pgp>

More information about the LibreOffice mailing list