Issue 3976 - getReferredCells does not work in recursive setting
Summary: getReferredCells does not work in recursive setting
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: niklas.nebel
QA Contact: issues@api
URL: http://www.wolfhart-bauer.de/problem.sxc
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2002-04-11 13:20 UTC by Unknown
Modified: 2013-02-24 21:07 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 Unknown 2002-04-11 13:20:28 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).
Comment 1 peter.junge 2002-04-11 13:30:53 UTC
Hi,
sounds like an API issue to me.
Best regards, Peter
Comment 2 ooo 2002-04-11 16:18:27 UTC
is an implementation issue, not a missing spec
Comment 3 niklas.nebel 2002-04-12 19:21:38 UTC
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;
}
Comment 4 niklas.nebel 2002-06-26 19:19:28 UTC
This has been fixed (sc/source/ui/unoobj/cellsuno.cxx 1.62), the fix
will be in a future (643) build.
Comment 5 ace_dent 2008-05-17 21:21:42 UTC
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
Comment 6 ace_dent 2008-05-17 23:24:50 UTC
As per previous posting: Verified -> Closed.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew