Bug 48926 - [Patch] HWPF: added a convenience class for the revision mark authors table (sttbfrmark)
Summary: [Patch] HWPF: added a convenience class for the revision mark authors table (...
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: 3.7-dev
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2010-03-16 23:14 UTC by Ryan Lauck
Modified: 2010-06-10 11:02 UTC (History)
1 user (show)

svn diff (3.38 KB, patch)
2010-03-16 23:14 UTC, Ryan Lauck
Details | Diff
RevisionMarkAuthorTable.java (1.85 KB, patch)
2010-03-16 23:14 UTC, Ryan Lauck
Details | Diff
Author table text case (75.00 KB, application/msword)
2010-05-26 11:16 UTC, Ryan Lauck

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Lauck 2010-03-16 23:14:08 UTC
Created attachment 25138 [details]
svn diff

Added a convenience class (RevisionMarkAuthorTable) that holds the table of revision mark author names from the SttbfRMark structure, along with methods to get the length and offset locations from FileInformationBlock and code to read/write/get in HWPFDocument.  

All revision marks/tracked changes in the document store a zero-based index into this table, examples include ParagraphProperties.getIbstPropRMark(), CharacterProperties.getIbstRMarkDel(), CharacterProperties.getIbstPropRMark(), etc.

I have not added any unit tests for this code, but it is in use in my own production code that extracts revision mark data and is tested against revision marks created in word 97 - 2007.
Comment 1 Ryan Lauck 2010-03-16 23:14:56 UTC
Created attachment 25139 [details]
Comment 2 Nick Burch 2010-05-26 10:23:34 UTC
Sorry for the delay in looking at this. Patch applied to svn in r948435.

Any chance you could upload a document which has lots of entries in the table? I've added a couple of simple unit tests, one for a document with no table, and one for a document with only a single entry. However, it'd be good to have a file with loads of entries to properly stress the code with!
Comment 3 Ryan Lauck 2010-05-26 11:16:31 UTC
Created attachment 25486 [details]
Author table text case

Thanks for taking a look at this Nick!

Heres a simple test case with at least 3 different authors in the table.  Also, one of the authors name is blank (from a copy of office not registered to a user?) as an additional test case.
Comment 4 Nick Burch 2010-06-10 11:02:37 UTC
Thanks for the extra document, new tests added