Apache OpenOffice (AOO) Bugzilla – Issue 3976
getReferredCells does not work in recursive setting
Last modified: 2013-02-24 21:07:48 UTC
The method com.sun.star.sheet.XFormulaQuery.getReferredCells(true) does not work from the Java bindings anymore. It still works in 641C, but not in 641D. OOo just seems to be stalled when calling this method. The non-recursive option still works. Try to call it on the cell H26 in sheet Tabelle1 in the example problem.sxc (see URL above).
Hi, sounds like an API issue to me. Best regards, Peter
is an implementation issue, not a missing spec
I assume you mean queryPrecedents, not getReferredCells. Yes, it's an error in the implementation that got introduced with some recent changes for the XML file format handling. I'd rather not change the implementation again before the 1.0 release, because of the risk of breaking the file format, and because a workaround exists: Instead of XSheetCellRanges xResult = xStart.queryPrecedents( true ); use something like XSheetCellRanges xResult = xStart.queryPrecedents( false ); String aResAddr = xResult.getRangeAddressesAsString(); while (true) { XFormulaQuery xQuery = (XFormulaQuery) UnoRuntime.queryInterface( XFormulaQuery.class, xResult ); XSheetCellRanges xNext = xQuery.queryPrecedents( false ); String aNextAddr = xNext.getRangeAddressesAsString(); if ( aResAddr.equals( aNextAddr ) ) break; xResult = xNext; aResAddr = aNextAddr; }
This has been fixed (sc/source/ui/unoobj/cellsuno.cxx 1.62), the fix will be in a future (643) build.
The Issue you raised has been marked as 'Resolved' and not updated within the last 1 year+. I am therefore setting this issue to 'Verified' as the first step towards Closing it. If you feel this is incorrect, please re-open the issue and add any comments. Many thanks, Andrew Cleaning-up and Closing old Issues ~ The Grand Bug Squash, pre v3 ~ http://marketing.openoffice.org/3.0/announcementbeta.html
As per previous posting: Verified -> Closed. A Closed Issue is a Happy Issue (TM). Regards, Andrew