<div dir="ltr">OK, thank you for your support. I will look into this when I have time. <div>Thanks,</div><div>mike</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 7, 2013 at 2:23 PM, Miklos Vajna <span dir="ltr"><<a href="mailto:vmiklos@suse.cz" target="_blank">vmiklos@suse.cz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Aug 07, 2013 at 12:33:35PM -0500, James Michael DuPont <<a href="mailto:jmdpplks@gmail.com">jmdpplks@gmail.com</a>> wrote:<br>
> I am feeling stupid here, so please excuse my ignorance, but I did not find<br>
> any api to tell me if the current cursor is in a redline, can you please<br>
> point me in the right direction? I just found an api to give me the list of<br>
> redlines and have been checking the cursor to see if it is in one of them.<br>
<br>
</div>As far as I know, that's not directly possible. Here is how I would do<br>
the API for it:<br>
<br>
- see<br>
<a href="http://opengrok.libreoffice.org/xref/core/sw/source/ui/uiview/view2.cxx#639" target="_blank">http://opengrok.libreoffice.org/xref/core/sw/source/ui/uiview/view2.cxx#639</a><br>
on how to check if an SwPosition (that's the internal equivalent of a<br>
position in the document model) is inside a redline using<br>
SwDoc::GetRedline()<br>
<br>
- it's already possible to check if the cursor is e.g. at the end of<br>
line:<br>
<br>
<a href="http://api.libreoffice.org/docs/common/ref/com/sun/star/view/XLineCursor.html#isAtEndOfLine" target="_blank">http://api.libreoffice.org/docs/common/ref/com/sun/star/view/XLineCursor.html#isAtEndOfLine</a><br>
<br>
The implementation of that is in the SwXTextViewCursor class:<br>
<br>
<a href="http://opengrok.libreoffice.org/xref/core/sw/source/ui/uno/unotxvw.cxx#1649" target="_blank">http://opengrok.libreoffice.org/xref/core/sw/source/ui/uno/unotxvw.cxx#1649</a><br>
<br>
>From that, you could add a new isInRedline() method to the cursor, which<br>
would return exactly what you need.<br>
<br>
HTH,<br>
<br>
Miklos<br>
<br>_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
<br></blockquote></div><br></div>