Bug 44297

Summary: =32767+32768 is evaluated to -1
Product: POI Reporter: Satish <satysh>
Component: HSSFAssignee: POI Developers List <dev>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Windows XP   
Attachments: Test spreadsheet (Refer to A5)

Description Satish 2008-01-25 12:16:46 UTC
In spreadsheet I have formula cell which has =32767+32768. When I process this
using POI (poi-3.0.10-FINAL), it is evaluated to -1. When I debugged the code, I
noticed the formula in cell as =32767+-32768, which is obviously evaluated
properly to -1. Now -32768 is not at all expected. is it? 

Moreover, 32767+32767 works fine.
Comment 1 Satish 2008-01-25 12:18:22 UTC
Created attachment 21430 [details]
Test spreadsheet (Refer to A5)
Comment 2 Yegor Kozlov 2008-01-27 07:24:46 UTC
Fixed and committed to svn (trunk). 

Yegor
Comment 3 Satish 2008-01-28 08:46:53 UTC
The fix is working, I tested it. Could you please release a patch for 3.0.1
containing this fix? Sorry , I should have mentioned this before in version
selection. 

Thanks very much Yegor for a quick turnaround. 

Comment 4 Yegor Kozlov 2008-01-28 09:02:00 UTC
>Could you please release a patch for 3.0.1
>containing this fix?

No.  
3.0.2 is coming, the fix is included in it.
If you wish, you can patch 3.0.1 yourself. You need to replace 
org.apache.poi.hssf.record.formula.IntPtg.  

Yegor 
Comment 5 Satish 2008-01-28 09:20:14 UTC
No Problem.