[Bug 159973] queryPrecedents returns cells as if in same sheet
https://bugs.documentfoundation.org/show_bug.cgi?id=159973 --- Comment #4 from Patrick Traill --- It may be worth mentioning that the menu function Tools – Detective – Trace Precedents does show (with a diamond) that there are one or more precedents in a different sheet, presumably meaning that it does not use queryPrecedents (unless that has undocumented capabilities). As reported in bug #63087, is is, however, not possible to use the diamond to access the other cells. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 159973] queryPrecedents returns cells as if in same sheet
https://bugs.documentfoundation.org/show_bug.cgi?id=159973 --- Comment #3 from Patrick Traill --- (In reply to Rafael Lima from comment #2) > (In reply to Patrick Traill from comment #0) > > It also seems to me that enumerating the precedent cells only returns the > > first one, but I am not 100% sure that I am doing that right; that would > > probably be different bug anyway. > > You're enumerating correctly, but if the two ranges are adjacent to one > another, it will return both together as a single range. > > In my sample file, remove the gap column in Test 1 and run it... only a > single range will be returned. Weird anyways, I would expect a different > result. I am not sure I understand you. Do you agree that enumerating the result of getCells should return all the cells, not just one per range? https://www.openoffice.org/api/docs/common/ref/com/sun/star/sheet/XSheetCellRanges.html#getCells says it “creates an enumeration of all used cells”. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 159973] queryPrecedents returns cells as if in same sheet
https://bugs.documentfoundation.org/show_bug.cgi?id=159973 Rafael Lima changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Rafael Lima --- (In reply to Patrick Traill from comment #0) > It also seems to me that enumerating the precedent cells only returns the > first one, but I am not 100% sure that I am doing that right; that would > probably be different bug anyway. You're enumerating correctly, but if the two ranges are adjacent to one another, it will return both together as a single range. In my sample file, remove the gap column in Test 1 and run it... only a single range will be returned. Weird anyways, I would expect a different result. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 159973] queryPrecedents returns cells as if in same sheet
https://bugs.documentfoundation.org/show_bug.cgi?id=159973 --- Comment #1 from Rafael Lima --- Created attachment 192877 --> https://bugs.documentfoundation.org/attachment.cgi?id=192877=edit Sample file for testing I can confirm the weird behavior with queryPrecedents when the range is in a different sheet. I created a sample file with a macro to make it easier to test. Steps to reproduce 1) Open the test file 2) Select cell B7 in Sheet1 and click "Show Precedents" 3) Notice it will show precedents correctly, since they're in the same sheet 4) Click cell A15 from Sheet1 (which contains a formula that uses a range from Sheet2 5) Click the button "Show Precedents" 6) Notice that the returned range for the second parameter is not correct Tested with Version: 7.6.5.2 (X86_64) / LibreOffice Community Build ID: 60(Build:2) CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Ubuntu package version: 4:7.6.5-0ubuntu0.23.10.1 Calc: threaded Also repro with Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 52806e4c1e241d12419373cb0ed013356e12c4b8 CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: CL threaded -- You are receiving this mail because: You are the assignee for the bug.