<!-- Don't forget to update status.xml too! -->
<release version="3.5-beta6" date="2008-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">Fixed formula parser to handle names with backslashes</action>
<action dev="POI-DEVELOPERS" type="add">46660 - added Workbook getHidden() and setHidden(boolean)</action>
<action dev="POI-DEVELOPERS" type="fix">46693 - Fixed bugs serialization bugs in records: CHARTFORMAT, SHTPROPS, SXVD and SXVDEX</action>
<action dev="POI-DEVELOPERS" type="fix">46627 - Fixed offset of added images if Pictures stream contains pictures with zero length</action>
<!-- Don't forget to update changes.xml too! -->
<changes>
<release version="3.5-beta6" date="2008-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">Fixed formula parser to handle names with backslashes</action>
<action dev="POI-DEVELOPERS" type="add">46660 - added Workbook getHidden() and setHidden(boolean)</action>
<action dev="POI-DEVELOPERS" type="fix">46693 - Fixed bugs serialization bugs in records: CHARTFORMAT, SHTPROPS, SXVD and SXVDEX</action>
<action dev="POI-DEVELOPERS" type="fix">46627 - Fixed offset of added images if Pictures stream contains pictures with zero length</action>
} else {
// allow for any sequence of dots and identifier chars
// special case of two consecutive dots is best treated in the calling code
- while (IsAlNum(look) || look == '.' || look == '[' || look == ']') {
+ while (IsAlNum(look) || look == '.' || look == '[' || look == ']' || look == '\\') {
sb.append(look);
GetChar();
}
MemFuncPtg mf = (MemFuncPtg)ptgs[0];
assertEquals(15, mf.getLenRefSubexpression());
}
+
+ /** Named ranges with backslashes, e.g. 'POI\\2009' */
+ public void testBackSlashInNames() {
+ HSSFWorkbook wb = new HSSFWorkbook();
+
+ HSSFName name = wb.createName();
+ name.setNameName("POI\\2009");
+ name.setRefersToFormula("Sheet1!$A$1");
+
+ HSSFSheet sheet = wb.createSheet();
+ HSSFRow row = sheet.createRow(0);
+
+ HSSFCell cell_C1 = row.createCell(2);
+ cell_C1.setCellFormula("POI\\2009");
+ assertEquals("POI\\2009", cell_C1.getCellFormula());
+
+ HSSFCell cell_D1 = row.createCell(2);
+ cell_D1.setCellFormula("NOT(POI\\2009=\"3.5-final\")");
+ assertEquals("NOT(POI\\2009=\"3.5-final\")", cell_D1.getCellFormula());
+ }
+
}