LO fdo#38244 & 57938

Udo Schuermann udo.schuermann at gmail.com
Tue Dec 11 05:47:17 PST 2012

On 12/11/2012 03:21 AM, Miklos Vajna wrote:
> 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
> 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
Thanks, Miklos, that's sort of how I envisioned it. It seems that Writer 
just having trouble deleting this special marker (it's debatable whether 
is even desirable), but it mistakes the immediately preceding character as
off-limits, and also prohibits inserting anything immediately before that
marker (well, I'm thinking out loud here, but it's giving me some ideas).

Thanks for the nudge. A-hunting I shall go!

  ( )

More information about the LibreOffice mailing list