Issue 112638

Summary: Matrix expressions of scalar arguments are not initialized properly
Product: Calc Reporter: remo00 <remo>
Component: programmingAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P2 CC: issues, rb.henschel
Version: OOO300m1   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
example of matrix formulas not displaying properly
none
Example ods file. 9 time over 10 formula in Stat" none

Description remo00 2010-06-23 19:21:09 UTC
Starting with OOO 3.0 onward I had problems sometimes with matrix formula.
From time to time, some cells containing matrix formula don't display the right
result but a #VALUE# with "wrong data type" or simply they do not display anything
This is not reproducible, it occurs sometimes inserting and deleting rows, or
pressing the Undo button, but not always.
I took a screen-shot. of the same file behaving normally and when is not working
Note that the formula in D33 in both cases.
Workarounds may be: Closing and opening again the file, inserting and deleting
rows, but not always
The attachment follows
Comment 1 remo00 2010-06-23 19:22:34 UTC
Created attachment 70178 [details]
example of matrix formulas not displaying properly
Comment 2 remo00 2010-06-25 11:45:47 UTC
Created attachment 70217 [details]
Example ods file. 9 time over 10 formula in Stat"
Comment 3 remo00 2010-06-25 11:48:47 UTC
9 time over 10 formula in "Stat" sheet are not displayed properly in Ooo 3.2
Comment 4 remo00 2010-07-08 08:55:32 UTC
Similar or probably a duplicate of <a href="show_bug.cgi?id=101155">issue 
101155</a>
Comment 5 Regina Henschel 2010-07-08 11:30:32 UTC
I see the described error in DEV300m83 with the attached document.

No, I do not think, that it is the same problem as 101155. It looks like a
problem with the argument of YEAR and MONTH. I see the data in column A on sheet
'Data' in mixed format, some are language Default and some are in language
Italian. If I set the language for all cells in column A to Italian, the errors
on sheet 'Stat' vanish after a hard recalculate.

I think, that it is a bug, because the argument of YEAR is the internal date
number and that should be independent of the language of the display format.
Comment 6 ooo 2010-07-08 15:04:37 UTC
I could not reproduce the error to vanish, in DEV300m84 I tried setting all
dates to Italian and to Default (en-US) and recalculate each time, but it didn't
change. However, two values changed once when I forced a recalculation without
changing anything.. This smells like some uninitialized variable somewhere.

Interestingly, when exported to .xls and loaded in Excel also Excel displayed
#VALUE! for every cell in Stat.C:E.

Inspecting the formulas revealed that MONTH($Data.$A$5:$F$303) is the underlying
cause, changing that to MONTH($Data.$A$5:$A$303) to use only column A makes the
calculation work as intended. Using MONTH on a non-numeric value of other
columns produces #VALUE! (since OOo3.2)

However, there's a serious flaw with the matrix initialization of the MONTH
values, one can easily see with the matrix formula {=MONTH($Data.$A$5:$F$303)}
that from the second column on arbitrary values are present, all values should
be #VALUE! and not just a few or arbitrary month numbers. These values change
when forcing a recalculation.
Comment 7 ooo 2010-07-08 15:05:15 UTC
Grabbing issue.
Comment 8 Marcus 2017-05-20 11:33:12 UTC
Reset assigne to the default "issues@openoffice.apache.org".