Bug 56998 - [PATCH] Patch to allow for proper list number formatting in HWPF
Summary: [PATCH] Patch to allow for proper list number formatting in HWPF
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 58839
  Show dependency tree
 
Reported: 2014-09-20 09:40 UTC by Moritz Dorka
Modified: 2016-01-12 20:26 UTC (History)
0 users



Attachments
Patch containing three new methods for list formatting (940 bytes, application/x-tar-gz)
2014-09-20 09:40 UTC, Moritz Dorka
Details
Added a unit test (4.09 KB, patch)
2015-04-27 17:19 UTC, Tim Allison
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Dorka 2014-09-20 09:40:39 UTC
Created attachment 32034 [details]
Patch containing three new methods for list formatting

Expose a few methods to allow for correct list number formatting as described in [MS-DOC], v20140721, 2.4.6.3 + 2.4.6.4
Comment 1 Dominik Stadler 2015-01-12 19:46:29 UTC
Any chance you could add a unit test which verifies the newly added methods with a pre-existing document so the code stays working in the future?
Comment 2 Moritz Dorka 2015-01-12 21:51:19 UTC
What do you mean by "pre-existing document"? A *.doc-file? I believe it is pretty much infeasible to trigger these methods from such a file in isolation.

TIKA has a pending feature request which depends on this patch (https://issues.apache.org/jira/browse/TIKA-1315) and includes a proper unit-test. Would you be ok with that?
Comment 3 Dominik Stadler 2015-01-12 22:17:09 UTC
Best would be a unit-test together with a simple .doc file which triggers the getters and expects the correct values to be returned by POI, e.g. something similar to one of the test-cases in https://svn.apache.org/repos/asf/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestLists.java
Comment 4 Tim Allison 2015-04-27 17:19:29 UTC
Created attachment 32691 [details]
Added a unit test

Hi Dominik,
  How does this look?  I added a unit test based on the test doc used in TestLists.
  If there are no objections, I'll commit.  Thank you!
Comment 5 Dominik Stadler 2015-04-27 19:19:03 UTC
Looks good!
Comment 6 Tim Allison 2015-04-28 15:18:26 UTC
Thank you, Moritz!

Fixed in r1676561