Bug 49640 - [PATCH] FormulaParser cannot parse formulas containing defined names beginning with an underscore
Summary: [PATCH] FormulaParser cannot parse formulas containing defined names beginnin...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.7-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-22 17:31 UTC by David Lewis
Modified: 2010-07-26 11:53 UTC (History)
0 users



Attachments
Fixes incorrect rejection of defined names beginning with underscores in formulas (951 bytes, application/octet-stream)
2010-07-22 17:31 UTC, David Lewis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Lewis 2010-07-22 17:31:31 UTC
Created attachment 25795 [details]
Fixes incorrect rejection of defined names beginning with underscores in formulas

Eclipse allows defined names to begin with either a letter or an underscore.  These defined names may be present in a formula (e.g. =SUM(F15:F16)+_GP108).  In the previous example _GP108 is a defined name beginning with an underscore.  

FormulaParser fails to process the defined name in the previous example because the parseNonRange(int) function only tests whether the defined name begins with a letter.  This occurs when processing xssf workbooks only.

The attached patch modifies the test for the defined name starting character to accept underscores.
Comment 1 Yegor Kozlov 2010-07-26 11:53:56 UTC
Applied in r979329

Yegor