<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I remember looking at redlines way back in the dark recesses of
    time, so I loaded up AndrewMacro.odt<br>
    <br>
    The best I saw there was the ability to enumerate text sections to
    find "Redline" text portion sections. <br>
    <br>
    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).<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 08/07/2013 09:35 PM, James Michael
      DuPont wrote:<br>
    </div>
    <blockquote
cite="mid:CADqGwdrpKwUNMBhj=73aQLS5dMa3XZ4+=tf=kL9Kt==jnGmtLw@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true"
              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 moz-do-not-send="true"
                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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
              href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.freedesktop.org/mailman/listinfo/libreoffice"
              target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LibreOffice mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/libreoffice">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Andrew Pitonyak
My Macro Document: <a class="moz-txt-link-freetext" href="http://www.pitonyak.org/AndrewMacro.odt">http://www.pitonyak.org/AndrewMacro.odt</a>
Info:  <a class="moz-txt-link-freetext" href="http://www.pitonyak.org/oo.php">http://www.pitonyak.org/oo.php</a>
</pre>
  </body>
</html>