[Libreoffice-bugs] [Bug 51925] New: [BASIC] Writer Table getColumns().getByIndex(i) returns null, where it should not
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Jul 10 04:37:08 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=51925
Bug #: 51925
Summary: [BASIC] Writer Table getColumns().getByIndex(i)
returns null, where it should not
Classification: Unclassified
Product: LibreOffice
Version: 3.5.4 release
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
AssignedTo: libreoffice-bugs at lists.freedesktop.org
ReportedBy: olivier.hallot at documentfoundation.org
Created attachment 64047
--> https://bugs.freedesktop.org/attachment.cgi?id=64047
Text document showing bug in getColumns.getByIndex() flaw.
The following piece of BASIC returns a null object where it should not.
REM ***** BASIC *****
Sub Main
nLin = 10
nCol = 7
oText = ThisComponent.getText()
oText.setString("")
oText.getStart()
'Create tabela
oTabela = ThisComponent.createInstance("com.sun.star.text.TextTable")
oTabela.initialize ( nLin, nCol )
oTabela.setName("test")
oCursorT = oText.createTextCursor()
oText.insertTextContent(oCursorT, oTabela, True)
oColuna = oTabela.getColumns().getByIndex(0)
xray oColuna
'oColuna.IsAutoWidth = False
'oColuna.Width = 4440
End Sub
oColuna returns NULL where it should have returned an object. xray is a well
known macro to inspect objects.
No way to set a column width, and other column properties.
The attached document provides a living example.
Please execute macro Main in Standard library.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Libreoffice-bugs
mailing list