From 39b3dcae639cf5920a3579119dfeb4a12fb94f5b Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Mon, 29 Dec 2008 16:51:30 +0000 Subject: [PATCH] continue cleanup of bugzilla, added unit test for #27394, #27364, #300#30070 and #31661 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@729943 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/data/27364.xls | Bin 0 -> 13824 bytes .../org/apache/poi/hssf/data/27394.xls | Bin 0 -> 15360 bytes .../org/apache/poi/hssf/data/30070.xls | Bin 0 -> 27648 bytes .../org/apache/poi/hssf/data/31661.xls | Bin 0 -> 15360 bytes .../apache/poi/hssf/usermodel/TestBugs.java | 75 +++++++++++++++++- 5 files changed, 71 insertions(+), 4 deletions(-) create mode 100755 src/testcases/org/apache/poi/hssf/data/27364.xls create mode 100755 src/testcases/org/apache/poi/hssf/data/27394.xls create mode 100755 src/testcases/org/apache/poi/hssf/data/30070.xls create mode 100755 src/testcases/org/apache/poi/hssf/data/31661.xls diff --git a/src/testcases/org/apache/poi/hssf/data/27364.xls b/src/testcases/org/apache/poi/hssf/data/27364.xls new file mode 100755 index 0000000000000000000000000000000000000000..73aa3fa2f16dd0ce391d8939adf7ac976a2ca259 GIT binary patch literal 13824 zcmeHOU2IfE6h3$N?sh9s+Cl*#te355DQ&Z~QHcb)F<>ZCs8kfBru1hi4VBexQ6wfT z79LD6VtCL85<;Sh#soAfJm5ncec^#9#>SucP<-&oXfT>c0<7P6?%w^W-CB$iC39}h z%-l2QoSFG%?$4RM`}t=TvFc*Ug%K3}BA3M{@7beBMZO1j$TKoiWP7|Xk#rtO92iJE=lt9BkoKX= zVjo7Z@K#$vu^{uy38ZCMhpeg8bdIKHRQF>|SEFX!3d^D;`zlvLPhh*v7gN1gG>vFl zhSZXCYV)m1R){0tK|g))7?-<0bs%Kbr<>A_MAIKe&qY6po{8RSo&A5&pRm0^0y0M= z(h;eytFDf&LZPExi(z{)u3=o6*}5HD;=NDh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WFE1?lV?BVYBLqI9rwdL^fFTC!<-U-^Z=*+*V!8QwousR<)?` zZ?=MXT$Uli0v=Y7WlaCdWd$4HXL`%xvETB4G}x~(hVTd|p4n%Z{zdxyYT#1@sHhm{ zU~F4rzc{|@o>L#K*;4$#oiUm-`_Y#hLEC`Le!}mok=aL>j(t6>F694!*5R9d>dz?1 zCnq?T*#A6$M-j&clKtZUApCR5znlEz554&Oi^C05iih?>{<@DIVmS{Xv&<|%%gcv% z)*@p%O;;hatk)rrN8W$@DlT!;JDu>;2r zi-LUf%iE6Ka_nvzWxi*9F~<6yzO6TGNhDG?@K%PXim&XXp@)VM#@R#F|K9LvgjJpG zeLXkyBvbmDWU{k8pV|6tgAM~>p+HJ_pA z3sNv(nKR`d5H@hJvzfo}F%j`sbS9GvFxTKs54cFf73_Tt3+RJ|2frLx6<-uQ%QWyW DMP%R~ literal 0 HcmV?d00001 diff --git a/src/testcases/org/apache/poi/hssf/data/30070.xls b/src/testcases/org/apache/poi/hssf/data/30070.xls new file mode 100755 index 0000000000000000000000000000000000000000..5ae66858314fe7c467bbc8055bdfe90e82b1e40b GIT binary patch literal 27648 zcmeHQ3wT?_m7aSo+lpf+cHS=%#ZE#VwvlAV*ns1QY{vmR4tbDJOcU9b6BEaBZ5hHN zL{4B!fp%#^p@ozJE&H*hEfiQvDbT=n>9QMGx`h_l($c2v2YoDscE4^}i1ze<^zPj<3)Asj#IrB1@czO%gd4yoP&%Ooc+s z$Bhm+5sSqXQV86BnEs43@E&BHhsMhSxB%Gzws|hV4VVPT155_w0}23B08;@l0Z{~) z2AB?*0hkGx1(*$(1DFe-eJsVb9B>L?Az%@}16T|w29yAn0G0vD0H*?$16BZ50#*S^ z0jB{f0Ho=~)d%ncDh(X*AEwMTuu+8Z7eQMzive7R#HG+==4loz#^gp{;BoU)h@=TaZif&nNv;NjRin|pv zv3oZ>vRQZbTgUY4kmT=K^tilQ^GtF>@|ue0w{%ogCkVsI4Zd#iLY*E;iWEww$07XLTE-uH|95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^SNg85$n`hNhQ2tw)r literal 0 HcmV?d00001 diff --git a/src/testcases/org/apache/poi/hssf/data/31661.xls b/src/testcases/org/apache/poi/hssf/data/31661.xls new file mode 100755 index 0000000000000000000000000000000000000000..79050b4325e88b08488e3d6086c0dc74037b2edf GIT binary patch literal 15360 zcmeHO3tW^{7C-XTy$6Mmu9P(rp}&oXU1U&TH9a!e!IWE`*C0Ap8LP& zJKuerd%4qcq*wd4UGj6##YKSx?in4yz7t)9>4BEK2Vl9;NLfqljcFta?*B*wjxzj^ z_I7a0tJ$HkP73xCfO8;*ozi*?0sf9Y6_$Vtz#KkPqvhf>1=*S>xZm21XEG>7Btso` zyhu!mpd6`gFn~$s$->?&e4Fv@XJI6GVjX~#QF*=*EG2>z@i@k}j)i_Kbi+^tdsv+| zMtKZbHt#Ot}V;XjoAT)Um>ifyIx zkq!hq=nvpG#Ls_(zrP|a@R8I2OC~kYN9v1X7)PyzgyoOVD{OHv zPf!nm4E(xsbwM+;hC>j90Hl#9L7YW0b2c@A5mEymF%$eo`k`ED0prrJm0$?O2dj3j z7sPe06vWxoh=vg`*0wRz8`!qTMC;UKbhNe6Fc^+s*xIP2{{40>m08o)n(fesb%q;k zCS*wr{^CM(>O_owU7-IOdLS)|fU_tQ;}WS!|5DU5(tofNS?H1;=ng&5?RucQ^*|SQ zOE-OYl;@1CJTz@EIlIsSoVvxK+Khj{Wf?ZTmmSiX9s-DioQaN8ceiv}!@J|RLn@<> zAPjOP(o(S$JPZf5owOoQyr{}e6LCQYi4iSr`J4B{M4LIzA%+Em%ayvwWk<$(P!Q=#P zd|rAcuMb|DtwZn#MZ}ok(WA#Gh?RQoTyO=EhgYE3TI;rby{ZiYsi zqa+HK%&QjVYO*z%`B*qj2JqO@C48=qr#DLEwK`31E}xCyNy==cR?X|UVccwGCa*)z zB(*AwOH}4#8%ezO3AKu+9NIUGH=moXU&L#P&s-I)iCIdOso9~NI+u%A^Lf2cB#sMF zC`NOMS`Ep~r{gC~Nl7uH`5}X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R~jwvU1_v@b)~s>q1{ExmEKm49)NNZ%zHDMNNkTeG3HEk38rW^K7b3P z1U2g2>2WmkIN?r}Ry(Re)~TFnX*t@2c34*qLH?F93Fc@8GnGj(XRT+4IntyF#U68{ zYvQzLm_<>hGJA$eWyDF+$}zNXcE+?vJS(O>a#=AQ7-q2<)4>MQfnn0uqShTyVmUjV zp!OVWFdb|#WejtT8B=D1DPx%QwFy(kFwr_jtrA}3t>7k zO!}rIrz69(Xo*e)t?y1>Uk;UKOeY&m>I-tLZ^Cr4!KCkLLZKE&_f|}2hIzt_>1>1P z%rL39lAO*qn9eqs&i66x!3Q~==y-!18nhf*B*}MVFqgy^fhWn}jE@{GDig8`lcCKl z16f;EX*79I)kJ1-$|3Bi^4%+9}p{G4R?f<8s$D2oN zzfWg!bT;6DegS$q2UvujP9~S2r}KfO=;c$@LWbATYH_c-{Ul z99)otQ0c^hP-bhiS-M3$uh-$xm#H#Ff)g|#Xh6__paDSxf(8T)2pSMHAZS3)fS>_E z1HVTN(4Lxh&9p_P|LfDeDY^zica~_MPj`aoItcy7kM{1gkEfefbW?`*`gjqV-Dsk6 z%PnHsqtm&77y1F{>HZ3p-$hTc;Qn_sFca@@Yw+eZhqt~ literal 0 HcmV?d00001 diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index 1766199e4..040d3cfae 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -17,10 +17,7 @@ package org.apache.poi.hssf.usermodel; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; +import java.io.*; import java.util.Iterator; import java.util.List; @@ -1575,4 +1572,74 @@ public final class TestBugs extends TestCase { assertEquals(len, c.getRichStringCellValue().length()); } } + + /** + * In POI-2.5 user reported exception when parsing a name with a custom VBA function: + * =MY_VBA_FUNCTION("lskdjflsk") + */ + public void test30070() { + HSSFWorkbook wb = openSample("30070.xls"); //contains custom VBA function 'Commission' + HSSFSheet sh = wb.getSheetAt(0); + HSSFCell cell = sh.getRow(0).getCell(1); + + //B1 uses VBA in the formula + assertEquals("Commission(A1)", cell.getCellFormula()); + + //name sales_1 refers to Commission(Sheet0!$A$1) + int idx = wb.getNameIndex("sales_1"); + assertTrue(idx != -1); + + HSSFName name = wb.getNameAt(idx); + assertEquals("Commission(Sheet0!$A$1)", name.getRefersToFormula()); + + } + + /** + * The link formulas which is referring to other books cannot be taken (the bug existed prior to POI-3.2) + * Expected: + * + * [link_sub.xls]Sheet1!$A$1 + * [link_sub.xls]Sheet1!$A$2 + * [link_sub.xls]Sheet1!$A$3 + * + * POI-3.1 output: + * + * Sheet1!$A$1 + * Sheet1!$A$2 + * Sheet1!$A$3 + * + */ + public void test27364() { + HSSFWorkbook wb = openSample("27364.xls"); + HSSFSheet sheet = wb.getSheetAt(0); + + assertEquals("[link_sub.xls]Sheet1!$A$1", sheet.getRow(0).getCell(0).getCellFormula()); + assertEquals("[link_sub.xls]Sheet1!$A$2", sheet.getRow(1).getCell(0).getCellFormula()); + assertEquals("[link_sub.xls]Sheet1!$A$3", sheet.getRow(2).getCell(0).getCellFormula()); + } + + /** + * Similar to bug#27364: + * HSSFCell.getCellFormula() fails with references to external workbooks + */ + public void test31661() { + HSSFWorkbook wb = openSample("31661.xls"); + HSSFSheet sheet = wb.getSheetAt(0); + HSSFCell cell = sheet.getRow(11).getCell(10); //K11 + assertEquals("+'[GM Budget.xls]8085.4450'!$B$2", cell.getCellFormula()); + } + + /** + * Incorrect handling of non-ISO 8859-1 characters in Windows ANSII Code Page 1252 + */ + public void test27394() { + HSSFWorkbook wb = openSample("27394.xls"); + assertEquals("\u0161\u017E", wb.getSheetName(0)); + assertEquals("\u0161\u017E\u010D\u0148\u0159", wb.getSheetName(1)); + HSSFSheet sheet = wb.getSheetAt(0); + + assertEquals("\u0161\u017E", sheet.getRow(0).getCell(0).getStringCellValue()); + assertEquals("\u0161\u017E\u010D\u0148\u0159", sheet.getRow(1).getCell(0).getStringCellValue()); + } + }