poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51710] getCellFormula() returns incorrect result
Date Tue, 23 Aug 2011 20:52:18 GMT

--- Comment #3 from Antti Koskimäki <antti.koskimaki@joinex.com> 2011-08-23 20:52:18
UTC ---
I stared the xml for a while and then noticed, that only thing that doesn't
make sense is "ref" attribute of formula. The declared shared formula is always
correct relative to the containing cell. The ref-attribute on the other hand is
almost random, and does not in any way reflect to the formula copying process.
What it seems to define is boundaries where the shared instance is in use.

When I count the references, it appears that there's familiar magic numbers
involved :=)

 176 si="0"
 255 si="1"
 255 si="2"
 255 si="3"
  64 si="4"
 255 si="5"
 255 si="6"
  64 si="7"

So, it seems to me that 
A) one formula "instance" is shared maximum 255 times
B) distribution of these shared instances is somewhat random (mystical
C) ref-attribute really does only define the "boundaries", nothing else

I also peeked the POI code, and found out that there's calculations on
ss-level. It raised a question if HSSF-heritage is misleading the
XSSF-implementation here ?

P.S. document that made me understand this shared-thing: 
http://www.codeproject.com/KB/XML/ooxml_is_defective.aspx (see chapter 3)

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message