<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Gotorange method gives an error poiting to a textsection with only a texttable as content"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=134829">134829</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Gotorange method gives an error poiting to a textsection with only a texttable as content
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.4.4.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>BASIC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>clesiopof@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=163056" name="attach_163056" title="File to test">attachment 163056</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=163056&action=edit" title="File to test">[details]</a></span>
File to test

When using a macro in Writer to point to a textsection, if the only content of
this testsection is a texttable, the gotorange method gives this error:
"Erro de execução do BASIC.
Ocorreu uma exceção 
Type: com.sun.star.uno.RuntimeException
Message: ."

My macro goes like this:

Sub Main
        dim file,section, oAnchor, textcursor
        file = thiscomponent
        textcursor = file.getText().createTextCursor()
        if file.getTextSections.hasByName("Seção1") then
                section = file.getTextSections.getByName("Seção1")
                oAnchor = section.getAnchor()
                textcursor.gotoRange(oAnchor, False)
        end if
End Sub</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>