Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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@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 isn't just having trouble deleting this special marker (it's debatable whether that
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!

 ._.
 ( )


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.