From 5d461efea2370f7301401da54219617a29637a48 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Wed, 26 May 2010 15:22:04 +0000 Subject: [PATCH] Add disabled unit test for bug #48539, which is currently still broken git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@948477 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/xssf/usermodel/TestXSSFBugs.java | 31 ++++++++++++++++++ test-data/spreadsheet/48539.xlsx | Bin 0 -> 13122 bytes 2 files changed, 31 insertions(+) create mode 100644 test-data/spreadsheet/48539.xlsx diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index ea2c8fd59..a5f19b3db 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -17,6 +17,7 @@ package org.apache.poi.xssf.usermodel; +import java.awt.peer.SystemTrayPeer; import java.util.List; import org.apache.poi.POIXMLDocumentPart; @@ -24,7 +25,10 @@ import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackagingURIHelper; import org.apache.poi.ss.usermodel.BaseTestBugzillaIssues; +import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Name; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.xssf.XSSFITestDataProvider; import org.apache.poi.xssf.XSSFTestDataSamples; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet; @@ -193,4 +197,31 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { assertEquals("Sheet1", test.getSheetName()); assertEquals(-1, test.getSheetIndex()); } + + /** + * Problem with evaluation formulas due to + * NameXPtgs. + * Blows up on: + * IF(B6= (ROUNDUP(B6,0) + ROUNDDOWN(B6,0))/2, MROUND(B6,2),ROUND(B6,0)) + */ + public void DISABLEDtest48539() throws Exception { + XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("48539.xlsx"); + assertEquals(3, wb.getNumberOfSheets()); + + // Try each cell individually + XSSFFormulaEvaluator eval = new XSSFFormulaEvaluator(wb); + for(int i=0; i zB^@2W77k!z4KF7PS3_1$dpnB!c^HOV04((W|9$-r^T3GavQig2Zad!*>8lkYt??eh z?n8-FHQ+Q-$zC82*nY}Y%F|~o42#D#BnHhLbji>7! zHmq+a(Rh%&L`aO}NreK7VP*(HoY`H9ZGuDlTE0GSH$QqOE<3EeD@Dx%fwh=Gc`jc+ zvL%V9e=J9QeCpFX{;Usv$OJ_!b=d6vNP2c)L~LF{@)7lGrCG7_0vzFzs3)64av-GY zOVX{~ytD|!-Ex`B*H|`t03Y?+(-xRz&c>eCoolAE?WpM|gGGosixH&g%L{H+$JmqW zEFrx$>ZL7|RVios%l5!dmeUjosX>f6eZVxSeJ47Vqy!aO%gEw~CK%fT;8MOF>rNZb zja@9MzcwO^0P9_3+?{$8ef%pM-SbayzW$lhNLAT!(z%kFj;ulr5SIOHZ`-X?`@vf0 zO@RZaABSe8IO$gFKw;4|EJce|}Qr5B+b%{*Q^&n4~eKZg%v(1KC!|&FgOtvdDRb zEsC-&lp186H2dWBv2SU_ew>HE1<9K&O`PwHiR!QHZ`){)lYrQix|Yxcx+NB&OQSD|W`71u3sVbJr#BqoawMQ*Nk1+@#95Xh*v)g^BE{L#Eaf z$xliwKBa64hjoytun5gSULYg+AeD(+30=N#?N86w4)W4_?|C9RA zd;kA_wWf^8_poF29RwXF{7%r4aq4Ari$!drzqY`HS*!gu`r*ho#UiG zIri&NOq2UYBs;1V#8Hw=fgZ@FEP82XLS$ZaOOe8V@n;XXxn zj(YgSDirK^QSqK>$LGhi>APL*3pgY0K*GsM)5~o`LWIm_E(JEorwY`Ka9%|t-+Jyo zh4V(+#cTF4{-$_J@;Og(-*ZY_(LYivXbRx&0HsSLbQ;Bk-T|f7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