diff options
author | Yegor Kozlov <yegor@apache.org> | 2009-08-20 13:49:33 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2009-08-20 13:49:33 +0000 |
commit | 4d835fbda786d067fe4516bb7225bbc32b126b51 (patch) | |
tree | 4e19a7d528a45637341f3239e62ee5d9fa10bb5d /src/testcases/org/apache/poi/hpsf | |
parent | f0ebb76204bd6b120f76a2d27108f4afe0c44efa (diff) | |
download | poi-4d835fbda786d067fe4516bb7225bbc32b126b51.tar.gz poi-4d835fbda786d067fe4516bb7225bbc32b126b51.zip |
Avoid exception when reading ClipboardData packet in OLE property sets, see bugzilla 45583
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@806172 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hpsf')
-rw-r--r-- | src/testcases/org/apache/poi/hpsf/extractor/TestHPSFPropertiesExtractor.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hpsf/extractor/TestHPSFPropertiesExtractor.java b/src/testcases/org/apache/poi/hpsf/extractor/TestHPSFPropertiesExtractor.java index e05cbc6bad..2bdc3c08d2 100644 --- a/src/testcases/org/apache/poi/hpsf/extractor/TestHPSFPropertiesExtractor.java +++ b/src/testcases/org/apache/poi/hpsf/extractor/TestHPSFPropertiesExtractor.java @@ -25,6 +25,7 @@ import junit.framework.TestCase; import org.apache.poi.hssf.extractor.ExcelExtractor; import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.HSSFTestDataSamples; import org.apache.poi.poifs.filesystem.POIFSFileSystem; public final class TestHPSFPropertiesExtractor extends TestCase { @@ -117,4 +118,13 @@ public final class TestHPSFPropertiesExtractor extends TestCase { assertTrue(fsText.indexOf("AUTHOR = marshall") > -1); assertTrue(fsText.indexOf("TITLE = Titel: \u00c4h") > -1); } + + public void test42726() throws Exception { + HPSFPropertiesExtractor ex = new HPSFPropertiesExtractor(HSSFTestDataSamples.openSampleWorkbook("42726.xls")); + String txt = ex.getText(); + assertTrue(txt.indexOf("PID_AUTHOR") != -1); + assertTrue(txt.indexOf("PID_EDITTIME") != -1); + assertTrue(txt.indexOf("PID_REVNUMBER") != -1); + assertTrue(txt.indexOf("PID_THUMBNAIL") != -1); + } } |