To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=107339
User dr changed the following:
What |Old value |New value
================================================================================
Status|RESOLVED |REOPENED
--------------------------------------------------------------------------------
Resolution|FIXED |
--------------------------------------------------------------------------------
------- Additional comments from [email protected] Tue Dec 1 10:41:06 +0000
2009 -------
Hi Kohei,
I think this is not the correct solution. As I see it you pass the global size
of an array formula into the formula parser and use it as size for array
constants. But it is possible that any formula (supporting array constants)
contains multiple array constants of arbitrary sizes, e.g. a simple cell formula
with
=SUM({1,2;3,4};{1,2,3;4,5,6;7,8,9})
or a 2x2 array formula containing a 4x4 and a 6x1 array constant etc etc...
Suggestions:
(1) Modify the TokenPool::StoreMatrix() function to not need to pass any
width/height, but to postpone the creation of the ScMatrix object until the
additional array elements following the formula are read.
(2) Modify the import code of the tArray token so that it jumps directly to the
additional data following the formula and read the size of the array from there.
This means also, that all other tokens expecting additional data (the tMem...
tokens containing cell range lists, and the tNlr token for stacked natural
language references) have to read or skip their data immediately too.
In both cases: According to the XLS spec of MS, the data in the tArray token has
to be ignored always. It may contain invalid data different from zeros, so using
that data is dangerous and should be dropped completely.
You may have a look at the (inactive) BIFF filter in the oox module, which
implements option (2):
File oox/source/xls/formulaparser.cxx, function
BiffFormulaParserImpl::importArrayToken() and the function swapStreamPosition()
used by it and by other token import code to swap to the additional data and
swap back. Btw, I have checked this filter with the attached document, works
fine. :-)
I will prepare and attach a test document that contains various sized array
constants per formula with invalid data in the tArray token.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]