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



On 08/08/2013 03:10 AM, Miklos Vajna wrote:
On Thu, Aug 08, 2013 at 01:00:28AM -0400, Andrew Douglas Pitonyak <andrew@pitonyak.org> wrote:
If I had to determine if the cursor was currently in a redline
section, my first guess at a solution would probably be to go
looking for redlines in the text object containing the view cursor
and then check the start and end point of each redline to see if it
contains the cursor. Feels like a bad solution to me (as in it is
probably slow), but it is the best that comes to my mind (assuming I
understand your question correctly).
Just curious: let's say the document is trivially short, you have a
cursor position start (so you have only a point) as text::XTextRange,
how do you determine if that's inside a given text portion?

Thanks,

Miklos
I think that you use the text object that contains a text cursor and then you use the methods compareRegionStarts and compareRegionEnds (I cover this in AndrewMacro.odt and probably OOME as well).

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


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.