You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/07/15 14:37:34 UTC
DO NOT REPLY [Bug 47535] New: [PATCH] Exception on
WordExtractor.getFootnoteText
https://issues.apache.org/bugzilla/show_bug.cgi?id=47535
Summary: [PATCH] Exception on WordExtractor.getFootnoteText
Product: POI
Version: 3.5-dev
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: HWPF
AssignedTo: dev@poi.apache.org
ReportedBy: max.valjanski@gmail.com
getFootnoteText can fail with different exceptions caused by incorrect range
calculations for empty footnote block:
java.lang.ArrayIndexOutOfBoundsException: 60
at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:46)
at org.apache.poi.hwpf.sprm.SprmOperation.<init>(SprmOperation.java:54)
at org.apache.poi.hwpf.sprm.SprmIterator.next(SprmIterator.java:45)
at
org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor.uncompressPAP(ParagraphSprmUncompressor.java:58)
at org.apache.poi.hwpf.model.PAPX.getParagraphProperties(PAPX.java:130)
at org.apache.poi.hwpf.usermodel.Range.getParagraph(Range.java:819)
at
org.apache.poi.hwpf.extractor.WordExtractor.getParagraphText(WordExtractor.java:140)
at
org.apache.poi.hwpf.extractor.WordExtractor.getFootnoteText(WordExtractor.java:121)
or
java.lang.IllegalArgumentException: The end (1062) must not be before the start
(2029)
at org.apache.poi.hwpf.usermodel.Range.sanityCheckStartEnd(Range.java:244)
at org.apache.poi.hwpf.usermodel.Range.<init>(Range.java:178)
at org.apache.poi.hwpf.usermodel.Paragraph.<init>(Paragraph.java:98)
at org.apache.poi.hwpf.usermodel.Range.getParagraph(Range.java:827)
at
org.apache.poi.hwpf.extractor.WordExtractor.getParagraphText(WordExtractor.java:139)
at
org.apache.poi.hwpf.extractor.WordExtractor.getFootnoteText(WordExtractor.java:120)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47535] [PATCH] Exception on
WordExtractor.getFootnoteText
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47535
--- Comment #1 from Maxim Valyanskiy <ma...@gmail.com> 2009-07-15 05:41:29 PST ---
Patch does two things:
1) Adds footnote/endnote extraction to WordExtractor.getText(). This breaks
TestWordExtractor since POI test suite already contains file with this problem
2) Fixes bug in Range.findRange (this also fixes TestWordExtractor test case)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47535] [PATCH] Exception on
WordExtractor.getFootnoteText
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47535
--- Comment #2 from Maxim Valyanskiy <ma...@gmail.com> 2009-07-15 05:43:50 PST ---
Created an attachment (id=23987)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23987)
patch
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47535] [PATCH] Exception on
WordExtractor.getFootnoteText
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47535
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2009-07-18 03:03:56 PST ---
Patch applied in r795333 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=795333 )
Thanks,
Yegor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org