Issue 20044 - API: sc.ScCellObj::com:sun:star:sheet:XCellRangesQuery
Summary: API: sc.ScCellObj::com:sun:star:sheet:XCellRangesQuery
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: Other All
: P3 Trivial
Target Milestone: 4.0.0
Assignee: sascha.ballach
QA Contact: issues@api
Depends on:
Reported: 2003-09-25 10:10 UTC by steffen.grund
Modified: 2017-05-20 09:32 UTC (History)
3 users (show)

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

Source code for the test (4.47 KB, application/octet-stream)
2003-09-25 10:18 UTC, steffen.grund
no flags Details
BASIC demonstration of queryEmptyCells() bug (8.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-04-28 16:58 UTC, jamescrompton
no flags Details
Proposed patch to fix this problem (691 bytes, patch)
2012-06-17 15:42 UTC, hanya
awf.aoo: review+
Details | Diff
Document including test macro (10.23 KB, application/octet-stream)
2012-07-10 15:46 UTC, hanya
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description steffen.grund 2003-09-25 10:10:06 UTC
The method queryEmptyCell() does not return the empty cell at this object.
See sample test on bugdoc.
Start the office with accepting a connection on port 8100 and type dmake in the
complex/scScCellObj folder to reproduce the bug.
Comment 1 steffen.grund 2003-09-25 10:18:05 UTC
Created attachment 9654 [details]
Source code for the test
Comment 2 steffen.grund 2003-09-25 10:20:39 UTC
Comment 3 niklas.nebel 2003-09-26 12:52:08 UTC
ScCellIterator needs multi selection. Other methods might be affected,
Comment 4 sascha.ballach 2003-10-08 14:12:09 UTC
i take it
Comment 5 frank 2004-05-04 15:42:43 UTC
Due to limited time ressources I re-Target this one to OOo Later
Comment 6 jamescrompton 2008-04-28 16:54:26 UTC
queryEmptyCells() has now apparently been broken for 5 years: if called on an
empty range it returns null, instead of a collection containing that single
range. I attach a simpler demonstration file to encourage action.
Comment 7 jamescrompton 2008-04-28 16:58:38 UTC
Created attachment 53239 [details]
BASIC demonstration of queryEmptyCells() bug
Comment 8 DonJaime 2012-02-09 08:48:24 UTC
Nudge: feature broken since 2003.
Comment 9 hanya 2012-06-17 15:42:11 UTC
Created attachment 78357 [details]
Proposed patch to fix this problem

When the cell range does not have any cell having value, aNewRanges is empty and 
returned instance of ScCellRangesObj class is initialized with empty cell ranges. 
The aNewRanges should be filled for the cell range having cells that value is not set.
Comment 10 Andre 2012-07-10 14:37:51 UTC
@hanya: How did you test your fix?
Comment 11 hanya 2012-07-10 15:46:58 UTC
Created attachment 78619 [details]
Document including test macro

(In reply to comment #10)
> @hanya: How did you test your fix?
Open the attached spreadsheet document and see Standard.Module1.Main.
No messagebox is shown for no problem by executing the macro.
1st and 3rd test fail on version 3.4 defined in the macro, because of the problem described in this issue.
- 1st test: Sheet1.A1 is empty, so the result should be have 1 element and its range address should be Sheet1.A1 in string form.
- 3rd test: Sheet1.A1:A5 range contains empty cells only and result should be have the full range but the result is empty cell ranges container on the current release.
Both test should be passed on patched version.

All other situations should not be influenced by this patch.
Comment 12 SVN Robot 2012-07-11 09:07:31 UTC
"af" committed SVN revision 1360079 into trunk:
#i20044# Fixed queryEmptyCell()
Comment 13 Andre 2012-07-11 09:08:02 UTC
Comment on attachment 78357 [details]
Proposed patch to fix this problem

Reviewed and tested: OK
Comment 14 Andre 2012-07-11 09:08:20 UTC
Fixed on trunk.