You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ma...@apache.org on 2010/09/27 15:08:57 UTC
svn commit: r1001726 - in /poi/trunk/src/scratchpad:
src/org/apache/poi/hwpf/model/OldSectionTable.java
testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java
Author: maxcom
Date: Mon Sep 27 13:08:57 2010
New Revision: 1001726
URL: http://svn.apache.org/viewvc?rev=1001726&view=rev
Log:
revert previous commit because it causes problems with other old .docs
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java
Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java?rev=1001726&r1=1001725&r2=1001726&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java Mon Sep 27 13:08:57 2010
@@ -60,8 +60,8 @@ public final class OldSectionTable exten
// section properties, and we're trying to decode them as if they
// were the new ones, we sometimes "need" more data than we have.
// As a workaround, have a few extra 0 bytes on the end!
- byte[] buf = new byte[sepxSize+4];
- fileOffset += 4;
+ byte[] buf = new byte[sepxSize+2];
+ fileOffset += LittleEndian.SHORT_SIZE;
System.arraycopy(documentStream, fileOffset, buf, 0, buf.length);
_sections.add(new SEPX(sed, startAt, endAt, charConv, buf));
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java?rev=1001726&r1=1001725&r2=1001726&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java Mon Sep 27 13:08:57 2010
@@ -273,17 +273,7 @@ public final class TestWordExtractor ext
assertEquals("\r\n", tp[5]);
assertEquals("Last (4th) paragraph.\r\n", tp[6]);
}
-
- public void testWord95err() throws Exception {
- // Can work with the special one
- Word6Extractor w6e = new Word6Extractor(
- POIDataSamples.getDocumentInstance().openResourceAsStream("word95err.doc")
- );
- String text = w6e.getText();
-
- assertTrue(text.contains("subject"));
- }
-
+
public void testWord6() throws Exception {
// Too old for the default
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org