APavlovF opened a new pull request, #1606:
URL: https://github.com/apache/poi/pull/1606

   Follow-up to Bug 66614 (r1910049).
   While porting the Bug 66614 fix to NPOI (.NET) and writing unit tests 
covering EXCEL2007 row limits, I noticed that 
Offset.LinearOffsetRange.getFirstIndex() and getLastIndex() still cast _offset 
and (_offset + _length - 1) to short. For row offsets greater than 32,767 (such 
as OFFSET(A1, 32768, 0) or up to 1,048,575), the cast overflows into a negative 
number and causes evaluation to fail, even though baseRef.offset(...) accepts 
int parameters.
   Changes:
   • Changed Offset.LinearOffsetRange.getFirstIndex() and getLastIndex() return 
types from short to int and removed the (short) casts.
   • Added XSSF unit tests in TestOffset verifying OFFSET evaluation up to 
EXCEL2007 max bounds (row 1,048,575, col 16,383) and out-of-bounds #REF! 
behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to