ASF Bugzilla – Attachment 25138 Details for
Bug 48926
[Patch] HWPF: added a convenience class for the revision mark authors table (sttbfrmark)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff
diff.txt (text/plain), 3.38 KB, created by
Ryan Lauck
on 2010-03-16 23:14:08 UTC
(
hide
)
Description:
svn diff
Filename:
MIME Type:
Creator:
Ryan Lauck
Created:
2010-03-16 23:14:08 UTC
Size:
3.38 KB
patch
obsolete
>Index: src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java (revision 924006) >+++ src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java (working copy) >@@ -68,6 +68,7 @@ > fieldSet.add(Integer.valueOf(FIBFieldHandler.PLFLFO)); > fieldSet.add(Integer.valueOf(FIBFieldHandler.PLCFFLDMOM)); > fieldSet.add(Integer.valueOf(FIBFieldHandler.STTBFFFN)); >+ fieldSet.add(Integer.valueOf(FIBFieldHandler.STTBFRMARK)); > fieldSet.add(Integer.valueOf(FIBFieldHandler.STTBSAVEDBY)); > fieldSet.add(Integer.valueOf(FIBFieldHandler.MODIFIED)); > >@@ -258,7 +259,27 @@ > { > _fieldHandler.setFieldSize(FIBFieldHandler.STTBFFFN, lcbSttbFffn); > } >+ >+ public int getFcSttbfRMark() >+ { >+ return _fieldHandler.getFieldOffset(FIBFieldHandler.STTBFRMARK); >+ } > >+ public int getLcbSttbfRMark() >+ { >+ return _fieldHandler.getFieldSize(FIBFieldHandler.STTBFRMARK); >+ } >+ >+ public void setFcSttbfRMark(int fcSttbfRMark) >+ { >+ _fieldHandler.setFieldOffset(FIBFieldHandler.STTBFRMARK, fcSttbfRMark); >+ } >+ >+ public void setLcbSttbfRMark(int lcbSttbfRMark) >+ { >+ _fieldHandler.setFieldSize(FIBFieldHandler.STTBFRMARK, lcbSttbfRMark); >+ } >+ > /** > * Return the offset to the PlcfHdd, in the table stream, > * i.e. fcPlcfHdd >Index: src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java (revision 924006) >+++ src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java (working copy) >@@ -92,6 +92,9 @@ > > /** Holds the save history for this document. */ > protected SavedByTable _sbt; >+ >+ /** Holds the revision mark authors for this document. */ >+ protected RevisionMarkAuthorTable _rmat; > > /** Holds pictures table */ > protected PicturesTable _pictures; >@@ -274,6 +277,13 @@ > _sbt = new SavedByTable(_tableStream, sbtOffset, sbtLength); > } > >+ int rmarkOffset = _fib.getFcSttbfRMark(); >+ int rmarkLength = _fib.getLcbSttbfRMark(); >+ if (rmarkOffset != 0 && rmarkLength != 0) >+ { >+ _rmat = new RevisionMarkAuthorTable(_tableStream, rmarkOffset, rmarkLength); >+ } >+ > PlexOfCps plc = new PlexOfCps(_tableStream, _fib.getFcPlcffldMom(), _fib.getLcbPlcffldMom(), 2); > for (int x = 0; x < plc.length(); x++) > { >@@ -412,6 +422,16 @@ > } > > /** >+ * Gets a reference to the revision mark author table, which holds the revision mark authors for the document. >+ * >+ * @return the saved-by table. >+ */ >+ public RevisionMarkAuthorTable getRevisionMarkAuthorTable() >+ { >+ return _rmat; >+ } >+ >+ /** > * @return PicturesTable object, that is able to extract images from this document > */ > public PicturesTable getPicturesTable() { >@@ -514,7 +534,17 @@ > > tableOffset = tableStream.getOffset(); > } >+ >+ // write out the revision mark authors table. >+ if (_rmat != null) >+ { >+ _fib.setFcSttbfRMark(tableOffset); >+ _rmat.writeTo(tableStream); >+ _fib.setLcbSttbfRMark(tableStream.getOffset() - tableOffset); > >+ tableOffset = tableStream.getOffset(); >+ } >+ > // write out the FontTable. > _fib.setFcSttbfffn(tableOffset); > _ft.writeTo(docSys);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48926
: 25138 |
25139
|
25486