Issue 56534 - queryPrecedents (XFormulaQuery) on Calc-cells don't recognize cross-table-references
Summary: queryPrecedents (XFormulaQuery) on Calc-cells don't recognize cross-table-ref...
Status: CLOSED DUPLICATE of issue 56535
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-24 12:11 UTC by leguff
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description leguff 2005-10-24 12:11:05 UTC
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
Comment 1 leguff 2005-10-24 12:21:46 UTC
Sorry, delete this issue or link to 56535.
Firefox tricked me :-(((
Comment 2 stephan.wunderlich 2005-10-31 17:09:31 UTC
setting to duplicate

*** This issue has been marked as a duplicate of 56535 ***
Comment 3 stephan.wunderlich 2005-10-31 17:10:19 UTC
closing as duplicate