mirror of https://github.com/apache/poi.git
Apply some IDE suggestions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885068 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
695bea4e68
commit
fcf123fc5b
|
@ -213,7 +213,6 @@ implements Slide<XSLFShape,XSLFTextParagraph> {
|
||||||
final XSLFComments xComments = getCommentsPart();
|
final XSLFComments xComments = getCommentsPart();
|
||||||
final XSLFCommentAuthors xAuthors = getCommentAuthorsPart();
|
final XSLFCommentAuthors xAuthors = getCommentAuthorsPart();
|
||||||
if (xComments != null) {
|
if (xComments != null) {
|
||||||
//noinspection deprecation
|
|
||||||
for (final CTComment xc : xComments.getCTCommentsList().getCmArray()) {
|
for (final CTComment xc : xComments.getCTCommentsList().getCmArray()) {
|
||||||
comments.add(new XSLFComment(xc, xAuthors));
|
comments.add(new XSLFComment(xc, xAuthors));
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,11 +61,11 @@ import org.openxmlformats.schemas.presentationml.x2006.main.SldMasterDocument;
|
||||||
*/
|
*/
|
||||||
public class XSLFSlideShow extends POIXMLDocument {
|
public class XSLFSlideShow extends POIXMLDocument {
|
||||||
|
|
||||||
private PresentationDocument presentationDoc;
|
private final PresentationDocument presentationDoc;
|
||||||
/**
|
/**
|
||||||
* The embedded OLE2 files in the OPC package
|
* The embedded OLE2 files in the OPC package
|
||||||
*/
|
*/
|
||||||
private List<PackagePart> embedds;
|
private final List<PackagePart> embedds;
|
||||||
|
|
||||||
public XSLFSlideShow(OPCPackage container) throws OpenXML4JException, IOException, XmlException {
|
public XSLFSlideShow(OPCPackage container) throws OpenXML4JException, IOException, XmlException {
|
||||||
super(container);
|
super(container);
|
||||||
|
|
|
@ -184,7 +184,6 @@ public class StylesTable extends POIXMLDocumentPart implements Styles {
|
||||||
* @param is The input stream containing the XML document.
|
* @param is The input stream containing the XML document.
|
||||||
* @throws IOException if an error occurs while reading.
|
* @throws IOException if an error occurs while reading.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public void readFrom(InputStream is) throws IOException {
|
public void readFrom(InputStream is) throws IOException {
|
||||||
try {
|
try {
|
||||||
doc = StyleSheetDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
|
doc = StyleSheetDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
|
||||||
|
|
|
@ -975,12 +975,12 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
||||||
*
|
*
|
||||||
* @param font a font object created or retrieved from the XSSFWorkbook object
|
* @param font a font object created or retrieved from the XSSFWorkbook object
|
||||||
* @see org.apache.poi.xssf.usermodel.XSSFWorkbook#createFont()
|
* @see org.apache.poi.xssf.usermodel.XSSFWorkbook#createFont()
|
||||||
* @see org.apache.poi.xssf.usermodel.XSSFWorkbook#getFontAt(short)
|
* @see org.apache.poi.xssf.usermodel.XSSFWorkbook#getFontAt(int)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setFont(Font font) {
|
public void setFont(Font font) {
|
||||||
if(font != null){
|
if(font != null){
|
||||||
long index = font.getIndexAsInt();
|
long index = font.getIndex();
|
||||||
this._cellXf.setFontId(index);
|
this._cellXf.setFontId(index);
|
||||||
this._cellXf.setApplyFont(true);
|
this._cellXf.setApplyFont(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1170,7 +1170,7 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
||||||
* Set whether the text should be wrapped.
|
* Set whether the text should be wrapped.
|
||||||
* <p>
|
* <p>
|
||||||
* Setting this flag to <code>true</code> make all content visible
|
* Setting this flag to <code>true</code> make all content visible
|
||||||
* whithin a cell by displaying it on multiple lines
|
* within a cell by displaying it on multiple lines
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param wrapped a boolean value indicating if the text in a cell should be line-wrapped within the cell.
|
* @param wrapped a boolean value indicating if the text in a cell should be line-wrapped within the cell.
|
||||||
|
@ -1277,7 +1277,7 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o){
|
public boolean equals(Object o){
|
||||||
if(o == null || !(o instanceof XSSFCellStyle)) return false;
|
if(!(o instanceof XSSFCellStyle)) return false;
|
||||||
|
|
||||||
XSSFCellStyle cf = (XSSFCellStyle)o;
|
XSSFCellStyle cf = (XSSFCellStyle)o;
|
||||||
return _cellXf.toString().equals(cf.getCoreXf().toString());
|
return _cellXf.toString().equals(cf.getCoreXf().toString());
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class XSSFCellAlignment {
|
||||||
/**
|
/**
|
||||||
* Creates a Cell Alignment from the supplied XML definition
|
* Creates a Cell Alignment from the supplied XML definition
|
||||||
*
|
*
|
||||||
* @param cellAlignment
|
* @param cellAlignment The low-level XML definition of the cell alignment
|
||||||
*/
|
*/
|
||||||
public XSSFCellAlignment(CTCellAlignment cellAlignment) {
|
public XSSFCellAlignment(CTCellAlignment cellAlignment) {
|
||||||
this.cellAlignement = cellAlignment;
|
this.cellAlignement = cellAlignment;
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class OOXMLLiteAgent {
|
||||||
// TODO: check if this is atomic ... as transform() is probably called synchronized, it doesn't matter anyway
|
// TODO: check if this is atomic ... as transform() is probably called synchronized, it doesn't matter anyway
|
||||||
Files.write(path, (item+"\n").getBytes(StandardCharsets.ISO_8859_1), StandardOpenOption.CREATE, StandardOpenOption.APPEND);
|
Files.write(path, (item+"\n").getBytes(StandardCharsets.ISO_8859_1), StandardOpenOption.CREATE, StandardOpenOption.APPEND);
|
||||||
hashes.add(item.hashCode());
|
hashes.add(item.hashCode());
|
||||||
} catch (IOException ignroed) {
|
} catch (IOException ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue