To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=51060
Issue #:|51060
Summary:|Setting a TextTable name fails the second time.
Component:|api
Version:|680m109
Platform:|All
URL:|
OS/Version:|All
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|sw
Reported by:|pitonyak
------- Additional comments from [EMAIL PROTECTED] Tue Jun 21 10:41:39 -0700
2005 -------
consider the following macro shown blow, which creates a text table with the
specified name. Run the macro and the TextTable is created with the requested
name. Now, using the GUI, delete the text table. Now, run the macro a second
time on the same document. The created name has an extra character appended to
the name.
Sub Main
InsertTableAtCursor("woww")
End Sub
Sub InsertTableAtCursor(sName$)
Dim oText, oTable
Dim oCurs
Dim sTabName$
If (ThisComponent.getTextTables().hasByName(sName)) Then
Print "The table named " & sName & " already exists"
Exit Sub
End If
oText = ThisComponent.getText()
oTable = ThisComponent.createInstance("com.sun.star.text.TextTable")
oTable.initialize(3, 3)
oTable.setName(sname)
oCurs = ThisComponent.getCurrentController().getViewCursor()
oText.insertTextContent(oCurs, oTable, False)
oTable.setDataArray(Array(Array(1, 2, 3), Array(4, 5, 6), Array(7, 8, 9))
MsgBox oTable.getName()
End Sub
You can verify that the name is not present using the following:
MsgBox Join(ThisComponent.getTextTables().getElementNames(), CHR$(10))
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]