Hi Udo, On Mon, Dec 10, 2012 at 06:43:47PM -0500, Udo Schuermann <udo.schuermann@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 inconsistency. 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, Miklos
Attachment:
signature.asc
Description: Digital signature