[Libreoffice-bugs] [Bug 134829] New: Gotorange method gives an error poiting to a textsection with only a texttable as content

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Jul 15 10:35:35 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=134829

            Bug ID: 134829
           Summary: Gotorange method gives an error poiting to a
                    textsection with only a texttable as content
           Product: LibreOffice
           Version: 6.4.4.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: clesiopof at gmail.com

Created attachment 163056
  --> https://bugs.documentfoundation.org/attachment.cgi?id=163056&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200715/333f1fc4/attachment.htm>


More information about the Libreoffice-bugs mailing list