public class TempFileCommentsTable
extends org.apache.poi.ooxml.POIXMLDocumentPart
implements org.apache.poi.xssf.model.Comments, java.lang.AutoCloseable
The comments table contains all the necessary information for displaying the string: the text, formatting properties, and phonetic properties (for East Asian languages).
| Constructor and Description |
|---|
TempFileCommentsTable() |
TempFileCommentsTable(boolean encryptTempFiles) |
TempFileCommentsTable(boolean encryptTempFiles,
boolean fullFormat) |
TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles) |
TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles,
boolean fullFormat) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commentUpdated(org.apache.poi.xssf.usermodel.XSSFComment comment) |
protected void |
commit() |
org.apache.poi.xssf.usermodel.XSSFComment |
createNewComment(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor) |
int |
findAuthor(java.lang.String author) |
org.apache.poi.xssf.usermodel.XSSFComment |
findCellComment(org.apache.poi.ss.util.CellAddress cellAddress) |
java.lang.String |
getAuthor(long authorId) |
java.util.Iterator<org.apache.poi.ss.util.CellAddress> |
getCellAddresses() |
int |
getNumberOfAuthors() |
int |
getNumberOfComments() |
boolean |
isIgnoreDrawing() |
void |
readFrom(java.io.InputStream is)
Read this comments table from an XML file.
|
void |
referenceUpdated(org.apache.poi.ss.util.CellAddress oldReference,
org.apache.poi.xssf.usermodel.XSSFComment comment) |
boolean |
removeComment(org.apache.poi.ss.util.CellAddress cellRef) |
void |
setIgnoreDrawing(boolean ignoreDrawing) |
void |
setSheet(org.apache.poi.ss.usermodel.Sheet sheet) |
void |
writeTo(java.io.OutputStream out)
Write this table out as XML.
|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommitted, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommitted, toStringpublic TempFileCommentsTable()
public TempFileCommentsTable(boolean encryptTempFiles)
public TempFileCommentsTable(boolean encryptTempFiles,
boolean fullFormat)
public TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles)
throws java.io.IOException
java.io.IOExceptionpublic TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles,
boolean fullFormat)
throws java.io.IOException
java.io.IOExceptionpublic void setIgnoreDrawing(boolean ignoreDrawing)
ignoreDrawing - set to true if you don't need the drawing/shape data on the comments
(default is false) - ignoring the drawing/shape data can save memorypublic boolean isIgnoreDrawing()
@Internal public void setSheet(org.apache.poi.ss.usermodel.Sheet sheet)
setSheet in interface org.apache.poi.xssf.model.Commentsprotected void commit()
throws java.io.IOException
commit in class org.apache.poi.ooxml.POIXMLDocumentPartjava.io.IOExceptionpublic void readFrom(java.io.InputStream is)
throws java.io.IOException
is - The input stream containing the XML document.java.io.IOException - if an error occurs while reading.public int getNumberOfComments()
getNumberOfComments in interface org.apache.poi.xssf.model.Commentspublic int getNumberOfAuthors()
getNumberOfAuthors in interface org.apache.poi.xssf.model.Commentspublic java.lang.String getAuthor(long authorId)
getAuthor in interface org.apache.poi.xssf.model.Commentspublic int findAuthor(java.lang.String author)
findAuthor in interface org.apache.poi.xssf.model.Commentspublic org.apache.poi.xssf.usermodel.XSSFComment findCellComment(org.apache.poi.ss.util.CellAddress cellAddress)
findCellComment in interface org.apache.poi.xssf.model.Commentspublic boolean removeComment(org.apache.poi.ss.util.CellAddress cellRef)
removeComment in interface org.apache.poi.xssf.model.Commentspublic java.util.Iterator<org.apache.poi.ss.util.CellAddress> getCellAddresses()
getCellAddresses in interface org.apache.poi.xssf.model.Commentspublic org.apache.poi.xssf.usermodel.XSSFComment createNewComment(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor)
createNewComment in interface org.apache.poi.xssf.model.Commentspublic void referenceUpdated(org.apache.poi.ss.util.CellAddress oldReference,
org.apache.poi.xssf.usermodel.XSSFComment comment)
referenceUpdated in interface org.apache.poi.xssf.model.Commentspublic void commentUpdated(org.apache.poi.xssf.usermodel.XSSFComment comment)
commentUpdated in interface org.apache.poi.xssf.model.Commentspublic void close()
close in interface java.lang.AutoCloseablepublic void writeTo(java.io.OutputStream out)
throws java.io.IOException
out - The stream to write to.java.io.IOException - if an error occurs while writing.