To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=56534
Issue #:|56534
Summary:|queryPrecedents (XFormulaQuery) on Calc-cells don't
|recognize cross-table-references
Component:|api
Version:|OOo 2.0
Platform:|All
URL:|
OS/Version:|All
Status:|UNCONFIRMED
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|sw
Reported by:|leguff
------- Additional comments from [EMAIL PROTECTED] Mon Oct 24 04:11:05 -0700
2005 -------
try the following:
- create a new spreadsheet document and name the first table "table1"
and the second "table"
- enter a value into table1.D24
- enter formula "=table1.D24" into table2.C6
- now get the precedents cells of table2.C6 via API and you'll find some
unexpected values:
Sub PrintFormulaPrecedents
spreadSheetDocument = ThisComponent
sheet1 = spreadSheetDocument.getSheets().getByIndex(0)
sheet2 = spreadSheetDocument.getSheets().getByIndex(1)
' "table2.C2"
formulaCell = sheet2.getCellByPosition(2, 5)
' get the precedents of this cell (Aspect: XFormulaQuery)
ranges = formulaCell.queryPrecedents(true)
' prints: table2.C6; table2.D24 (should be table1.D24 only)
print ranges.getRangeAddressesAsString()
e = ranges.getCells().createEnumeration()
while e.hasMoreElements()
cell = e.nextElement()
' prints: table2.5.2 (should be table1.23.3)
print "Precedents " & cell.SpreadSheet.Name _
& "." & cell.RangeAddress.StartRow _
& "." & cell.RangeAddress.StartColumn
wend
End Sub
---------------------------------------------------------------------
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]