Hi Robert,
somehow the mentioned attached file did not find its way to the mailing list.
I am not sure, if it was removed due to mailing list policy or if you had
forgotten to attach it.
It might be a good idea to submit an issue in our Bugzilla instance [1] and
attach the patch to this issue.
[1] https://issues.apache.org/ooo/
Best regards, Oliver.
On 23.11.2012 17:45, Robert Barbey wrote:
Hi everyone,
for a Writer extension, we're traversing a document using the Java text
iteration API. The text is extracted and sent to a server backend for
linguistic analysis. This server returns a report containing corrections for
the current document which the extension needs to map back into the document.
All of this is based on XTextRange objects.
In order to highlight these corrections within document, we are using smart
tags. But with the existing XSmartTagRecognizer interface it's not possible
to determine reliably the absolute position of the text that is to be
processed in the recognize method of the interface. To be able to do that we
would need an XTextRange object as argument. This, of course, would require a
change of the XTextMarkup interface so that it also supports committing
markup for XTextRanges.
In the attached file, you find a patch that adds this functionality. It would
be really great if you could review these changes and provide feedback for
improvements or if you think that we have missed something essential. WE
think that this addition could be beneficial to other extensions as well.
Thank you very much and have a nice weekend.
Best, Robert