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



Disclaimer: I have not taken the time to look at the problem, but, if you have a text range, or have the ability to get a text range out of what you have, then you can compare the starting and ending positions. You might need to create a text cursor from the range to do this. I do not have the ability to test this at the moment, but that is where I would look if I needed to answer a similar question. Note also that with an appropriate cursor, you can do things such as jump to the start and end of a paragraph.

If a paragraph contains content that uses a different Text object, or you happen to be trying to compare content that lives in different text objects, this will fail; for example, each cell in a Text Table uses its own Text object if my memory serves me correctly. This means that you cannot compare the location of an object in one cell with that in another cell or outside the text table.

On 2017-12-12 5:04, Jens Tröger wrote:
Thanks Miklos!

Interesting detail though: for any number of XTextContent objects
(i.e. paragraphs with implementationName=SwXParagraph) which represent
_the same_ paragraph in the document, there’s no real way to tell
that these objects do, in fact, represent the same paragraph?

Huh. Cheers,
Jens


On Dec 12, 2017, at 19:37, Miklos Vajna <vmiklos@collabora.co.uk> wrote:

https://lists.freedesktop.org/archives/libreoffice/2017-December/079050.html
has code samples on how the reference-to-bookmark is represented as a HyperlinkURL property, and how the bookmark is a Bookmark text portion.
There is no closer connection between these two, I think.

Regards,
Miklos

--
Jens Tröger
http://savage.light-speed.de/

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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.