You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/10/21 23:15:13 UTC
DO NOT REPLY [Bug 46053] New: Evaluation cache dependency analysis
broken when changing blank values
https://issues.apache.org/bugzilla/show_bug.cgi?id=46053
Summary: Evaluation cache dependency analysis broken when
changing blank values
Product: POI
Version: 3.5-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: josh@gildedtree.com
The following code demonstrates the problem:
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("Sheet1");
HSSFRow row = sheet.createRow(0);
HSSFCell cellA1 = row.createCell(0);
HSSFCell cellB1 = row.createCell(1);
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
cellA1.setCellFormula("B1+2.2");
cellB1.setCellValue(1.5);
fe.notifyUpdateCell(cellA1);
fe.notifyUpdateCell(cellB1);
CellValue cv;
cv = fe.evaluate(cellA1);
assertEquals(3.7, cv.getNumberValue(), 0.0);
cellB1.setCellType(HSSFCell.CELL_TYPE_BLANK);
fe.notifyUpdateCell(cellB1);
cv = fe.evaluate(cellA1);
assertEquals(2.2, cv.getNumberValue(), 0.0);
cellB1.setCellValue(0.4);
fe.notifyUpdateCell(cellB1);
cv = fe.evaluate(cellA1);
if (cv.getNumberValue() == 2.2) {
throw new AssertionFailedError("Error in evaluation dependency (cached
value not reset)");
}
assertEquals(2.6, cv.getNumberValue(), 0.0);
--
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
DO NOT REPLY [Bug 46053] Evaluation cache dependency analysis broken
when changing blank values
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46053
Josh Micich <jo...@gildedtree.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Josh Micich <jo...@gildedtree.com> 2008-10-21 14:29:04 PST ---
Fixed in svn r706722
--
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
DO NOT REPLY [Bug 46053] Evaluation cache dependency analysis broken
when changing blank values
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46053
--- Comment #2 from Josh Micich <jo...@gildedtree.com> 2008-11-03 11:36:02 PST ---
(In reply to comment #1)
> Fixed in svn r706722 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=706722 )
>
oops - actually it was svn r706772 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=706772 )
--
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