From ea9ed46b9a7c97148a550f11f87b59cc079af9e9 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sun, 31 Aug 2008 16:37:39 +0000 Subject: [PATCH] Start to support HPBF hyperlinks git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@690726 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/util/StringUtil.java | 2 +- .../poi/hpbf/model/qcbits/QCPLCBit.java | 91 +++++++++ .../org/apache/poi/hpbf/data/LinkAt0And10.pub | Bin 0 -> 64512 bytes .../org/apache/poi/hpbf/data/LinkAt10.pub | Bin 0 -> 64512 bytes .../poi/hpbf/data/LinkAt10And20And30.pub | Bin 0 -> 64512 bytes .../poi/hpbf/data/LinkAt10And20And30And40.pub | Bin 0 -> 64512 bytes .../apache/poi/hpbf/data/LinkAt10Longer.pub | Bin 0 -> 64512 bytes .../org/apache/poi/hpbf/data/LinkAt20.pub | Bin 0 -> 64512 bytes .../poi/hpbf/model/TestQuillContents.java | 187 ++++++++++++++++++ 9 files changed, 279 insertions(+), 1 deletion(-) create mode 100755 src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt0And10.pub create mode 100755 src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt10.pub create mode 100755 src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt10And20And30.pub create mode 100755 src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt10And20And30And40.pub create mode 100755 src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt10Longer.pub create mode 100755 src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt20.pub diff --git a/src/java/org/apache/poi/util/StringUtil.java b/src/java/org/apache/poi/util/StringUtil.java index 673b5246e1..957068a673 100644 --- a/src/java/org/apache/poi/util/StringUtil.java +++ b/src/java/org/apache/poi/util/StringUtil.java @@ -68,7 +68,7 @@ public class StringUtil { throw new ArrayIndexOutOfBoundsException("Illegal offset"); } if ((len < 0) || (((string.length - offset) / 2) < len)) { - throw new IllegalArgumentException("Illegal length"); + throw new IllegalArgumentException("Illegal length " + len); } try { diff --git a/src/scratchpad/src/org/apache/poi/hpbf/model/qcbits/QCPLCBit.java b/src/scratchpad/src/org/apache/poi/hpbf/model/qcbits/QCPLCBit.java index 92e936528a..a2eadc52d9 100644 --- a/src/scratchpad/src/org/apache/poi/hpbf/model/qcbits/QCPLCBit.java +++ b/src/scratchpad/src/org/apache/poi/hpbf/model/qcbits/QCPLCBit.java @@ -17,6 +17,7 @@ package org.apache.poi.hpbf.model.qcbits; import org.apache.poi.util.LittleEndian; +import org.apache.poi.util.StringUtil; /** @@ -168,8 +169,98 @@ public class QCPLCBit extends QCBit { * Type 12 holds hyperlinks, and is very complex. */ public static class Type12 extends QCPLCBit { + private String[] hyperlinks; + + private static final int oneStartsAt = 0x4c; + private static final int twoStartsAt = 0x68; + private static final int threePlusIncrement = 22; + private Type12(String thingType, String bitType, byte[] data) { super(thingType, bitType, data); + + // How many hyperlinks do we really have? + // (zero hyperlinks gets numberOfPLCs=1) + if(data.length == 0x34) { + hyperlinks = new String[0]; + } else { + hyperlinks = new String[numberOfPLCs]; + } + + // We have 4 bytes, then the start point of each + // hyperlink, then the end point of the text. + preData = new int[1+numberOfPLCs+1]; + for(int i=0; i= 2) { + until = twoStartsAt + (numberOfPLCs-2)*threePlusIncrement; + } + + plcValA = new long[(until-at)/2]; + plcValB = new long[0]; + for(int i=0; iBsW3{I`C#u>m6++Yn3~BU|zhSeAt)j4=*aHnJrwq=$YC z7>b4YQ{BWd(+qKD($-CwP9~x0G@VkWlc`nOnUX-#bcWEh(`nt5VVF!iBT|MYGp^O| zoV&Yk^`!Tt>)-*Jd!=*V*>mo>Ki@g`?%lilHOHjzV@CyFT%kz3%I zBqfPrVEFp-#KeRW5`i`8Q-r|(qOUfb=YSseeK~;NB9IFz29I=Wf)0Q_590Z9 zKYkB_Izfj(hd~d3x|yhy@DHGSyK$obwKBtZG|Xj>!*08Kxia+fe^f$@i@| zB#j(kNV_rm2QliyXq(5No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+o0aq(i0xl)#fUA?Kp|mOB>SboYHOQ=hYn0gmH%T%9H(BNc+!UD` zaA}zza8qSLz%|LDfD>7zkY0BNVTlhSm~4vhT%YKfrS%C!bP(fU#QCoC9UBWj=YhbPzCKfq ziF;AV&8&C4TUB0eC7>H~D*<_I?E)=bj(IuKYX`r#<9Axj&8_)hRb=pqV9b29!pCli zCmZ2j0rz|wISYCT^a|*8(BFf80=fj^mp~cNGSCJP_X#IJ+*!N=dJFVp(1#!&k+})9 z4|D=_2J|ZEUC>2P?YQq^xVrJJSvTICw&Sen7@{91dFp#T{_n$fNVpCraXP~{r~Ds^ z?ZWed1m5Yi)#fcgJ=OWGsVR^IC*Z+^PU2yaZtu4swN6B`FOVYvDOo zJN9inaTx1e@g~&DH&gnQtzGS$lXySPR?_xiw1+mgqJO@!a7>-f^{7bj@TQqoS&sh$ z^Dc&i!h%+Les~OhELQj3(C}4Vd?($77UDe~&b|1hWN%PA&;NQ*YCVwWJ2m#0PjO|a zcbC%U+s-Z(XI0px_MzuJ_+x+grDc!m2e!`W$2NFc_Y^M{;Gt>`#W*C9!WH|m@4iF{P`#PR(F=tEnT86K> zSZ*@vjecLr?>xKkRYbdr34O-87)5_VOg(Pq6w+8`^-1nMysCmaDWP(|@ZYm2hiyhNkLN zTCdWE`cY}Dn523`7IAlRG2W&0fTFhYKy9H}F~ra#+T5GkhkAk@w?@PpC9` bno-KAWJ&bS%jNuh_&?_b;?3*-)(ig&y|Fsv literal 0 HcmV?d00001 diff --git a/src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt10And20And30.pub b/src/scratchpad/testcases/org/apache/poi/hpbf/data/LinkAt10And20And30.pub new file mode 100755 index 0000000000000000000000000000000000000000..5f7f747d5b0bfe2c5faaaadf6eda47244869d703 GIT binary patch literal 64512 zcmeHN4R9URbw0cAN2~uQS+<|$zxA_?4H(!u9DWZD@)nKYSkt$yFV zyZctp(vz+O0VelK=k9su+;e}vbMD={clYoAuI~IF|9RtoNKv{;5^`~*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^y&4*VU16vxT1X~S&W zhdG}s8O{h%@@8eP{~u$A;OG}tTOb=i&JH!Jm&rzOwBh%A-GW0{P=?c`dde`&&DDq6?ieGjQsOn(*FfjwHWHFy(h}tN0PMa`dW5@UXsV*+KO`Fz;YEC@k#y|NmeA8AbHyMA!cpK9=>L z2bQdrmmdF&01UT~7$Z{QWIj5f*NRho&OCYza%37X^|+anNMo7Ri!onh_{(V`!(UF5 z8J=yGsnkv|go?>PMxaVzS!tG-j@!hyACLH@P!{o$Cd> uW4N&5c>}M7AcuK8H^cXj7Li5zL9+c{zy^e}NOu?*9j*Lr0|m literal 0 HcmV?d00001 diff --git a/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java b/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java index 0295fc5a06..1ba45813c3 100644 --- a/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java +++ b/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java @@ -244,4 +244,191 @@ public class TestQuillContents extends TestCase { assertEquals(0x000004, plc16.getPlcValA()[5]); assertEquals(0x000004, plc16.getPlcValB()[5]); } + + public void testNoHyperlinks() throws Exception { + File f = new File(dir, "SampleNewsletter.pub"); + HPBFDocument doc = new HPBFDocument( + new FileInputStream(f) + ); + + QuillContents qc = doc.getQuillContents(); + assertEquals(20, qc.getBits().length); + + Type12 plc18 = (Type12)qc.getBits()[18]; + + assertEquals(1, plc18.getNumberOfPLCs()); + assertEquals(0, plc18.getNumberOfHyperlinks()); + assertEquals(0, plc18.getTextStartAt(0)); + assertEquals(601, plc18.getAllTextEndAt()); + } + + public void testSimpleHyperlink() throws Exception { + File f; + HPBFDocument doc; + QuillContents qc; + Type12 hlBit; + + // Link at 10 + f = new File(dir, "LinkAt10.pub"); + doc = new HPBFDocument( + new FileInputStream(f) + ); + qc = doc.getQuillContents(); + + hlBit = (Type12)qc.getBits()[12]; + assertEquals(1, hlBit.getNumberOfPLCs()); + assertEquals(1, hlBit.getNumberOfHyperlinks()); + + assertEquals(10, hlBit.getTextStartAt(0)); + assertEquals(15, hlBit.getAllTextEndAt()); + assertEquals("http://poi.apache.org/", hlBit.getHyperlink(0)); + + // Longer link at 10 + f = new File(dir, "LinkAt10Longer.pub"); + doc = new HPBFDocument( + new FileInputStream(f) + ); + qc = doc.getQuillContents(); + + hlBit = (Type12)qc.getBits()[12]; + assertEquals(1, hlBit.getNumberOfPLCs()); + assertEquals(1, hlBit.getNumberOfHyperlinks()); + + assertEquals(10, hlBit.getTextStartAt(0)); + assertEquals(15, hlBit.getAllTextEndAt()); + assertEquals("http://poi.apache.org/hpbf/", hlBit.getHyperlink(0)); + + // Link at 20 + f = new File(dir, "LinkAt20.pub"); + doc = new HPBFDocument( + new FileInputStream(f) + ); + qc = doc.getQuillContents(); + + hlBit = (Type12)qc.getBits()[12]; + assertEquals(1, hlBit.getNumberOfPLCs()); + assertEquals(1, hlBit.getNumberOfHyperlinks()); + + assertEquals(20, hlBit.getTextStartAt(0)); + assertEquals(25, hlBit.getAllTextEndAt()); + assertEquals("http://poi.apache.org/", hlBit.getHyperlink(0)); + } + + public void testManyHyperlinks() throws Exception { + File f; + HPBFDocument doc; + QuillContents qc; + Type12 hlBit; + + // Link at 10 + f = new File(dir, "LinkAt10.pub"); + doc = new HPBFDocument( + new FileInputStream(f) + ); + qc = doc.getQuillContents(); + + hlBit = (Type12)qc.getBits()[12]; + assertEquals(1, hlBit.getNumberOfPLCs()); + assertEquals(1, hlBit.getNumberOfHyperlinks()); + + assertEquals(10, hlBit.getTextStartAt(0)); + assertEquals(15, hlBit.getAllTextEndAt()); + assertEquals("http://poi.apache.org/", hlBit.getHyperlink(0)); + + } + + public void testHyperlinkDifferentVersions() throws Exception { + File f; + HPBFDocument doc; + QuillContents qc; + Type12 hlBitA; + Type12 hlBitB; + + // Latest version + f = new File(dir, "Sample.pub"); + doc = new HPBFDocument( + new FileInputStream(f) + ); + qc = doc.getQuillContents(); + + hlBitA = (Type12)qc.getBits()[14]; + assertEquals(2, hlBitA.getNumberOfPLCs()); + assertEquals(2, hlBitA.getNumberOfHyperlinks()); + + assertEquals(25, hlBitA.getTextStartAt(0)); + assertEquals(72, hlBitA.getTextStartAt(1)); + assertEquals(87, hlBitA.getAllTextEndAt()); + assertEquals("http://poi.apache.org/", hlBitA.getHyperlink(0)); + assertEquals("C:\\Documents and Settings\\Nick\\My Documents\\Booleans.xlsx", hlBitA.getHyperlink(1)); + + hlBitB = (Type12)qc.getBits()[15]; + assertEquals(3, hlBitB.getNumberOfPLCs()); + assertEquals(3, hlBitB.getNumberOfHyperlinks()); + + assertEquals(27, hlBitB.getTextStartAt(0)); + assertEquals(37, hlBitB.getTextStartAt(1)); + assertEquals(54, hlBitB.getTextStartAt(2)); + assertEquals(75, hlBitB.getAllTextEndAt()); + assertEquals("", hlBitB.getHyperlink(0)); + assertEquals("mailto:dev@poi.apache.org?subject=HPBF", hlBitB.getHyperlink(1)); + assertEquals("mailto:dev@poi.apache.org?subject=HPBF", hlBitB.getHyperlink(2)); + + // 2000 version + f = new File(dir, "Sample2000.pub"); + doc = new HPBFDocument( + new FileInputStream(f) + ); + qc = doc.getQuillContents(); + + hlBitA = (Type12)qc.getBits()[13]; + assertEquals(2, hlBitA.getNumberOfPLCs()); + assertEquals(2, hlBitA.getNumberOfHyperlinks()); + + assertEquals(25, hlBitA.getTextStartAt(0)); + assertEquals(72, hlBitA.getTextStartAt(1)); + assertEquals(87, hlBitA.getAllTextEndAt()); + assertEquals("http://poi.apache.org/", hlBitA.getHyperlink(0)); + assertEquals("C:\\Documents and Settings\\Nick\\My Documents\\Booleans.xlsx", hlBitA.getHyperlink(1)); + + hlBitB = (Type12)qc.getBits()[14]; + assertEquals(3, hlBitB.getNumberOfPLCs()); + assertEquals(3, hlBitB.getNumberOfHyperlinks()); + + assertEquals(27, hlBitB.getTextStartAt(0)); + assertEquals(37, hlBitB.getTextStartAt(1)); + assertEquals(54, hlBitB.getTextStartAt(2)); + assertEquals(75, hlBitB.getAllTextEndAt()); + assertEquals("", hlBitB.getHyperlink(0)); + assertEquals("mailto:dev@poi.apache.org?subject=HPBF", hlBitB.getHyperlink(1)); + assertEquals("mailto:dev@poi.apache.org?subject=HPBF", hlBitB.getHyperlink(2)); + + // 98 version + f = new File(dir, "Sample98.pub"); + doc = new HPBFDocument( + new FileInputStream(f) + ); + qc = doc.getQuillContents(); + + hlBitA = (Type12)qc.getBits()[13]; + assertEquals(2, hlBitA.getNumberOfPLCs()); + assertEquals(2, hlBitA.getNumberOfHyperlinks()); + + assertEquals(25, hlBitA.getTextStartAt(0)); + assertEquals(72, hlBitA.getTextStartAt(1)); + assertEquals(87, hlBitA.getAllTextEndAt()); + assertEquals("http://poi.apache.org/", hlBitA.getHyperlink(0)); + assertEquals("C:\\Documents and Settings\\Nick\\My Documents\\Booleans.xlsx", hlBitA.getHyperlink(1)); + + hlBitB = (Type12)qc.getBits()[14]; + assertEquals(3, hlBitB.getNumberOfPLCs()); + assertEquals(3, hlBitB.getNumberOfHyperlinks()); + + assertEquals(27, hlBitB.getTextStartAt(0)); + assertEquals(37, hlBitB.getTextStartAt(1)); + assertEquals(54, hlBitB.getTextStartAt(2)); + assertEquals(75, hlBitB.getAllTextEndAt()); + assertEquals("", hlBitB.getHyperlink(0)); + assertEquals("mailto:dev@poi.apache.org?subject=HPBF", hlBitB.getHyperlink(1)); + assertEquals("mailto:dev@poi.apache.org?subject=HPBF", hlBitB.getHyperlink(2)); + } } -- 2.39.5