diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2021-04-14 22:53:33 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2021-04-14 22:53:33 +0000 |
commit | bb5d321b79193b98051f435621f5044842716c4e (patch) | |
tree | bec508518798239131c7cdf3825d4328a7d0e831 /poi-ooxml | |
parent | 7c67bba960e46433d8bf11674ef862153403cfdc (diff) | |
download | poi-bb5d321b79193b98051f435621f5044842716c4e.tar.gz poi-bb5d321b79193b98051f435621f5044842716c4e.zip |
fix javadocs - remove @author tags (http://apache-poi.1045710.n5.nabble.com/Javadocs-clean-up-remove-author-tags-tp5737663.html)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888780 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
128 files changed, 374 insertions, 648 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLException.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLException.java index d002fa0e84..58768db78c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLException.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLException.java @@ -18,13 +18,10 @@ package org.apache.poi.ooxml; /** * Indicates a generic OOXML error. - * - * @author Yegor Kozlov */ -@SuppressWarnings("serial") public final class POIXMLException extends RuntimeException{ /** - * Create a new <code>POIXMLException</code> with no + * Create a new {@code POIXMLException} with no * detail mesage. */ public POIXMLException() { @@ -32,8 +29,8 @@ public final class POIXMLException extends RuntimeException{ } /** - * Create a new <code>POIXMLException</code> with - * the <code>String</code> specified as an error message. + * Create a new {@code POIXMLException} with + * the {@code String} specified as an error message. * * @param msg The error message for the exception. */ @@ -42,12 +39,12 @@ public final class POIXMLException extends RuntimeException{ } /** - * Create a new <code>POIXMLException</code> with - * the <code>String</code> specified as an error message and the cause. + * Create a new {@code POIXMLException} with + * the {@code String} specified as an error message and the cause. * * @param msg The error message for the exception. * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A <tt>null</tt> value is + * {@link #getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) */ @@ -56,11 +53,11 @@ public final class POIXMLException extends RuntimeException{ } /** - * Create a new <code>POIXMLException</code> with + * Create a new {@code POIXMLException} with * the specified cause. * * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A <tt>null</tt> value is + * {@link #getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/POIXMLUnits.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/POIXMLUnits.java index d6e020bcc0..cc847cb2ab 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/POIXMLUnits.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/POIXMLUnits.java @@ -87,11 +87,11 @@ public class POIXMLUnits { } /** - * This type seems to be interpreted as percent value when the trailing percent sign is missing.<br/> + * This type seems to be interpreted as percent value when the trailing percent sign is missing.<p> * sample snippet from settings.xml - * <pre> - * <w:zoom w:percent="50" /> - * <pre> + * <pre>{@code + * <w:zoom w:percent="50" /> + * }</pre> * * @return the percent scaled by 1000, so 100% = 100000 */ @@ -100,11 +100,11 @@ public class POIXMLUnits { } /** - * This type seems to be interpreted as percent value when the trailing percent sign is missing.<br/> + * This type seems to be interpreted as percent value when the trailing percent sign is missing.<p> * sample snippet from settings.xml - * <pre> - * <w:textscale w:w="50" /> - * <pre> + * <pre>{@code + * <w:textscale w:w="50" /> + * }</pre> * * @return the percent scaled by 1000, so 100% = 100000 */ @@ -235,7 +235,7 @@ public class POIXMLUnits { private static long parseLengthInner(org.apache.xmlbeans.XmlAnySimpleType coordUnion, double noUnitEmuFactor) { String strVal = coordUnion.getStringValue().toLowerCase(Locale.ROOT); double digVal = Double.parseDouble(strVal.replaceAll("(mm|cm|in|pt|pc|pi)", "")); - long emu = 0; + long emu; // http://startbigthinksmall.wordpress.com/2010/01/04/points-inches-and-emus-measuring-units-in-office-open-xml/ if (strVal.endsWith("mm")) { emu = (long)(((digVal/10f)/2.54f)*EMU_PER_INCH); diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/exceptions/OpenXML4JRuntimeException.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/exceptions/OpenXML4JRuntimeException.java index 40086aa9fc..d8031b87a1 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/exceptions/OpenXML4JRuntimeException.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/exceptions/OpenXML4JRuntimeException.java @@ -22,7 +22,6 @@ package org.apache.poi.openxml4j.exceptions; * set as Runtime in order not to force the user to manage the exception in a * try/catch). * - * @author Julien Chable * @version 1.0 */ @SuppressWarnings("serial") diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/CertificateEmbeddingOption.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/CertificateEmbeddingOption.java index cd7b456941..9c95693d8e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/CertificateEmbeddingOption.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/CertificateEmbeddingOption.java @@ -19,8 +19,6 @@ package org.apache.poi.openxml4j.opc; /** * Specifies the location where the X.509 certificate that is used in signing is stored. - * - * @author Julien Chable */ public enum CertificateEmbeddingOption { /** The certificate is embedded in its own PackagePart. */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ContentTypes.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ContentTypes.java index 14c0f1b985..5442a5fb05 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ContentTypes.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ContentTypes.java @@ -22,8 +22,6 @@ import java.util.Locale; /** * Open Packaging Convention content types (see Annex F : Standard Namespaces * and Content Types). - * - * @author CDubettier define some constants, Julien Chable */ public final class ContentTypes { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java index 6e11336bf5..9c92fb5f3e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java @@ -602,7 +602,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable { * * @param partName * Part name of the part to retrieve. - * @return The part with the specified name, else <code>null</code>. + * @return The part with the specified name, else {@code null}. */ public PackagePart getPart(PackagePartName partName) { throwExceptionIfWriteOnly(); @@ -958,7 +958,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable { * part, then delete all relationships in the source part. * * @param part - * The part to remove. If <code>null</code>, skip the action. + * The part to remove. If {@code null}, skip the action. * @see #removePart(PackagePartName) */ public void removePart(PackagePart part) { @@ -1217,8 +1217,6 @@ public abstract class OPCPackage implements RelationshipSource, Closeable { * @param relationshipType * Type of relationship. * @return The newly created and added relationship - * @see RelationshipSource#addExternalRelationship(String, - * String) */ @Override public PackageRelationship addExternalRelationship(String target, @@ -1347,25 +1345,16 @@ public abstract class OPCPackage implements RelationshipSource, Closeable { } } - /** - * @see RelationshipSource#getRelationship(String) - */ @Override public PackageRelationship getRelationship(String id) { return this.relationships.getRelationshipByID(id); } - /** - * @see RelationshipSource#hasRelationships() - */ @Override public boolean hasRelationships() { return (relationships.size() > 0); } - /** - * @see RelationshipSource#isRelationshipExists(PackageRelationship) - */ @Override public boolean isRelationshipExists(PackageRelationship rel) { for (PackageRelationship r : relationships) { @@ -1559,32 +1548,29 @@ public abstract class OPCPackage implements RelationshipSource, Closeable { throws InvalidFormatException; /** - * Replace a content type in this package. - * - * <p> - * A typical scneario to call this method is to rename a template file to the main format, e.g. - * ".dotx" to ".docx" - * ".dotm" to ".docm" - * ".xltx" to ".xlsx" - * ".xltm" to ".xlsm" - * ".potx" to ".pptx" - * ".potm" to ".pptm" - * </p> + * Replace a content type in this package.<p> + * A typical scneario to call this method is to rename a template file to the main format, e.g. + * <ul> + * <li>".dotx" to ".docx"</li> + * <li>".dotm" to ".docm"</li> + * <li>".xltx" to ".xlsx"</li> + * <li>".xltm" to ".xlsm"</li> + * <li>".potx" to ".pptx"</li> + * <li>".potm" to ".pptm"</li> + * </ul> * For example, a code converting a .xlsm macro workbook to .xlsx would look as follows: - * <p> - * <pre><code> + * <pre>{@code * - * OPCPackage pkg = OPCPackage.open(new FileInputStream("macro-workbook.xlsm")); - * pkg.replaceContentType( - * "application/vnd.ms-excel.sheet.macroEnabled.main+xml", - * "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"); + * OPCPackage pkg = OPCPackage.open(new FileInputStream("macro-workbook.xlsm")); + * pkg.replaceContentType( + * "application/vnd.ms-excel.sheet.macroEnabled.main+xml", + * "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"); * - * FileOutputStream out = new FileOutputStream("workbook.xlsx"); - * pkg.save(out); - * out.close(); + * FileOutputStream out = new FileOutputStream("workbook.xlsx"); + * pkg.save(out); + * out.close(); * - * </code></pre> - * </p> + * }</pre> * * @param oldContentType the content type to be replaced * @param newContentType the replacement diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageAccess.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageAccess.java index 2568822285..e2b8c22ada 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageAccess.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageAccess.java @@ -19,8 +19,6 @@ package org.apache.poi.openxml4j.opc; /** * Specifies package access. - * - * @author Julien Chable * @version 1.0 */ public enum PackageAccess { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageNamespaces.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageNamespaces.java index d1adc519fc..a4e06abecd 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageNamespaces.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageNamespaces.java @@ -20,7 +20,6 @@ package org.apache.poi.openxml4j.opc; /** * Open Packaging Convention namespaces URI. * - * @author Julien Chable * @version 1.0 */ public interface PackageNamespaces { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePart.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePart.java index 81519ff2a5..801b700316 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePart.java @@ -151,9 +151,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * @param relationshipType * Type of relationship. * @return The newly created and added relationship - * @see org.apache.poi.openxml4j.opc.RelationshipSource#addExternalRelationship(java.lang.String, - * java.lang.String) */ + @Override public PackageRelationship addExternalRelationship(String target, String relationshipType) { return addExternalRelationship(target, relationshipType, null); @@ -176,6 +175,7 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * @see org.apache.poi.openxml4j.opc.RelationshipSource#addExternalRelationship(java.lang.String, * java.lang.String) */ + @Override public PackageRelationship addExternalRelationship(String target, String relationshipType, String id) { if (target == null) { @@ -211,9 +211,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * @param relationshipType * Type of relationship. * @return The newly created and added relationship - * @see org.apache.poi.openxml4j.opc.RelationshipSource#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, - * org.apache.poi.openxml4j.opc.TargetMode, java.lang.String) */ + @Override public PackageRelationship addRelationship(PackagePartName targetPartName, TargetMode targetMode, String relationshipType) { return addRelationship(targetPartName, targetMode, relationshipType, @@ -244,9 +243,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * invalid nested relations are created. * @throws IllegalArgumentException if targetPartName, targetMode * or relationshipType are passed as null - * @see org.apache.poi.openxml4j.opc.RelationshipSource#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, - * org.apache.poi.openxml4j.opc.TargetMode, java.lang.String, java.lang.String) */ + @Override public PackageRelationship addRelationship(PackagePartName targetPartName, TargetMode targetMode, String relationshipType, String id) { _container.throwExceptionIfReadOnly(); @@ -347,9 +345,7 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack targetMode, relationshipType, id); } - /** - * @see org.apache.poi.openxml4j.opc.RelationshipSource#clearRelationships() - */ + @Override public void clearRelationships() { if (_relationships != null) { _relationships.clear(); @@ -361,8 +357,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * * @param id * The ID identified the part to delete. - * @see org.apache.poi.openxml4j.opc.RelationshipSource#removeRelationship(java.lang.String) */ + @Override public void removeRelationship(String id) { this._container.throwExceptionIfReadOnly(); if (this._relationships != null) @@ -375,8 +371,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * @return This part's relationships. * @throws InvalidOperationException * Throws if the package is open en write only mode. - * @see org.apache.poi.openxml4j.opc.RelationshipSource#getRelationships() */ + @Override public PackageRelationshipCollection getRelationships() throws InvalidFormatException { return getRelationshipsCore(null); @@ -388,8 +384,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * @param id * ID of the package relationship to retrieve. * @return The package relationship - * @see org.apache.poi.openxml4j.opc.RelationshipSource#getRelationship(java.lang.String) */ + @Override public PackageRelationship getRelationship(String id) { return this._relationships.getRelationshipByID(id); } @@ -405,8 +401,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * If an error occurs while parsing the part. * @throws InvalidOperationException * If the package is open in write only mode. - * @see org.apache.poi.openxml4j.opc.RelationshipSource#getRelationshipsByType(java.lang.String) */ + @Override public PackageRelationshipCollection getRelationshipsByType( String relationshipType) throws InvalidFormatException { _container.throwExceptionIfWriteOnly(); @@ -443,8 +439,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * * @return <b>true</b> if the part have at least one relationship else * <b>false</b>. - * @see org.apache.poi.openxml4j.opc.RelationshipSource#hasRelationships() */ + @Override public boolean hasRelationships() { return (!this._isRelationshipPart && (_relationships != null && _relationships .size() > 0)); @@ -457,8 +453,8 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * The relationship to check. * @return <b>true</b> if the specified relationship exists in this part, * else returns <b>false</b> - * @see org.apache.poi.openxml4j.opc.RelationshipSource#isRelationshipExists(org.apache.poi.openxml4j.opc.PackageRelationship) */ + @Override public boolean isRelationshipExists(PackageRelationship rel) { return rel != null && _relationships.getRelationshipByID(rel.getId()) != null; } @@ -500,7 +496,7 @@ public abstract class PackagePart implements RelationshipSource, Comparable<Pack * Get the input stream of this part to read its content. * * @return The input stream of the content of this part, else - * <code>null</code>. + * {@code null}. * * @throws IOException If creating the input-stream fails. */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageProperties.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageProperties.java index 6d832090cd..0c5aa55731 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageProperties.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageProperties.java @@ -22,8 +22,7 @@ import java.util.Optional; /** * Represents the core properties of an OPC package. - * - * @author Julien Chable + * * @version 1.0 * @see org.apache.poi.openxml4j.opc.OPCPackage */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationship.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationship.java index bec1d00025..4d68234f7e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationship.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationship.java @@ -23,8 +23,6 @@ import java.util.Objects; /** * A part relationship. - * - * @author Julien Chable * @version 1.0 */ public final class PackageRelationship { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java index 07f8b98a3c..ba507c617f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java @@ -33,9 +33,6 @@ import org.w3c.dom.NodeList; /** * Represents a collection of PackageRelationship elements that are owned by a * given PackagePart or the Package. - * - * @author Julien Chable, CDubettier - * @version 0.1 */ public final class PackageRelationshipCollection implements Iterable<PackageRelationship> { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java index 58231a166a..07a4962cb7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java @@ -31,7 +31,6 @@ import org.apache.poi.openxml4j.exceptions.InvalidOperationException; /** * Helper for part and pack URI. * - * @author Julien Chable, CDubet, Kim Ung * @version 0.1 */ public final class PackagingURIHelper { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/RelationshipSource.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/RelationshipSource.java index 87c424df54..951128700e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/RelationshipSource.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/RelationshipSource.java @@ -34,7 +34,7 @@ public interface RelationshipSource { * Type of relationship. * @return The newly created and added relationship */ - public abstract PackageRelationship addRelationship( + PackageRelationship addRelationship( PackagePartName targetPartName, TargetMode targetMode, String relationshipType); @@ -56,11 +56,8 @@ public interface RelationshipSource { * @param id * Relationship unique id. * @return The newly created and added relationship - * - * @throws InvalidFormatException - * If the URI point to a relationship part URI. */ - public abstract PackageRelationship addRelationship( + PackageRelationship addRelationship( PackagePartName targetPartName, TargetMode targetMode, String relationshipType, String id); @@ -76,9 +73,8 @@ public interface RelationshipSource { * @param target External target of the relationship * @param relationshipType Type of relationship. * @return The newly created and added relationship - * @see org.apache.poi.openxml4j.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String) */ - public PackageRelationship addExternalRelationship(String target, String relationshipType); + PackageRelationship addExternalRelationship(String target, String relationshipType); /** * Adds an external relationship to a part @@ -95,12 +91,12 @@ public interface RelationshipSource { * @return The newly created and added relationship * @see org.apache.poi.openxml4j.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String) */ - public PackageRelationship addExternalRelationship(String target, String relationshipType, String id); + PackageRelationship addExternalRelationship(String target, String relationshipType, String id); /** * Delete all the relationships attached to this. */ - public abstract void clearRelationships(); + void clearRelationships(); /** * Delete the relationship specified by its id. @@ -108,16 +104,14 @@ public interface RelationshipSource { * @param id * The ID identified the part to delete. */ - public abstract void removeRelationship(String id); + void removeRelationship(String id); /** * Retrieve all the relationships attached to this. * * @return This part's relationships. - * @throws OpenXML4JException */ - public abstract PackageRelationshipCollection getRelationships() - throws InvalidFormatException, OpenXML4JException; + PackageRelationshipCollection getRelationships() throws OpenXML4JException; /** * Retrieves a package relationship from its id. @@ -126,7 +120,7 @@ public interface RelationshipSource { * ID of the package relationship to retrieve. * @return The package relationship */ - public abstract PackageRelationship getRelationship(String id); + PackageRelationship getRelationship(String id); /** * Retrieve all relationships attached to this part which have the specified @@ -140,9 +134,8 @@ public interface RelationshipSource { * @throws InvalidOperationException * If the package is open in write only mode. */ - public abstract PackageRelationshipCollection getRelationshipsByType( - String relationshipType) throws InvalidFormatException, - IllegalArgumentException, OpenXML4JException; + PackageRelationshipCollection getRelationshipsByType(String relationshipType) + throws IllegalArgumentException, OpenXML4JException; /** * Knows if the part have any relationships. @@ -150,7 +143,7 @@ public interface RelationshipSource { * @return <b>true</b> if the part have at least one relationship else * <b>false</b>. */ - public abstract boolean hasRelationships(); + boolean hasRelationships(); /** * Checks if the specified relationship is part of this package part. @@ -160,6 +153,6 @@ public interface RelationshipSource { * @return <b>true</b> if the specified relationship exists in this part, * else returns <b>false</b> */ - public abstract boolean isRelationshipExists(PackageRelationship rel); + boolean isRelationshipExists(PackageRelationship rel); } diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/TargetMode.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/TargetMode.java index 59f45f5386..99adb023b3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/TargetMode.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/TargetMode.java @@ -18,10 +18,8 @@ package org.apache.poi.openxml4j.opc; /** - * Specifies whether the target of a PackageRelationship is inside or outside a - * Package. + * Specifies whether the target of a PackageRelationship is inside or outside a Package. * - * @author Julien Chable * @version 1.0 */ public enum TargetMode { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java index 3e1e977f2b..354e212aad 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackagePart.java @@ -32,7 +32,6 @@ import org.apache.poi.util.NotImplemented; /** * Zip implementation of a PackagePart. * - * @author Julien Chable * @version 1.0 * @see PackagePart */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentType.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentType.java index 2e186be949..9d2515061f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentType.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentType.java @@ -45,8 +45,6 @@ import org.apache.poi.openxml4j.exceptions.InvalidFormatException; * retrieving a part from a package; format designers shall specify only such * content types for inclusion in the format. * </p> - * @author Julien Chable - * @version 0.1 * * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">http://www.ietf.org/rfc/rfc2045.txt</a> * @see <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a> diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java index f9df88da44..1e53abcc61 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java @@ -42,8 +42,6 @@ import org.xml.sax.SAXException; /** * Manage package content types ([Content_Types].xml part). - * - * @author Julien Chable */ public abstract class ContentTypeManager { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/FileHelper.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/FileHelper.java index 44e3766eb1..b755399a9e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/FileHelper.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/FileHelper.java @@ -25,8 +25,6 @@ import java.nio.channels.FileChannel; /** * Provide useful method to manage file. - * - * @author Julien Chable * @version 0.1 */ public final class FileHelper { @@ -67,7 +65,7 @@ public final class FileHelper { FileOutputStream fos = new FileOutputStream(out); FileChannel sourceChannel = fis.getChannel(); FileChannel destinationChannel = fos.getChannel()) { - + sourceChannel.transferTo(0, sourceChannel.size(), destinationChannel); } } diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePart.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePart.java index f2d8c31151..0df7364903 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePart.java @@ -33,8 +33,7 @@ import org.apache.poi.util.IOUtils; /** * Memory version of a package part. Use to - * - * @author Julien Chable + * * @version 1.0 */ public final class MemoryPackagePart extends PackagePart { @@ -46,7 +45,7 @@ public final class MemoryPackagePart extends PackagePart { /** * Constructor. - * + * * @param pack * The owner package. * @param partName @@ -63,7 +62,7 @@ public final class MemoryPackagePart extends PackagePart { /** * Constructor. - * + * * @param pack * The owner package. * @param partName @@ -121,10 +120,10 @@ public final class MemoryPackagePart extends PackagePart { } catch(IOException e) { throw new InvalidFormatException(e.getMessage()); } - + // Save it data = baos.toByteArray(); - + // All done return true; } diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java index cf809d6678..5cd07238e3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java @@ -23,8 +23,6 @@ import java.io.OutputStream; /** * Build an output stream for MemoryPackagePart. - * - * @author Julien Chable */ public final class MemoryPackagePartOutputStream extends OutputStream { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java index 34e66326b5..0658a03c6d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java @@ -41,8 +41,6 @@ import org.apache.poi.util.LocaleUtil; /** * Represents the core properties part of a package. - * - * @author Julien Chable */ public final class PackagePropertiesPart extends PackagePart implements PackageProperties { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartMarshaller.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartMarshaller.java index e30d71783a..cb2fb8e464 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartMarshaller.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartMarshaller.java @@ -27,7 +27,6 @@ import org.apache.poi.openxml4j.opc.PackagePart; * marshaller is responsible to marshall a part in order to be save in a * package. * - * @author Julien Chable * @version 0.1 */ public interface PartMarshaller { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.java index b3f74323f3..2853172451 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.java @@ -29,9 +29,6 @@ import org.apache.poi.openxml4j.opc.internal.unmarshallers.UnmarshallContext; * Classes implementing this interface are considered as part unmarshaller. A part * unmarshaller is responsible to unmarshall a part in order to load it from a * package. - * - * @author Julien Chable - * @version 0.1 */ public interface PartUnmarshaller { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java index 597335efc4..40e3e256b6 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java @@ -33,7 +33,6 @@ import org.w3c.dom.Document; /** * Zip implementation of the ContentTypeManager. * - * @author Julien Chable * @version 1.0 * @see ContentTypeManager */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/DefaultMarshaller.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/DefaultMarshaller.java index 970768cb30..83cf0c4863 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/DefaultMarshaller.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/DefaultMarshaller.java @@ -26,7 +26,6 @@ import org.apache.poi.openxml4j.opc.internal.PartMarshaller; /** * Default marshaller that specified that the part is responsible to marshall its content. * - * @author Julien Chable * @version 1.0 * @see PartMarshaller */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPackagePropertiesMarshaller.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPackagePropertiesMarshaller.java index f24a74015c..21522160f8 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPackagePropertiesMarshaller.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPackagePropertiesMarshaller.java @@ -29,8 +29,6 @@ import org.apache.poi.openxml4j.opc.internal.ZipHelper; /** * Package core properties marshaller specialized for zipped package. - * - * @author Julien Chable */ public final class ZipPackagePropertiesMarshaller extends PackagePropertiesMarshaller { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/PackagePropertiesUnmarshaller.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/PackagePropertiesUnmarshaller.java index 20d30c443f..ddcd0975c3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/PackagePropertiesUnmarshaller.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/PackagePropertiesUnmarshaller.java @@ -41,8 +41,6 @@ import org.xml.sax.SAXException; /** * Package properties unmarshaller. - * - * @author Julien Chable */ public final class PackagePropertiesUnmarshaller implements PartUnmarshaller { diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/UnmarshallContext.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/UnmarshallContext.java index d19133f2cb..485b549b72 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/UnmarshallContext.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/unmarshallers/UnmarshallContext.java @@ -23,8 +23,7 @@ import org.apache.poi.openxml4j.opc.PackagePartName; /** * Context needed for the unmarshall process of a part. This class is immutable. - * - * @author Julien Chable + * * @version 1.0 */ public final class UnmarshallContext { @@ -37,7 +36,7 @@ public final class UnmarshallContext { /** * Constructor. - * + * * @param targetPackage * Container. * @param partName diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/EnvelopedSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/EnvelopedSignatureFacet.java index 6baebff972..87a4a7c86c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/EnvelopedSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/EnvelopedSignatureFacet.java @@ -41,8 +41,6 @@ import org.w3c.dom.Document; /** * Signature Facet implementation to create enveloped signatures. - * - * @author Frank Cornelis */ public class EnvelopedSignatureFacet implements SignatureFacet { diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java index d59f4c9acb..84cccecb77 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java @@ -51,8 +51,6 @@ import org.w3c.dom.NodeList; /** * Signature Facet implementation that adds ds:KeyInfo to the XML signature. - * - * @author Frank Cornelis */ public class KeyInfoSignatureFacet implements SignatureFacet { diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java index f9ea3a9662..7546b76c98 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java @@ -41,8 +41,6 @@ import org.w3c.dom.NodeList; * Work-around for Office2010 to accept the XAdES-BES/EPES signature. * * xades:UnsignedProperties/xades:UnsignedSignatureProperties needs to be present. - * - * @author Frank Cornelis */ public class Office2010SignatureFacet implements SignatureFacet { diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java index 940b051d7c..eafb2cb387 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java @@ -86,7 +86,6 @@ import org.w3c.dom.Element; * This implementation has been tested against an implementation that * participated multiple ETSI XAdES plugtests. * - * @author Frank Cornelis * @see <a href="http://en.wikipedia.org/wiki/XAdES">XAdES</a> * */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java index 18f28f4837..3b00748156 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java @@ -82,7 +82,6 @@ import org.w3c.dom.NodeList; * This implementation has been tested against an implementation that * participated multiple ETSI XAdES plugtests. * - * @author Frank Cornelis * @see XAdESSignatureFacet */ public class XAdESXLSignatureFacet implements SignatureFacet { diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java index aa40675322..e0bdc05623 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java @@ -18,9 +18,9 @@ /* ==================================================================== This product contains an ASLv2 licensed version of the OOXML signer package from the eID Applet project - http://code.google.com/p/eid-applet/source/browse/trunk/README.txt + http://code.google.com/p/eid-applet/source/browse/trunk/README.txt Copyright (C) 2008-2014 FedICT. - ================================================================= */ + ================================================================= */ package org.apache.poi.poifs.crypt.dsig.services; @@ -31,9 +31,6 @@ import java.util.List; /** * Container class for PKI revocation data. - * - * @author Frank Cornelis - * */ public class RevocationData { @@ -51,7 +48,7 @@ public class RevocationData { /** * Adds a CRL to this revocation data set. - * + * * @param encodedCrl */ public void addCRL(byte[] encodedCrl) { @@ -60,7 +57,7 @@ public class RevocationData { /** * Adds a CRL to this revocation data set. - * + * * @param crl */ public void addCRL(X509CRL crl) { @@ -76,7 +73,7 @@ public class RevocationData { /** * Adds an OCSP response to this revocation data set. - * + * * @param encodedOcsp */ public void addOCSP(byte[] encodedOcsp) { @@ -85,7 +82,7 @@ public class RevocationData { /** * Gives back a list of all CRLs. - * + * * @return a list of all CRLs */ public List<byte[]> getCRLs() { @@ -94,7 +91,7 @@ public class RevocationData { /** * Gives back a list of all OCSP responses. - * + * * @return a list of all OCSP response */ public List<byte[]> getOCSPs() { @@ -104,7 +101,7 @@ public class RevocationData { /** * Returns <code>true</code> if this revocation data set holds OCSP * responses. - * + * * @return <code>true</code> if this revocation data set holds OCSP * responses. */ @@ -114,7 +111,7 @@ public class RevocationData { /** * Returns <code>true</code> if this revocation data set holds CRLs. - * + * * @return <code>true</code> if this revocation data set holds CRLs. */ public boolean hasCRLs() { @@ -123,7 +120,7 @@ public class RevocationData { /** * Returns <code>true</code> if this revocation data is not empty. - * + * * @return <code>true</code> if this revocation data is not empty. */ public boolean hasRevocationDataEntries() { diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationDataService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationDataService.java index ed5ce29918..5fef803f8c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationDataService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationDataService.java @@ -18,9 +18,9 @@ /* ==================================================================== This product contains an ASLv2 licensed version of the OOXML signer package from the eID Applet project - http://code.google.com/p/eid-applet/source/browse/trunk/README.txt + http://code.google.com/p/eid-applet/source/browse/trunk/README.txt Copyright (C) 2008-2014 FedICT. - ================================================================= */ + ================================================================= */ package org.apache.poi.poifs.crypt.dsig.services; @@ -30,16 +30,13 @@ import java.util.List; /** * Interface for a service that retrieves revocation data about some given * certificate chain. - * - * @author Frank Cornelis - * */ public interface RevocationDataService { /** * Gives back the revocation data corresponding with the given certificate * chain. - * + * * @param certificateChain the certificate chain * @return the revocation data corresponding with the given certificate chain. */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/SignaturePolicyService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/SignaturePolicyService.java index 56fd9ba232..86dfb8bec1 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/SignaturePolicyService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/SignaturePolicyService.java @@ -18,23 +18,20 @@ /* ==================================================================== This product contains an ASLv2 licensed version of the OOXML signer package from the eID Applet project - http://code.google.com/p/eid-applet/source/browse/trunk/README.txt + http://code.google.com/p/eid-applet/source/browse/trunk/README.txt Copyright (C) 2008-2014 FedICT. - ================================================================= */ + ================================================================= */ package org.apache.poi.poifs.crypt.dsig.services; /** * Interface for the signature policy service. - * - * @author Frank Cornelis - * */ public interface SignaturePolicyService { /** * Gives back the signature policy identifier URI. - * + * * @return the signature policy identifier URI. */ String getSignaturePolicyIdentifier(); @@ -42,7 +39,7 @@ public interface SignaturePolicyService { /** * Gives back the short description of the signature policy or * <code>null</code> if a description is not available. - * + * * @return the description, or <code>null</code>. */ String getSignaturePolicyDescription(); @@ -51,14 +48,14 @@ public interface SignaturePolicyService { * Gives back the download URL where the signature policy document can be * found. Can be <code>null</code> in case such a download location does not * exist. - * + * * @return the download URL, or <code>null</code>. */ String getSignaturePolicyDownloadUrl(); /** * Gives back the signature policy document. - * + * * @return the bytes of the signature policy document. */ byte[] getSignaturePolicyDocument(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java index 945cf9f709..e0746f60eb 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java @@ -76,9 +76,6 @@ import static org.apache.logging.log4j.util.Unbox.box; /** * A TSP time-stamp service implementation. - * - * @author Frank Cornelis - * */ public class TSPTimeStampService implements TimeStampService { diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampService.java index 72561af9bd..f92d2cb4ad 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampService.java @@ -28,8 +28,6 @@ import org.apache.poi.poifs.crypt.dsig.SignatureInfo; /** * Interface for a time-stamp service. - * - * @author Frank Cornelis */ public interface TimeStampService { diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java index 0ea5bbdc1d..e15fbd4f86 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java @@ -18,9 +18,9 @@ /* ==================================================================== This product contains an ASLv2 licensed version of the OOXML signer package from the eID Applet project - http://code.google.com/p/eid-applet/source/browse/trunk/README.txt + http://code.google.com/p/eid-applet/source/browse/trunk/README.txt Copyright (C) 2008-2014 FedICT. - ================================================================= */ + ================================================================= */ package org.apache.poi.poifs.crypt.dsig.services; @@ -29,15 +29,12 @@ import java.util.List; /** * Interface for trust validator of a TSP. - * - * @author Frank Cornelis - * */ public interface TimeStampServiceValidator { /** * Validates the given certificate chain. - * + * * @param certificateChain * @param revocationData * the optional data container that should be filled with diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java index 35536714ed..1af8c2d45e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java @@ -52,8 +52,6 @@ import org.w3c.dom.Element; * Taken (with permission) from https://gist.github.com/msteiger/4509119, * including the fixes that are discussed in the comments * - * @author Martin Steiger - * * @see <a href="https://stackoverflow.com/questions/14258206/">Gradient paints not working in Apache Batik's svggen</a> * @see <a href="https://issues.apache.org/jira/browse/BATIK-1032">BATIK-1032</a> */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/model/PropertyFetcher.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/model/PropertyFetcher.java index eb157e82e3..c7b68d8866 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/model/PropertyFetcher.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/model/PropertyFetcher.java @@ -24,8 +24,6 @@ import org.apache.poi.xslf.usermodel.XSLFShape; /** * Used internally to navigate the PresentationML text style hierarchy and fetch properties - * - * @author Yegor Kozlov */ @Internal public abstract class PropertyFetcher<T> { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/SlideLayout.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/SlideLayout.java index 729057b13b..2f48dfe957 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/SlideLayout.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/SlideLayout.java @@ -21,8 +21,6 @@ package org.apache.poi.xslf.usermodel; /** * Date: 11/5/11 - * - * @author Yegor Kozlov */ public enum SlideLayout { /** diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java index a69af0e0e7..3bba3c5032 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java @@ -32,8 +32,6 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual; /** * Represents a shape with a preset geometry. - * - * @author Yegor Kozlov */ @Beta public class XSLFAutoShape extends XSLFTextShape implements AutoShape<XSLFShape, XSLFTextParagraph> { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java index cd15e7d852..5e19efbc7f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java @@ -32,8 +32,6 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTConnectorNonVisual /** * Specifies a connection shape. - * - * @author Yegor Kozlov */ @Beta public class XSLFConnectorShape extends XSLFSimpleShape diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java index 5cf47873f3..4c56fe0a01 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java @@ -50,8 +50,6 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShape; /** * Represents a group shape that consists of many shapes grouped together. - * - * @author Yegor Kozlov */ @Beta public class XSLFGroupShape extends XSLFShape diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java index 6ebe185531..00e7f09819 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java @@ -42,8 +42,6 @@ import org.openxmlformats.schemas.presentationml.x2006.main.NotesMasterDocument; * their attached text bodies. Then the notesStyles element specifies the * formatting for the text within each of these shapes. * </p> - * - * @author Yegor Kozlov */ @Beta public class XSLFNotesMaster extends XSLFSheet diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShadow.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShadow.java index 9ec4e3e6bc..0de14f6645 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShadow.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShadow.java @@ -29,8 +29,6 @@ import org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor; /** * Represents a shadow of a shape. For now supports only outer shadows. - * - * @author Yegor Kozlov */ public class XSLFShadow extends XSLFShape implements Shadow<XSLFShape,XSLFTextParagraph> { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java index 1364cd7228..3c367dd9bb 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java @@ -73,7 +73,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShape; @Beta public abstract class XSLFSheet extends POIXMLDocumentPart implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { - private static Logger LOG = LogManager.getLogger(XSLFSheet.class); + private static final Logger LOG = LogManager.getLogger(XSLFSheet.class); private XSLFDrawing _drawing; private List<XSLFShape> _shapes; @@ -345,7 +345,7 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { * it is unchanged. * * @param xShape shape to be removed from this sheet, if present - * @return <tt>true</tt> if this sheet contained the specified element + * @return {@code true} if this sheet contained the specified element * @throws IllegalArgumentException if the type of the specified shape * is incompatible with this sheet (optional) */ @@ -461,7 +461,7 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { * Append content to this sheet. * * @param src the source sheet - * @return modified <code>this</code>. + * @return modified {@code this}. */ @SuppressWarnings("unused") public XSLFSheet appendContent(XSLFSheet src){ @@ -490,7 +490,7 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { /** * @return theme (shared styles) associated with this theme. - * By default returns <code>null</code> which means that this sheet is theme-less. + * By default returns {@code null} which means that this sheet is theme-less. * Sheets that support the notion of themes (slides, masters, layouts, etc.) should override this * method and return the corresponding package part. */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextBox.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextBox.java index e3e30d18c6..b8bf5afea6 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextBox.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextBox.java @@ -29,9 +29,6 @@ import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType; import org.openxmlformats.schemas.presentationml.x2006.main.CTShape; import org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual; -/** - * @author Yegor Kozlov - */ @Beta public class XSLFTextBox extends XSLFAutoShape implements TextBox<XSLFShape, XSLFTextParagraph> { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java index 6d4c2eb0b3..e26bfdeb0e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java @@ -131,6 +131,7 @@ public class XSSFBReader extends XSSFReader { return WORKSHEET_RELS; } + @Override Iterator<XSSFSheetRef> createSheetIteratorFromWB(PackagePart wb) throws IOException { SheetRefLoader sheetRefLoader = new SheetRefLoader(wb.getInputStream()); sheetRefLoader.parse(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java index d31c489e81..7ba0a96df5 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java @@ -88,7 +88,7 @@ public class XSSFReader { /** * Creates a new XSSFReader, for the given package * - * @param pkg an <code>OPCPackage</code> representing a spreasheet file + * @param pkg an {@code OPCPackage} representing a spreasheet file * @param allowStrictOoxmlFiles whether to try to handle Strict OOXML format files */ public XSSFReader(OPCPackage pkg, boolean allowStrictOoxmlFiles) throws IOException, OpenXML4JException { @@ -226,7 +226,7 @@ public class XSSFReader { XSSFSheetRef xssfSheetRef; /** - * Iterator over CTSheet objects, returns sheets in <tt>logical</tt> order. + * Iterator over CTSheet objects, returns sheets in {@code logical} order. * We can't rely on the Ooxml4J's relationship iterator because it returns objects in physical order, * i.e. as they are stored in the underlying package */ @@ -302,9 +302,9 @@ public class XSSFReader { } /** - * Returns <tt>true</tt> if the iteration has more elements. + * Returns {@code true} if the iteration has more elements. * - * @return <tt>true</tt> if the iterator has more elements. + * @return {@code true} if the iterator has more elements. */ @Override public boolean hasNext() { @@ -366,7 +366,7 @@ public class XSSFReader { protected CommentsTable parseComments(PackagePart commentsPart) throws IOException { return new CommentsTable(commentsPart); } - + /** * Returns the shapes associated with this sheet, * an empty list or null if there is an exception diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/CalculationChain.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/CalculationChain.java index 58933cdd1e..d46a6af3ee 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/CalculationChain.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/CalculationChain.java @@ -32,8 +32,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CalcChainDocument; /** * The cells in a workbook can be calculated in different orders depending on various optimizations and * dependencies. The calculation chain object specifies the order in which the cells in a workbook were last calculated. - * - * @author Yegor Kozlov */ public class CalculationChain extends POIXMLDocumentPart { private CTCalcChain chain; @@ -50,7 +48,7 @@ public class CalculationChain extends POIXMLDocumentPart { super(part); readFrom(part.getInputStream()); } - + public void readFrom(InputStream is) throws IOException { try { CalcChainDocument doc = CalcChainDocument.Factory.parse(is, DEFAULT_XML_OPTIONS); @@ -80,7 +78,7 @@ public class CalculationChain extends POIXMLDocumentPart { /** * Remove a formula reference from the calculation chain - * + * * @param sheetId the sheet Id of a sheet the formula belongs to. * @param ref A1 style reference to the cell containing the formula. */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/MapInfo.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/MapInfo.java index 10f81c8632..1361e310d9 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/MapInfo.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/MapInfo.java @@ -37,21 +37,19 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSchema; import org.openxmlformats.schemas.spreadsheetml.x2006.main.MapInfoDocument; /** - * + * * This class implements the Custom XML Mapping Part (Open Office XML Part 1: * chapter 12.3.6) - * + * * An instance of this part type contains a schema for an XML file, and * information on the behavior that is used when allowing this custom XML schema * to be mapped into the spreadsheet. - * - * @author Roberto Manicardi */ public class MapInfo extends POIXMLDocumentPart { private CTMapInfo mapInfo; - + private Map<Integer, XSSFMap> maps ; public MapInfo() { @@ -66,8 +64,8 @@ public class MapInfo extends POIXMLDocumentPart { public MapInfo(PackagePart part) throws IOException { super(part); readFrom(part.getInputStream()); - } - + } + public void readFrom(InputStream is) throws IOException { try { MapInfoDocument doc = MapInfoDocument.Factory.parse(is, DEFAULT_XML_OPTIONS); @@ -82,7 +80,7 @@ public class MapInfo extends POIXMLDocumentPart { throw new IOException(e.getLocalizedMessage()); } } - + /** * Returns the parent XSSFWorkbook * @@ -91,14 +89,14 @@ public class MapInfo extends POIXMLDocumentPart { public XSSFWorkbook getWorkbook() { return (XSSFWorkbook)getParent(); } - + /** - * + * * @return the internal data object */ public CTMapInfo getCTMapInfo(){ return mapInfo; - + } /** @@ -117,27 +115,27 @@ public class MapInfo extends POIXMLDocumentPart { } return xmlSchema; } - - + + public XSSFMap getXSSFMapById(int id){ return maps.get(id); } - + public XSSFMap getXSSFMapByName(String name){ - + XSSFMap matchedMap = null; - + for(XSSFMap map :maps.values()){ if(map.getCtMap().getName()!=null && map.getCtMap().getName().equals(name)){ matchedMap = map; } - } - + } + return matchedMap; } - + /** - * + * * @return all the mappings configured in this document */ public Collection<XSSFMap> getAllXSSFMaps(){ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SingleXmlCells.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SingleXmlCells.java index 1ea7eb2824..08b63c451b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SingleXmlCells.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/model/SingleXmlCells.java @@ -36,16 +36,13 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.SingleXmlCellsDocumen /** - * + * * This class implements the Single Cell Tables Part (Open Office XML Part 4: * chapter 3.5.2) - * - * - * @author Roberto Manicardi */ public class SingleXmlCells extends POIXMLDocumentPart { - - + + private CTSingleXmlCells singleXMLCells; public SingleXmlCells() { @@ -70,7 +67,7 @@ public class SingleXmlCells extends POIXMLDocumentPart { throw new IOException(e.getLocalizedMessage()); } } - + public XSSFSheet getXSSFSheet(){ return (XSSFSheet) getParent(); } @@ -88,21 +85,21 @@ public class SingleXmlCells extends POIXMLDocumentPart { writeTo(out); out.close(); } - + public CTSingleXmlCells getCTSingleXMLCells(){ return singleXMLCells; } - + /** - * + * * @return all the SimpleXmlCell contained in this SingleXmlCells element */ public List<XSSFSingleXmlCell> getAllSimpleXmlCell(){ List<XSSFSingleXmlCell> list = new Vector<>(); - + for(CTSingleXmlCell singleXmlCell: singleXMLCells.getSingleXmlCellArray()){ list.add(new XSSFSingleXmlCell(singleXmlCell,this)); - } + } return list; } } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java index b8253c054d..581606f82d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java @@ -30,8 +30,6 @@ import java.util.zip.*; * Drop in replacement for `java.util.ZipOutputStream`. * * For more information see https://github.com/rzymek/opczip - * - * @author Krzysztof Rzymkowski */ class OpcOutputStream extends DeflaterOutputStream { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/Zip64Impl.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/Zip64Impl.java index 5dfc49008a..706004912d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/Zip64Impl.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/Zip64Impl.java @@ -26,8 +26,6 @@ import static java.nio.charset.StandardCharsets.US_ASCII; /** * Excel compatible Zip64 implementation. * For more information see https://github.com/rzymek/opczip - * - * @author Krzysztof Rzymkowski */ class Zip64Impl { private static final long PK0102 = 0x02014b50L; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java index 79f003eb9c..01317d0c75 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java @@ -315,6 +315,7 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork } } + @Override @NotImplemented public int getExternalSheetIndex(String workbookName, String sheetName) { throw new RuntimeException("not implemented yet"); @@ -387,7 +388,7 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork * This is meant to be used on documents whose structure is essentially static at the point formulas are evaluated. * * @param name the data table name (case-insensitive) - * @return The Data table in the workbook named <tt>name</tt>, or <tt>null</tt> if no table is named <tt>name</tt>. + * @return The Data table in the workbook named {@code name}, or {@code null} if no table is named {@code name}. * @since 3.15 beta 2 */ @Override @@ -419,15 +420,18 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork _fpBook = fpBook; } + @Override public Ptg[] getNameDefinition() { return FormulaParser.parse(_nameRecord.getRefersToFormula(), _fpBook, FormulaType.NAMEDRANGE, _nameRecord.getSheetIndex()); } + @Override public String getNameText() { return _nameRecord.getNameName(); } + @Override public boolean hasFormula() { // TODO - no idea if this is right CTDefinedName ctn = _nameRecord.getCTName(); @@ -435,13 +439,16 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork return !ctn.getFunction() && strVal != null && strVal.length() > 0; } + @Override public boolean isFunctionName() { return _nameRecord.isFunctionName(); } + @Override public boolean isRange() { return hasFormula(); // TODO - is this right? } + @Override public NamePtg createPtg() { return new NamePtg(_index); } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFAutoFilter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFAutoFilter.java index d363ab31ab..0e8e9963fa 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFAutoFilter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFAutoFilter.java @@ -20,8 +20,6 @@ import org.apache.poi.ss.usermodel.AutoFilter; /** * Represents autofiltering for the specified worksheet. - * - * @author Yegor Kozlov */ public final class XSSFAutoFilter implements AutoFilter { private XSSFSheet _sheet; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java index 883e33a58e..4cf1ec13a0 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java @@ -40,9 +40,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.ChartsheetDocument; * High level representation of Sheet Parts that are of type 'chartsheet'. * <p> * Chart sheet is a special kind of Sheet that contains only chart and no data. - * </p> - * - * @author Yegor Kozlov */ public class XSSFChartSheet extends XSSFSheet { @@ -56,7 +53,8 @@ public class XSSFChartSheet extends XSSFSheet { protected XSSFChartSheet(PackagePart part) { super(part); } - + + @Override protected void read(InputStream is) throws IOException { //initialize the supeclass with a blank worksheet super.read(new ByteArrayInputStream(BLANK_WORKSHEET)); @@ -81,12 +79,12 @@ public class XSSFChartSheet extends XSSFSheet { protected CTDrawing getCTDrawing() { return chartsheet.getDrawing(); } - + @Override protected CTLegacyDrawing getCTLegacyDrawing() { return chartsheet.getLegacyDrawing(); } - + @Override protected void write(OutputStream out) throws IOException { XmlOptions xmlOptions = new XmlOptions(DEFAULT_XML_OPTIONS); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChildAnchor.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChildAnchor.java index ff727adb2a..c673f2c704 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChildAnchor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChildAnchor.java @@ -22,9 +22,6 @@ import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D; import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D; import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D; -/** - * @author Yegor Kozlov - */ public final class XSSFChildAnchor extends XSSFAnchor { private CTTransform2D t2d; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFColor.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFColor.java index a8507cd92e..5233bbd5b3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFColor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFColor.java @@ -38,7 +38,6 @@ public class XSSFColor extends ExtendedColor { * @return null if color is null, new instance otherwise */ public static XSSFColor from(CTColor color, IndexedColorMap map) { - //noinspection deprecation return color == null ? null : new XSSFColor(color, map); } @@ -84,7 +83,6 @@ public class XSSFColor extends ExtendedColor { * @param colorMap The IndexedColorMap to use instead of the default one */ public XSSFColor(IndexedColorMap colorMap) { - //noinspection deprecation this(CTColor.Factory.newInstance(), colorMap); } @@ -115,7 +113,6 @@ public class XSSFColor extends ExtendedColor { * @param colorMap The IndexedColorMap to use instead of the default one */ public XSSFColor(byte[] rgb, IndexedColorMap colorMap) { - //noinspection deprecation this(CTColor.Factory.newInstance(), colorMap); ctColor.setRgb(rgb); } @@ -125,7 +122,6 @@ public class XSSFColor extends ExtendedColor { * @param colorMap The IndexedColorMap to use instead of the default one */ public XSSFColor(IndexedColors indexedColor, IndexedColorMap colorMap) { - //noinspection deprecation this(CTColor.Factory.newInstance(), colorMap); ctColor.setIndexed(indexedColor.index); } @@ -245,6 +241,7 @@ public class XSSFColor extends ExtendedColor { return ctColor.getRgb(); } + @Override protected byte[] getIndexedRGB() { if (isIndexed()) { if (indexedColorMap != null) return indexedColorMap.getRGB(getIndex()); @@ -262,8 +259,8 @@ public class XSSFColor extends ExtendedColor { } /** - * Index into the <clrScheme> collection, referencing a particular <sysClr> or - * <srgbClr> value expressed in the Theme part. + * Index into the {@code clrScheme} collection, referencing a particular {@code sysClr} or + * {@code srgbClr} value expressed in the Theme part. */ @Override public int getTheme() { @@ -271,8 +268,8 @@ public class XSSFColor extends ExtendedColor { } /** - * Index into the <clrScheme> collection, referencing a particular <sysClr> or - * <srgbClr> value expressed in the Theme part. + * Index into the {@code clrScheme} collection, referencing a particular {@code sysClr} or + * {@code srgbClr} value expressed in the Theme part. * @param theme index */ public void setTheme(int theme) { @@ -382,7 +379,7 @@ public class XSSFColor extends ExtendedColor { } /** - * Checked type cast <tt>color</tt> to an XSSFColor. + * Checked type cast {@code color} to an XSSFColor. * * @param color the color to type cast * @return the type casted color diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java index eff8e375b4..4ec82e0cc4 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java @@ -27,9 +27,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTConditionalFormatti import java.util.ArrayList; import java.util.Collections; -/** - * @author Yegor Kozlov - */ public class XSSFConditionalFormatting implements ConditionalFormatting { private final CTConditionalFormatting _cf; private final XSSFSheet _sh; @@ -50,7 +47,7 @@ public class XSSFConditionalFormatting implements ConditionalFormatting { } /** - * @return array of <tt>CellRangeAddress</tt>s. Never <code>null</code> + * @return array of {@code CellRangeAddress}s. Never {@code null} */ @Override public CellRangeAddress[] getFormattingRanges() { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConnector.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConnector.java index 78d4e402e4..6624d0aa27 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConnector.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConnector.java @@ -37,8 +37,6 @@ import org.apache.poi.util.Internal; /** * A connection shape drawing element. A connection shape is a line, etc. * that connects two other shapes in this drawing. - * - * @author Yegor Kozlov */ public final class XSSFConnector extends XSSFShape { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java index ca451a5d33..4cc723ee2c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java @@ -31,10 +31,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationOpera import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationType; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationOperator.Enum; -/** - * @author <a href="rjankiraman@emptoris.com">Radhakrishnan J</a> - * - */ public class XSSFDataValidation implements DataValidation { private static final int MAX_TEXT_LENGTH = 255; @@ -93,7 +89,7 @@ public class XSSFDataValidation implements DataValidation { this.ctDataValidation = ctDataValidation; this.regions = regions; } - + CTDataValidation getCtDataValidation() { return ctDataValidation; } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationConstraint.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationConstraint.java index b62a38e0a5..3dc04c2ed3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationConstraint.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationConstraint.java @@ -23,10 +23,6 @@ import org.apache.poi.ss.usermodel.DataValidationConstraint; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationType; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationOperator.Enum; -/** - * @author <a href="rjankiraman@emptoris.com">Radhakrishnan J</a> - * - */ public class XSSFDataValidationConstraint implements DataValidationConstraint { /** * Excel validation constraints with static lists are delimited with optional whitespace and the Windows List Separator, @@ -53,10 +49,10 @@ public class XSSFDataValidationConstraint implements DataValidationConstraint { } this.validationType = ValidationType.LIST; setExplicitListValues(explicitListOfValues); - + validate(); } - + public XSSFDataValidationConstraint(int validationType, String formula1) { super(); setFormula1(formula1); @@ -89,11 +85,11 @@ public class XSSFDataValidationConstraint implements DataValidationConstraint { setFormula2(formula2); this.validationType = validationType; this.operator = operator; - + validate(); - + //FIXME: Need to confirm if this is not a formula. - // empirical testing shows Excel saves explicit lists surrounded by double quotes, + // empirical testing shows Excel saves explicit lists surrounded by double quotes, // range formula expressions can't start with quotes (I think - anyone have a creative counter example?) if ( ValidationType.LIST == validationType && this.formula1 != null @@ -142,7 +138,7 @@ public class XSSFDataValidationConstraint implements DataValidationConstraint { */ public void setExplicitListValues(String[] explicitListValues) { this.explicitListOfValues = explicitListValues; - + // for OOXML we need to set formula1 to the quoted csv list of values (doesn't appear documented, but that's where Excel puts its lists) // further, Excel has no escaping for commas in explicit lists, so we don't need to worry about that. if ( explicitListOfValues!=null && explicitListOfValues.length > 0 ) { @@ -155,7 +151,7 @@ public class XSSFDataValidationConstraint implements DataValidationConstraint { builder.append(string); } builder.append(QUOTE); - setFormula1(builder.toString()); + setFormula1(builder.toString()); } } @@ -201,7 +197,7 @@ public class XSSFDataValidationConstraint implements DataValidationConstraint { if (validationType==ValidationType.ANY) { return; } - + if (validationType==ValidationType.LIST ) { if (isFormulaEmpty(formula1)) { throw new IllegalArgumentException("A valid formula or a list of values must be specified for list validation."); @@ -213,7 +209,7 @@ public class XSSFDataValidationConstraint implements DataValidationConstraint { if( isFormulaEmpty(formula1) ) { throw new IllegalArgumentException("Formula is not specified. Formula is required for all validation types except explicit list validation."); } - + if( validationType!= ValidationType.FORMULA ) { if (operator==-1) { throw new IllegalArgumentException("This validation type requires an operator to be specified."); @@ -224,7 +220,7 @@ public class XSSFDataValidationConstraint implements DataValidationConstraint { } } - + public String prettyPrint() { StringBuilder builder = new StringBuilder(); STDataValidationType.Enum vt = XSSFDataValidation.validationTypeMappings.get(validationType); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java index 9e62aa07e7..5508411d4b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java @@ -30,15 +30,11 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationError import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationOperator; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationType; -/** - * @author <a href="rjankiraman@emptoris.com">Radhakrishnan J</a> - * - */ public class XSSFDataValidationHelper implements DataValidationHelper { // Findbugs: URF_UNREAD_FIELD. Do not delete without understanding how this class works. //private XSSFSheet xssfSheet; - - + + public XSSFDataValidationHelper(XSSFSheet xssfSheet) { super(); // Findbugs: URF_UNREAD_FIELD. Do not delete without understanding how this class works. @@ -73,8 +69,8 @@ public class XSSFDataValidationHelper implements DataValidationHelper { return new XSSFDataValidationConstraint(ValidationType.LIST, listFormula); } - - + + public DataValidationConstraint createNumericConstraint(int validationType, int operatorType, String formula1, String formula2) { if( validationType==ValidationType.INTEGER) { return createIntegerConstraint(operatorType, formula1, formula2); @@ -122,23 +118,23 @@ public class XSSFDataValidationHelper implements DataValidationHelper { switch(validationType) { case DataValidationConstraint.ValidationType.LIST: newDataValidation.setType(STDataValidationType.LIST); - newDataValidation.setFormula1(constraint.getFormula1()); + newDataValidation.setFormula1(constraint.getFormula1()); break; - case DataValidationConstraint.ValidationType.ANY: - newDataValidation.setType(STDataValidationType.NONE); + case DataValidationConstraint.ValidationType.ANY: + newDataValidation.setType(STDataValidationType.NONE); break; case DataValidationConstraint.ValidationType.TEXT_LENGTH: newDataValidation.setType(STDataValidationType.TEXT_LENGTH); - break; + break; case DataValidationConstraint.ValidationType.DATE: newDataValidation.setType(STDataValidationType.DATE); - break; + break; case DataValidationConstraint.ValidationType.INTEGER: newDataValidation.setType(STDataValidationType.WHOLE); - break; + break; case DataValidationConstraint.ValidationType.DECIMAL: newDataValidation.setType(STDataValidationType.DECIMAL); - break; + break; case DataValidationConstraint.ValidationType.TIME: newDataValidation.setType(STDataValidationType.TIME); break; @@ -146,9 +142,9 @@ public class XSSFDataValidationHelper implements DataValidationHelper { newDataValidation.setType(STDataValidationType.CUSTOM); break; default: - newDataValidation.setType(STDataValidationType.NONE); + newDataValidation.setType(STDataValidationType.NONE); } - + if (validationType!=ValidationType.ANY && validationType!=ValidationType.LIST) { STDataValidationOperator.Enum op = XSSFDataValidation.operatorTypeMappings.get(constraint.getOperator()); if(op != null) { @@ -161,7 +157,7 @@ public class XSSFDataValidationHelper implements DataValidationHelper { newDataValidation.setFormula2(constraint.getFormula2()); } } - + CellRangeAddress[] cellRangeAddresses = cellRangeAddressList.getCellRangeAddresses(); List<String> sqref = new ArrayList<>(); for (int i = 0; i < cellRangeAddresses.length; i++) { @@ -171,7 +167,7 @@ public class XSSFDataValidationHelper implements DataValidationHelper { newDataValidation.setSqref(sqref); newDataValidation.setAllowBlank(true); newDataValidation.setErrorStyle(STDataValidationErrorStyle.STOP); - + return new XSSFDataValidation(dataValidationConstraint,cellRangeAddressList,newDataValidation); } } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java index bb81b5ff50..b736990d19 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java @@ -40,6 +40,7 @@ public class XSSFDialogsheet extends XSSFSheet implements Sheet{ this.worksheet = CTWorksheet.Factory.newInstance(); } + @Override public XSSFRow createRow(int rowNum) { return null; } diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFont.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFont.java index b6d4465ecc..02bfd2e9de 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFont.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFont.java @@ -45,8 +45,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STUnderlineValues; /** * Represents a font used in a workbook. - * - * @author Gisella Bronzetti */ public class XSSFFont implements Font { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java index 6b359a2988..ec60fdfae3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java @@ -31,9 +31,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTVerticalAlignFontPr import org.openxmlformats.schemas.spreadsheetml.x2006.main.STUnderlineValues; -/** - * @author Yegor Kozlov - */ public class XSSFFontFormatting implements FontFormatting { private IndexedColorMap _colorMap; private CTFont _font; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java index 4a46f641a4..2892e93f0d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java @@ -38,8 +38,6 @@ import org.w3c.dom.NodeList; /** * Represents DrawingML GraphicalObjectFrame. - * - * @author Roman Kashitsyn */ public final class XSSFGraphicFrame extends XSSFShape { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFMap.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFMap.java index 17c12c195b..e4c3891292 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFMap.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFMap.java @@ -37,11 +37,7 @@ import org.w3c.dom.Node; * <p> * This element contains all of the properties related to the XML map, * and the behaviors expected during data refresh operations. - * - * @author Roberto Manicardi */ - - public class XSSFMap { private CTMap ctMap; private MapInfo mapInfo; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java index 21300d47e3..aa76fba89d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFName.java @@ -50,12 +50,9 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDefinedName; * name2.setRefersToFormula("Sheet1!$B$3"); * * </blockquote></pre> - * - * @author Nick Burch - * @author Yegor Kozlov */ public final class XSSFName implements Name { - + /** * A built-in defined name that specifies the workbook's print area */ @@ -356,30 +353,30 @@ public final class XSSFName implements Name { XSSFName cf = (XSSFName) o; return _ctName.toString().equals(cf.getCTName().toString()); } - + /** * https://support.office.com/en-us/article/Define-and-use-names-in-formulas-4D0F13AC-53B7-422E-AFD2-ABD7FF379C64#bmsyntax_rules_for_names - * + * * Valid characters: * First character: { letter | underscore | backslash } * Remaining characters: { letter | number | period | underscore } - * + * * Cell shorthand: cannot be { "C" | "c" | "R" | "r" } - * + * * Cell references disallowed: cannot be a cell reference $A$1 or R1C1 - * + * * Spaces are not valid (follows from valid characters above) - * + * * Name length: (XSSF-specific?) 255 characters maximum - * + * * Case sensitivity: all names are case-insensitive - * + * * Uniqueness: must be unique (for names with the same scope) * * @param name */ private static void validateName(String name) { - + if (name.length() == 0) { throw new IllegalArgumentException("Name cannot be blank"); } @@ -389,7 +386,7 @@ public final class XSSFName implements Name { if (name.equalsIgnoreCase("R") || name.equalsIgnoreCase("C")) { throw new IllegalArgumentException("Invalid name: '"+name+"': cannot be special shorthand R or C"); } - + // is first character valid? char c = name.charAt(0); String allowedSymbols = "_\\"; @@ -397,7 +394,7 @@ public final class XSSFName implements Name { if (!characterIsValid) { throw new IllegalArgumentException("Invalid name: '"+name+"': first character must be underscore or a letter"); } - + // are all other characters valid? allowedSymbols = "_.\\"; //backslashes needed for unicode escape for (final char ch : name.toCharArray()) { @@ -406,13 +403,13 @@ public final class XSSFName implements Name { throw new IllegalArgumentException("Invalid name: '"+name+"': name must be letter, digit, period, or underscore"); } } - + // Is the name a valid $A$1 cell reference // Because $, :, and ! are disallowed characters, A1-style references become just a letter-number combination if (name.matches("[A-Za-z]+\\d+")) { String col = name.replaceAll("\\d", ""); String row = name.replaceAll("[A-Za-z]", ""); - + try { if (CellReference.cellReferenceIsWithinRange(col, row, SpreadsheetVersion.EXCEL2007)) { throw new IllegalArgumentException("Invalid name: '"+name+"': cannot be $A$1-style cell reference"); @@ -422,7 +419,7 @@ public final class XSSFName implements Name { // therefore name passes the not-a-cell-reference criteria } } - + // Is the name a valid R1C1 cell reference? if (name.matches("[Rr]\\d+[Cc]\\d+")) { throw new IllegalArgumentException("Invalid name: '"+name+"': cannot be R1C1-style cell reference"); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPatternFormatting.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPatternFormatting.java index 0f191c28f2..8f5833d6ed 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPatternFormatting.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPatternFormatting.java @@ -25,9 +25,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPatternFill; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STPatternType; -/** - * @author Yegor Kozlov - */ public class XSSFPatternFormatting implements PatternFormatting { IndexedColorMap _colorMap; CTFill _fill; @@ -82,7 +79,7 @@ public class XSSFPatternFormatting implements PatternFormatting { ptrn.setBgColor(color); } } - + public void setFillForegroundColor(Color fg) { XSSFColor xcolor = XSSFColor.toXSSFColor(fg); if (xcolor == null) setFillForegroundColor((CTColor)null); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java index 86f3bd917b..a3fcd66719 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java @@ -42,8 +42,6 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPictureNo /** * Represents a picture shape in a SpreadsheetML drawing. - * - * @author Yegor Kozlov */ public final class XSSFPicture extends XSSFShape implements Picture { private static final Logger LOG = LogManager.getLogger(XSSFPicture.class); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index 571d4fb766..e25f95f1e7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -119,6 +119,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Kept for backwards-compatibility, use {@link Font#TWIPS_PER_POINT} instead. * @deprecated POI 5.0.0 */ + @Deprecated public static final int TWIPS_PER_POINT = Font.TWIPS_PER_POINT; //TODO make the two variable below private! @@ -357,7 +358,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * @param region to merge * @param validate whether to validate merged region * @return 0-based index of this region - * @throws IllegalArgumentException if region contains fewer than 2 cells (this check is inexpensive and is performed regardless of <tt>validate</tt>) + * @throws IllegalArgumentException if region contains fewer than 2 cells (this check is inexpensive and is performed regardless of {@code validate}) * @throws IllegalStateException if region intersects with a multi-cell array formula * @throws IllegalStateException if region intersects with an existing region on this sheet */ @@ -596,7 +597,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * * @param autoCreate if true, then a new VML drawing part is created * - * @return the VML drawing of <code>null</code> if the drawing was not found and autoCreate=false + * @return the VML drawing of {@code null} if the drawing was not found and autoCreate=false */ protected XSSFVMLDrawing getVMLDrawing(boolean autoCreate) { XSSFVMLDrawing drawing = null; @@ -888,7 +889,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Vertical page break information used for print layout view, page layout view, drawing print breaks * in normal view, and for printing the worksheet. * - * @return column indexes of all the vertical page breaks, never <code>null</code> + * @return column indexes of all the vertical page breaks, never {@code null} */ @Override public int[] getColumnBreaks() { @@ -1070,7 +1071,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Flag indicating whether the Fit to Page print option is enabled. * - * @return <code>true</code> + * @return {@code true} */ @Override public boolean getFitToPage() { @@ -1394,7 +1395,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Also sets some attributes on the {@link CTSheetProtection} that correspond to * the default values used by Excel * - * @param password to set for protection. Pass <code>null</code> to remove protection + * @param password to set for protection. Pass {@code null} to remove protection */ @Override public void protectSheet(String password) { @@ -1440,7 +1441,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * defined you get a null. This is to say row 4 represents the fifth row on a sheet. * * @param rownum row to get - * @return <code>XSSFRow</code> representing the rownumber or <code>null</code> if its not defined on the sheet + * @return {@code XSSFRow} representing the rownumber or {@code null} if its not defined on the sheet */ @Override public XSSFRow getRow(int rownum) { @@ -1492,7 +1493,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Horizontal page break information used for print layout view, page layout view, drawing print breaks in normal * view, and for printing the worksheet. * - * @return row indexes of all the horizontal page breaks, never <code>null</code> + * @return row indexes of all the horizontal page breaks, never {@code null} */ @Override public int[] getRowBreaks() { @@ -1511,7 +1512,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * When false a summary row is inserted above the detailed data being summarized and a new outline level * is established on that row. * </p> - * @return <code>true</code> if row summaries appear below detail in the outline + * @return {@code true} if row summaries appear below detail in the outline */ @Override public boolean getRowSumsBelow() { @@ -1532,7 +1533,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * When false a summary row is inserted above the detailed data being summarized and a new outline level * is established on that row. * </p> - * @param value <code>true</code> if row summaries appear below detail in the outline + * @param value {@code true} if row summaries appear below detail in the outline */ @Override public void setRowSumsBelow(boolean value) { @@ -1550,7 +1551,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * When false a summary column is inserted to the left of the detailed data being * summarized and a new outline level is established on that column. * </p> - * @return <code>true</code> if col summaries appear right of the detail in the outline + * @return {@code true} if col summaries appear right of the detail in the outline */ @Override public boolean getRowSumsRight() { @@ -1571,7 +1572,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * When false a summary column is inserted to the left of the detailed data being * summarized and a new outline level is established on that column. * </p> - * @param value <code>true</code> if col summaries appear right of the detail in the outline + * @param value {@code true} if col summaries appear right of the detail in the outline */ @Override public void setRowSumsRight(boolean value) { @@ -1729,7 +1730,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Get the hidden state for a given column. * * @param columnIndex - the column to set (0-based) - * @return hidden - <code>false</code> if the column is visible + * @return hidden - {@code false} if the column is visible */ @Override public boolean isColumnHidden(int columnIndex) { @@ -1740,7 +1741,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Gets the flag indicating whether this sheet should display formulas. * - * @return <code>true</code> if this sheet should display formulas. + * @return {@code true} if this sheet should display formulas. */ @Override public boolean isDisplayFormulas() { @@ -1752,7 +1753,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Gets the flag indicating whether this sheet displays the lines * between rows and columns to make editing and reading easier. * - * @return <code>true</code> (default) if this sheet displays gridlines. + * @return {@code true} (default) if this sheet displays gridlines. * @see #isPrintGridlines() to check if printing of gridlines is turned on or off */ @Override @@ -1767,7 +1768,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * To turn printing of gridlines use {@link #setPrintGridlines(boolean)} * * - * @param show <code>true</code> if this sheet should display gridlines. + * @param show {@code true} if this sheet should display gridlines. * @see #setPrintGridlines(boolean) */ @Override @@ -1786,7 +1787,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Column heading are the letters or numbers that appear above the columns of the sheet * </p> * - * @return <code>true</code> (default) if this sheet should display row and column headings. + * @return {@code true} (default) if this sheet should display row and column headings. */ @Override public boolean isDisplayRowColHeadings() { @@ -1803,7 +1804,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Column heading are the letters or numbers that appear above the columns of the sheet * </p> * - * @param show <code>true</code> if this sheet should display row and column headings. + * @param show {@code true} if this sheet should display row and column headings. */ @Override public void setDisplayRowColHeadings(boolean show) { @@ -1862,7 +1863,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Tests if there is a page break at the indicated row * * @param row index of the row to test - * @return <code>true</code> if there is a page break at the indicated row + * @return {@code true} if there is a page break at the indicated row */ @Override public boolean isRowBroken(int row) { @@ -1891,8 +1892,8 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Sets a page break at the indicated row * Breaks occur above the specified row and left of the specified column inclusive. * - * For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, <code>sheet.setRowBreak(2);</code> + * For example, {@code sheet.setColumnBreak(2);} breaks the sheet into two parts + * with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);} * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * @@ -2100,7 +2101,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Flag indicating whether the sheet displays Automatic Page Breaks. * - * @return <code>true</code> if the sheet displays Automatic Page Breaks. + * @return {@code true} if the sheet displays Automatic Page Breaks. */ @Override public boolean getAutobreaks() { @@ -2113,7 +2114,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Flag indicating whether the sheet displays Automatic Page Breaks. * - * @param value <code>true</code> if the sheet displays Automatic Page Breaks. + * @param value {@code true} if the sheet displays Automatic Page Breaks. */ @Override public void setAutobreaks(boolean value) { @@ -2126,8 +2127,8 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Sets a page break at the indicated column. * Breaks occur above the specified row and left of the specified column inclusive. * - * For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, <code>sheet.setRowBreak(2);</code> + * For example, {@code sheet.setColumnBreak(2);} breaks the sheet into two parts + * with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);} * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * @@ -2502,7 +2503,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * * <p> * Character width is defined as the maximum digit width - * of the numbers <code>0, 1, 2, ... 9</code> as rendered + * of the numbers {@code 0, 1, 2, ... 9} as rendered * using the default font (first font in the workbook). * <br> * Unless you are using a very special font, the default character is '0' (zero), @@ -2518,18 +2519,18 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * To compute the actual number of visible characters, * Excel uses the following formula (Section 3.3.1.12 of the OOXML spec): * </p> - * <code> + * {@code * width = Truncate([{Number of Visible Characters} * * {Maximum Digit Width} + {5 pixel padding}]/{Maximum Digit Width}*256)/256 - * </code> + * } * <p>Using the Calibri font as an example, the maximum digit width of 11 point font size is 7 pixels (at 96 dpi). - * If you set a column width to be eight characters wide, e.g. <code>setColumnWidth(columnIndex, 8*256)</code>, + * If you set a column width to be eight characters wide, e.g. {@code setColumnWidth(columnIndex, 8*256)}, * then the actual value of visible characters (the value shown in Excel) is derived from the following equation: - * <code> + * {@code Truncate([numChars*7+5]/7*256)/256 = 8; - * </code> + * } * - * which gives <code>7.29</code>. + * which gives {@code 7.29}. * * @param columnIndex - the column to set (0-based) * @param width - the width in units of 1/256th of a character width @@ -2555,7 +2556,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * This value does not include margin padding or extra padding for gridlines. It is only the * number of characters. * - * @param width the number of characters. Default value is <code>8</code>. + * @param width the number of characters. Default value is {@code 8}. */ @Override public void setDefaultColumnWidth(int width) { @@ -2588,7 +2589,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Sets the flag indicating whether this sheet should display formulas. * - * @param show <code>true</code> if this sheet should display formulas. + * @param show {@code true} if this sheet should display formulas. */ @Override public void setDisplayFormulas(boolean show) { @@ -2600,7 +2601,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Flag indicating whether the Fit to Page print option is enabled. * - * @param b <code>true</code> if the Fit to Page print option is enabled. + * @param b {@code true} if the Fit to Page print option is enabled. */ @Override public void setFitToPage(boolean b) { @@ -3342,7 +3343,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * </p> * Note: multiple sheets can be selected, but only one sheet can be active at one time. * - * @return <code>true</code> if this sheet is selected + * @return {@code true} if this sheet is selected */ @Override public boolean isSelected() { @@ -3359,7 +3360,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * </p> * Note: multiple sheets can be selected, but only one sheet can be active at one time. * - * @param value <code>true</code> if this sheet is selected + * @param value {@code true} if this sheet is selected */ @Override public void setSelected(boolean value) { @@ -3402,7 +3403,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { } /** - * Return location of the active cell, e.g. <code>A1</code>. + * Return location of the active cell, e.g. {@code A1}. * * @return the location of the active cell. */ @@ -3526,7 +3527,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * Return a master shared formula by index * * @param sid shared group index - * @return a CTCellFormula bean holding shared formula or <code>null</code> if not found + * @return a CTCellFormula bean holding shared formula or {@code null} if not found */ @Internal public CTCellFormula getSharedFormula(int sid){ @@ -4170,7 +4171,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Get background color of the sheet tab. - * Returns <tt>null</tt> if no sheet tab color is set. + * Returns {@code null} if no sheet tab color is set. * * @return the background color of the sheet tab */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java index 9967a2cf79..00829321f9 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java @@ -56,7 +56,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin * TODO - formulas containing cell references are currently not parsed properly * * @param comparisonOperation - a constant value from - * <tt>{@link org.apache.poi.hssf.record.CFRuleBase.ComparisonOperator}</tt>: <p> + * {@code {@link org.apache.poi.hssf.record.CFRuleBase.ComparisonOperator}}: * <ul> * <li>BETWEEN</li> * <li>NOT_BETWEEN</li> @@ -67,12 +67,13 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin * <li>GE</li> * <li>LE</li> * </ul> - * </p> + * * @param formula1 - formula for the valued, compared with the cell * @param formula2 - second formula (only used with * {@link org.apache.poi.ss.usermodel.ComparisonOperator#BETWEEN}) and * {@link org.apache.poi.ss.usermodel.ComparisonOperator#NOT_BETWEEN} operations) */ + @Override public XSSFConditionalFormattingRule createConditionalFormattingRule( byte comparisonOperation, String formula1, @@ -100,6 +101,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin return rule; } + @Override public XSSFConditionalFormattingRule createConditionalFormattingRule( byte comparisonOperation, String formula) { @@ -112,6 +114,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin * * @param formula - formula for the valued, compared with the cell */ + @Override public XSSFConditionalFormattingRule createConditionalFormattingRule(String formula) { XSSFConditionalFormattingRule rule = new XSSFConditionalFormattingRule(_sheet); CTCfRule cfRule = rule.getCTCfRule(); @@ -122,12 +125,12 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin /** * Create a Databar conditional formatting rule. - * <p>The thresholds and colour for it will be created, but will be - * empty and require configuring with + * <p>The thresholds and colour for it will be created, but will be + * empty and require configuring with * {@link XSSFConditionalFormattingRule#getDataBarFormatting()} * then * {@link XSSFDataBarFormatting#getMinThreshold()} - * and + * and * {@link XSSFDataBarFormatting#getMaxThreshold()} */ public XSSFConditionalFormattingRule createConditionalFormattingRule(XSSFColor color) { @@ -139,6 +142,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin // All done! return rule; } + @Override public XSSFConditionalFormattingRule createConditionalFormattingRule(ExtendedColor color) { return createConditionalFormattingRule((XSSFColor)color); } @@ -147,11 +151,12 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin * A factory method allowing the creation of conditional formatting * rules using an Icon Set / Multi-State formatting. * The thresholds for it will be created, but will be empty - * and require configuring with + * and require configuring with * {@link XSSFConditionalFormattingRule#getMultiStateFormatting()} * then * {@link XSSFIconMultiStateFormatting#getThresholds()} */ + @Override public XSSFConditionalFormattingRule createConditionalFormattingRule(IconSet iconSet) { XSSFConditionalFormattingRule rule = new XSSFConditionalFormattingRule(_sheet); @@ -164,14 +169,15 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin /** * Create a Color Scale / Color Gradient conditional formatting rule. - * <p>The thresholds and colours for it will be created, but will be - * empty and require configuring with + * <p>The thresholds and colours for it will be created, but will be + * empty and require configuring with * {@link XSSFConditionalFormattingRule#getColorScaleFormatting()} * then * {@link XSSFColorScaleFormatting#getThresholds()} * and * {@link XSSFColorScaleFormatting#getColors()} */ + @Override public XSSFConditionalFormattingRule createConditionalFormattingColorScaleRule() { XSSFConditionalFormattingRule rule = new XSSFConditionalFormattingRule(_sheet); @@ -182,6 +188,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin return rule; } + @Override public int addConditionalFormatting(CellRangeAddress[] regions, ConditionalFormattingRule[] cfRules) { if (regions == null) { throw new IllegalArgumentException("regions must not be null"); @@ -214,6 +221,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin return _sheet.getCTWorksheet().sizeOfConditionalFormattingArray() - 1; } + @Override public int addConditionalFormatting(CellRangeAddress[] regions, ConditionalFormattingRule rule1) { @@ -223,6 +231,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin }); } + @Override public int addConditionalFormatting(CellRangeAddress[] regions, ConditionalFormattingRule rule1, ConditionalFormattingRule rule2) { @@ -245,6 +254,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin * @param cf HSSFConditionalFormatting object * @return index of the new Conditional Formatting object */ + @Override public int addConditionalFormatting( ConditionalFormatting cf ) { XSSFConditionalFormatting xcf = (XSSFConditionalFormatting)cf; CTWorksheet sh = _sheet.getCTWorksheet(); @@ -259,6 +269,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin * of the Conditional Formatting object to fetch * @return Conditional Formatting object */ + @Override public XSSFConditionalFormatting getConditionalFormattingAt(int index) { checkIndex(index); CTConditionalFormatting cf = _sheet.getCTWorksheet().getConditionalFormattingArray(index); @@ -268,6 +279,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin /** * @return number of Conditional Formatting objects of the sheet */ + @Override public int getNumConditionalFormattings() { return _sheet.getCTWorksheet().sizeOfConditionalFormattingArray(); } @@ -276,6 +288,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin * removes a Conditional Formatting object by index * @param index of a Conditional Formatting object to remove */ + @Override public void removeConditionalFormatting(int index) { checkIndex(index); _sheet.getCTWorksheet().removeConditionalFormatting(index); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java index 62f6158deb..f8b8486ac4 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java @@ -49,16 +49,13 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTableColumns; import org.openxmlformats.schemas.spreadsheetml.x2006.main.TableDocument; /** - * + * * This class implements the Table Part (Open Office XML Part 4: chapter 3.5.1) - * + * * Columns of this table may contains mappings to a subtree of an XML. The root * element of this subtree can occur multiple times (one for each row of the * table). The child nodes of the root element can be only attributes or * elements with maxOccurs=1 property set. - * - * - * @author Roberto Manicardi */ public class XSSFTable extends POIXMLDocumentPart implements Table { @@ -67,8 +64,8 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { private transient List<XSSFTableColumn> tableColumns; private transient HashMap<String, Integer> columnMap; private transient CellReference startCellReference; - private transient CellReference endCellReference; - private transient String commonXPath; + private transient CellReference endCellReference; + private transient String commonXPath; private transient String name; private transient String styleName; @@ -80,7 +77,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { ctTable = CTTable.Factory.newInstance(); } - /** + /** * @param part The part used to initialize the table * @throws IOException If reading data from the part fails. * @since POI 3.14-Beta1 @@ -89,7 +86,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { super(part); readFrom(part.getInputStream()); } - + /** * Read table XML from an {@link InputStream} * @param is The stream which provides the XML data for the table. @@ -103,7 +100,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { throw new IOException(e.getLocalizedMessage()); } } - + /** * @return owning sheet */ @@ -131,7 +128,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { writeTo(out); out.close(); } - + /** * get the underlying CTTable XML bean * @return underlying OOXML object @@ -140,7 +137,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { public CTTable getCTTable() { return ctTable; } - + /** * Checks if this Table element contains even a single mapping to the map identified by id * @param id the XSSFMap ID @@ -148,22 +145,22 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { */ public boolean mapsTo(long id){ List<XSSFXmlColumnPr> pointers = getXmlColumnPrs(); - + for (XSSFXmlColumnPr pointer: pointers) { if (pointer.getMapId()==id) { return true; } } - + return false; } - + /** - * + * * Calculates the xpath of the root element for the table. This will be the common part * of all the mapping's xpaths * Note: this function caches the result for performance. To flush the cache {@link #updateHeaders()} must be called. - * + * * @return the xpath of the table's root element */ public String getCommonXpath() { @@ -175,16 +172,16 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { String[] tokens = xpath.split("/"); if (commonTokens.length==0) { commonTokens = tokens; - + } else { final int maxLength = Math.min(commonTokens.length, tokens.length); - + for (int i =0; i<maxLength; i++) { if (!commonTokens[i].equals(tokens[i])) { List<String> subCommonTokens = Arrays.asList(commonTokens).subList(0, i); - + String[] container = {}; - + commonTokens = subCommonTokens.toArray(container); break; } @@ -196,7 +193,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { commonTokens[0] = ""; commonXPath = StringUtil.join(commonTokens, "/"); } - + return commonXPath; } @@ -236,10 +233,10 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } return xmlColumnPrs; } - + /** * Add a new column to the right end of the table. - * + * * @param columnName * the unique name of the column, must not be {@code null} * @return the created table column @@ -248,10 +245,10 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { public XSSFTableColumn createColumn(String columnName) { return createColumn(columnName, getColumnCount()); } - + /** * Adds a new column to the table. - * + * * @param columnName * the unique name of the column, or {@code null} for a generated name * @param columnIndex @@ -263,20 +260,20 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { * @since 4.0.0 */ public XSSFTableColumn createColumn(String columnName, int columnIndex) { - + int columnCount = getColumnCount(); if(columnIndex < 0 || columnIndex > columnCount) { throw new IllegalArgumentException("Column index out of bounds"); } - + // Ensure we have Table Columns CTTableColumns columns = ctTable.getTableColumns(); if (columns == null) { columns = ctTable.addNewTableColumns(); } - - // check if name is unique and calculate unique column id - long nextColumnId = 0; + + // check if name is unique and calculate unique column id + long nextColumnId = 0; for (XSSFTableColumn tableColumn : getColumns()) { if (columnName != null && columnName.equalsIgnoreCase(tableColumn.getName())) { throw new IllegalArgumentException("Column '" + columnName @@ -286,18 +283,18 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } // Bug #62740, the logic was just re-using the existing max ID, not incrementing beyond it. nextColumnId++; - + // Add the new Column CTTableColumn column = columns.insertNewTableColumn(columnIndex); columns.setCount(columns.sizeOfTableColumnArray()); - + column.setId(nextColumnId); if(columnName != null) { - column.setName(columnName); + column.setName(columnName); } else { column.setName("Column " + nextColumnId); } - + if (ctTable.getRef() != null) { // calculate new area int newColumnCount = columnCount + 1; @@ -310,12 +307,12 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { setCellRef(newTableArea); } - + updateHeaders(); - + return getColumns().get(columnIndex); } - + /** * Remove a column from the table. * @@ -331,7 +328,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { updateHeaders(); } } - + /** * Remove a column from the table. * @@ -346,18 +343,18 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { if (columnIndex < 0 || columnIndex > getColumnCount() - 1) { throw new IllegalArgumentException("Column index out of bounds"); } - + if(getColumnCount() == 1) { throw new IllegalArgumentException("Table must have at least one column"); } - + CTTableColumns tableColumns = ctTable.getTableColumns(); tableColumns.removeTableColumn(columnIndex); tableColumns.setCount(tableColumns.getTableColumnList().size()); updateReferences(); updateHeaders(); } - + /** * @return the name of the Table, if set */ @@ -367,7 +364,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } return name; } - + /** * Changes the name of the Table * @param newName The name of the table. @@ -392,7 +389,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } return styleName; } - + /** * Changes the name of the Table * @param newStyleName The name of the style. @@ -412,7 +409,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { ctTable.getTableStyleInfo().setName(newStyleName); styleName = newStyleName; } - + /** * @return the display name of the Table, if set */ @@ -437,7 +434,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { * * Does not track updates to underlying changes to CTTable To synchronize * with changes to the underlying CTTable, call {@link #updateReferences()}. - * + * * @return the area of the table * @see "Open Office XML Part 4: chapter 3.5.1.2, attribute ref" * @since 3.17 beta 1 @@ -449,35 +446,35 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { SpreadsheetVersion.EXCEL2007 ); } - + /** * Set the area reference for the cells which this table covers. The area * includes includes header rows and totals rows. Automatically synchronizes * any changes by calling {@link #updateHeaders()}. - * + * * Note: The area's width should be identical to the amount of columns in * the table or the table may be invalid. All header rows, totals rows and * at least one data row must fit inside the area. Updating the area with * this method does not create or remove any columns and does not change any * cell values. - * + * * @see "Open Office XML Part 4: chapter 3.5.1.2, attribute ref" * @since 3.17 beta 1 */ public void setCellReferences(AreaReference refs) { setCellRef(refs); } - + @Internal protected void setCellRef(AreaReference refs) { - + // Strip the sheet name, // CTWorksheet.getTableParts defines in which sheet the table is String ref = refs.formatAsString(); if (ref.indexOf('!') != -1) { ref = ref.substring(ref.indexOf('!')+1); } - + // Update ctTable.setRef(ref); if (ctTable.isSetAutoFilter()) { @@ -494,19 +491,19 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } ctTable.getAutoFilter().setRef(filterRef); } - + // Have everything recomputed updateReferences(); updateHeaders(); } - + /** * Set the area reference for the cells which this table covers. The area * includes includes header rows and totals rows. - * + * * Updating the area with this method will create new column as necessary to * the right side of the table but will not modify any cell values. - * + * * @param tableArea * the new area of the table * @throws IllegalArgumentException @@ -518,7 +515,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { if (tableArea == null) { throw new IllegalArgumentException("AreaReference must not be null"); } - + String areaSheetName = tableArea.getFirstCell().getSheetName(); if (areaSheetName != null && !areaSheetName.equals(getXSSFSheet().getSheetName())) { // TODO to move a table from one sheet to another @@ -526,7 +523,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { throw new IllegalArgumentException( "The AreaReference must not reference a different sheet"); } - + int rowCount = (tableArea.getLastCell().getRow() - tableArea.getFirstCell().getRow()) + 1; int minimumRowCount = 1 + getHeaderRowCount() + getTotalsRowCount(); if (rowCount < minimumRowCount) { @@ -563,7 +560,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { updateHeaders(); } - + /** * Get the area that this table covers. * @@ -580,10 +577,10 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { return null; } } - + /** * @return The reference for the cell in the top-left part of the table - * (see Open Office XML Part 4: chapter 3.5.1.2, attribute ref) + * (see Open Office XML Part 4: chapter 3.5.1.2, attribute ref) * * Does not track updates to underlying changes to CTTable * To synchronize with changes to the underlying CTTable, @@ -595,7 +592,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } return startCellReference; } - + /** * @return The reference for the cell in the bottom-right part of the table * (see Open Office XML Part 4: chapter 3.5.1.2, attribute ref) @@ -625,7 +622,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } } - + /** * Clears the cached values set by {@link #getStartCellReference()} * and {@link #getEndCellReference()}. @@ -641,40 +638,40 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { endCellReference = null; } - + /** * Get the total number of rows in this table, including all * {@linkplain #getHeaderRowCount() header rows} and all * {@linkplain #getTotalsRowCount() totals rows}. (Note: in this version * autofiltering is ignored) - * + * * Returns <code>0</code> if the start or end cell references are not set. - * + * * Does not track updates to underlying changes to CTTable To synchronize * with changes to the underlying CTTable, call {@link #updateReferences()}. - * + * * @return the total number of rows */ public int getRowCount() { CellReference from = getStartCellReference(); CellReference to = getEndCellReference(); - + int rowCount = 0; if (from!=null && to!=null) { rowCount = to.getRow() - from.getRow() + 1; } return rowCount; } - + /** * Get the number of data rows in this table. This does not include any * header rows or totals rows. - * + * * Returns <code>0</code> if the start or end cell references are not set. - * + * * Does not track updates to underlying changes to CTTable To synchronize * with changes to the underlying CTTable, call {@link #updateReferences()}. - * + * * @return the number of data rows * @since 4.0.0 */ @@ -693,11 +690,11 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { /** * Set the number of rows in the data area of the table. This does not * affect any header rows or totals rows. - * + * * If the new row count is less than the current row count, superfluous rows * will be cleared. If the new row count is greater than the current row * count, cells below the table will be overwritten by the table. - * + * * To resize the table without overwriting cells, use * {@link #setArea(AreaReference)} instead. * @@ -781,14 +778,14 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { * Synchronize table headers with cell values in the parent sheet. * Headers <em>must</em> be in sync, otherwise Excel will display a * "Found unreadable content" message on startup. - * + * * If calling both {@link #updateReferences()} and * this method, {@link #updateReferences()} * should be called first. - * + * * Note that a Table <em>must</em> have a header. To reproduce * the equivalent of inserting a table in Excel without Headers, - * manually add cells with values of "Column1", "Column2" etc first. + * manually add cells with values of "Column1", "Column2" etc first. */ public void updateHeaders() { XSSFSheet sheet = (XSSFSheet)getParent(); @@ -841,7 +838,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { // FIXME: replace with org.apache.commons.collections.map.CaseInsensitiveMap final int count = getColumnCount(); columnMap = new HashMap<>(count * 3 / 2); - + int i = 0; for (XSSFTableColumn column : getColumns()) { String columnName = column.getName(); @@ -872,7 +869,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { public boolean isHasTotalsRow() { return ctTable.getTotalsRowShown(); } - + /** * @return 0 for no totals rows, 1 for totals row shown. * Values > 1 are not currently used by Excel up through 2016, and the OOXML spec @@ -891,7 +888,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { public int getHeaderRowCount() { return (int) ctTable.getHeaderRowCount(); } - + /** * @since 3.15 beta 2 */ @@ -919,7 +916,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { public int getEndRowIndex() { return getEndCellReference().getRow(); } - + /** * @since 3.17 beta 1 */ @@ -945,7 +942,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table { } return false; } - + /** * Remove relations */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableColumn.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableColumn.java index 7d1f4661cd..3535233d47 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableColumn.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableColumn.java @@ -25,8 +25,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXmlColumnPr; /** * A table column of an {@link XSSFTable}. Use {@link XSSFTable#createColumn} to * create new table columns. - * - * @author Leonard Kappe + * * @since 4.0.0 */ public class XSSFTableColumn { @@ -62,7 +61,7 @@ public class XSSFTableColumn { /** * Get the identifier of this column, which is is unique per table. - * + * * @return the column id * @since 4.0.0 */ @@ -72,9 +71,9 @@ public class XSSFTableColumn { /** * Set the identifier of this column, which must be unique per table. - * + * * It is up to the caller to enforce the uniqueness of the id. - * + * * @param columnId the column id * @since 4.0.0 */ @@ -84,7 +83,7 @@ public class XSSFTableColumn { /** * Get the name of the column, which is is unique per table. - * + * * @return the column name * @since 4.0.0 */ @@ -94,7 +93,7 @@ public class XSSFTableColumn { /** * Get the name of the column, which is is unique per table. - * + * * @param columnName the column name * @since 4.0.0 */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextBox.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextBox.java index 74c26b9306..a37a11bfa7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextBox.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextBox.java @@ -21,8 +21,6 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape; /** * Represents a text box in a SpreadsheetML drawing. - * - * @author Yegor Kozlov */ public final class XSSFTextBox extends XSSFSimpleShape { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index f64ed3c4cd..cf910a7cd8 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -257,7 +257,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su } /** - * Constructs a XSSFWorkbook object given a OpenXML4J <code>Package</code> object, + * Constructs a XSSFWorkbook object given a OpenXML4J {@code Package} object, * see <a href="https://poi.apache.org/oxml4j/">https://poi.apache.org/oxml4j/</a>. * * <p>Once you have finished working with the Workbook, you should close the package @@ -267,7 +267,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * <p>Creating a XSSFWorkbook from a file-backed OPC Package has a lower memory * footprint than an InputStream backed one. * - * @param pkg the OpenXML4J <code>OPC Package</code> object. + * @param pkg the OpenXML4J {@code OPC Package} object. */ public XSSFWorkbook(OPCPackage pkg) throws IOException { super(pkg); @@ -288,13 +288,13 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * * <p>Using an {@link InputStream} requires more memory than using a File, so * if a {@link File} is available then you should instead do something like - * <pre><code> + * <pre>{@code * OPCPackage pkg = OPCPackage.open(path); * XSSFWorkbook wb = new XSSFWorkbook(pkg); * // work with the wb object * ...... * pkg.close(); // gracefully closes the underlying zip file - * </code></pre> + * }</pre> */ public XSSFWorkbook(InputStream is) throws IOException { this(PackageHelper.open(is)); @@ -823,11 +823,11 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * POI's SpreadsheetAPI silently truncates the input argument to 31 characters. * Example: * - * <pre><code> + * <pre>{@code * Sheet sheet = workbook.createSheet("My very long sheet name which is longer than 31 chars"); // will be truncated * assert 31 == sheet.getSheetName().length(); * assert "My very long sheet name which i" == sheet.getSheetName(); - * </code></pre> + * }</pre> * </p> * * Except the 31-character constraint, Excel applies some other rules: @@ -928,7 +928,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su /** * Finds a font that matches the one with the supplied attributes * - * @return the font with the matched attributes or <code>null</code> + * @return the font with the matched attributes or {@code null} */ @Override public XSSFFont findFont(boolean bold, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline) { @@ -988,7 +988,8 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * {@link #getNames(String name)} returns all named ranges with the given name. * * @param name named range name - * @return XSSFName with the given name. <code>null</code> is returned no named range could be found. + * @return XSSFName with the given name. + * {@code null} is returned no named range could be found. */ @Override public XSSFName getName(String name) { @@ -1045,7 +1046,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * Gets the named range index by name. No longer public and only used in tests. * * @param name named range name - * @return named range index. <code>-1</code> is returned if no named ranges could be found. + * @return named range index. {@code -1} is returned if no named ranges could be found. * * @deprecated 3.16. New projects should avoid accessing named ranges by index. * Use {@link #getName(String)} instead. @@ -1121,7 +1122,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * Get sheet with the given name (case insensitive match) * * @param name of the sheet - * @return XSSFSheet with the name provided or <code>null</code> if it does not exist + * @return XSSFSheet with the name provided or {@code null} if it does not exist */ @Override public XSSFSheet getSheet(String name) { @@ -1151,7 +1152,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * Returns the index of the sheet by his name (case insensitive match) * * @param name the sheet name - * @return index of the sheet (0 based) or <tt>-1</tt> if not found + * @return index of the sheet (0 based) or {@code -1} if not found */ @Override public int getSheetIndex(String name) { @@ -1169,7 +1170,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * Returns the index of the given sheet * * @param sheet the sheet to look up - * @return index of the sheet (0 based). <tt>-1</tt> if not found + * @return index of the sheet (0 based). {@code -1} if not found */ @Override public int getSheetIndex(Sheet sheet) { @@ -1924,7 +1925,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * The calculation chain object specifies the order in which the cells in a workbook were last calculated * </p> * - * @return the <code>CalculationChain</code> object or <code>null</code> if not defined + * @return the {@code CalculationChain} object or {@code null} if not defined */ @Internal public CalculationChain getCalculationChain() { @@ -1942,7 +1943,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * External Links in a formula would be '[1]Foo' which corresponds to * entry 0 in this list.</p> - * @return the <code>ExternalLinksTable</code> list, which may be empty + * @return the {@code ExternalLinksTable} list, which may be empty */ @Internal public List<ExternalLinksTable> getExternalLinksTable() { @@ -2314,7 +2315,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * Returns the data table with the given name (case insensitive). * * @param name the data table name (case-insensitive) - * @return The Data table in the workbook named <tt>name</tt>, or <tt>null</tt> if no table is named <tt>name</tt>. + * @return The Data table in the workbook named {@code name}, or {@code null} if no table is named {@code name}. * @since 3.15 beta 2 */ public XSSFTable getTable(String name) { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java index 926e2a2d87..3799f6c6d7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java @@ -45,8 +45,6 @@ import org.w3c.dom.NodeList; /** * Utility to update formulas and named ranges when a sheet name was changed - * - * @author Yegor Kozlov */ public final class XSSFFormulaUtils { private final XSSFWorkbook _wb; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFSingleXmlCell.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFSingleXmlCell.java index 79cc921a34..5fea3505db 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFSingleXmlCell.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFSingleXmlCell.java @@ -29,11 +29,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXmlPr; * * This class is a wrapper around the CTSingleXmlCell (Open Office XML Part 4: * chapter 3.5.2.1) - * - - * - * @author Roberto Manicardi - * */ public class XSSFSingleXmlCell { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFXmlColumnPr.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFXmlColumnPr.java index 08e9ca05c1..2fdd7fa06d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFXmlColumnPr.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFXmlColumnPr.java @@ -26,9 +26,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXmlColumnPr; * * This class is a wrapper around the CTXmlColumnPr (Open Office XML Part 4: * chapter 3.5.1.7) - * - * - * @author Roberto Manicardi */ public class XSSFXmlColumnPr { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java index 6a29cd3898..3c70801345 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java @@ -23,8 +23,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTMarkupRange; /** * Decorator class for XWPFParagraph allowing to add comments * found in paragraph to its text - * - * @author Yury Batrakov (batrakov at gmail.com) */ public class XWPFCommentsDecorator extends XWPFParagraphDecorator { private StringBuilder commentText; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BodyElementType.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BodyElementType.java index d93ba9d0b6..3584450f59 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BodyElementType.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BodyElementType.java @@ -17,16 +17,6 @@ package org.apache.poi.xwpf.usermodel; -/** - * <p> - * 9 Jan 2010 - * </p> - * <p> - * // TODO insert Javadoc here! - * </p> - * - * @author epp - */ public enum BodyElementType { CONTENTCONTROL, PARAGRAPH, diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/Borders.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/Borders.java index d77e7f088f..f2763f4fab 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/Borders.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/Borders.java @@ -34,8 +34,6 @@ import java.util.Map; * element * </li> * </ul> - * - * @author Gisella Bronzetti */ public enum Borders { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java index 895c143b0c..33ece8f2e7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakClear.java @@ -23,8 +23,6 @@ import java.util.Map; * Specifies the set of possible restart locations which may be used as to * determine the next available line when a break's type attribute has a value * of textWrapping. - * - * @author Gisella Bronzetti */ public enum BreakClear { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakType.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakType.java index aea132db97..f86a89e25f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakType.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BreakType.java @@ -24,8 +24,6 @@ import java.util.Map; * document. * The break type determines the next location where text shall be * placed after this manual break is applied to the text contents - * - * @author Gisella Bronzetti */ public enum BreakType { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/IBodyElement.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/IBodyElement.java index 2585459215..16e7c71a82 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/IBodyElement.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/IBodyElement.java @@ -21,8 +21,6 @@ import org.apache.poi.ooxml.POIXMLDocumentPart; /** * 9 Jan 2010 - * - * @author Philipp Epp */ public interface IBodyElement { IBody getBody(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java index 836069d0d5..b8b6fbde71 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java @@ -22,8 +22,6 @@ import java.util.Map; /** * Specifies the logic which shall be used to calculate the line spacing of the * parent object when it is displayed in the document. - * - * @author Gisella Bronzetti */ public enum LineSpacingRule { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java index e3599032f8..be9e8e6efc 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java @@ -25,8 +25,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc; /** * Specifies all types of alignment which are available to be applied to objects in a * WordprocessingML document - * - * @author Yegor Kozlov */ public enum ParagraphAlignment { //YK: TODO document each alignment option diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/TextAlignment.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/TextAlignment.java index 6ed8dc00e4..3fb8231589 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/TextAlignment.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/TextAlignment.java @@ -22,8 +22,6 @@ import java.util.Map; /** * Specifies all types of vertical alignment which are available to be applied to of all text * on each line displayed within a paragraph. - * - * @author Gisella Bronzetti */ public enum TextAlignment { /** diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java index f863d79fbf..0e27f429f3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java @@ -22,8 +22,6 @@ import java.util.Map; /** * Specifies the types of patterns which may be used to create the underline * applied beneath the text in a run. - * - * @author Gisella Bronzetti */ public enum UnderlinePatterns { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java index 209e006dca..64f34cbb20 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java @@ -24,8 +24,6 @@ import java.util.Map; * relation to the default appearance of the run's text. This allows the text to * be repositioned as subscript or superscript without altering the font size of * the run properties. - * - * @author Gisella Bronzetti */ public enum VerticalAlign { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFAbstractNum.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFAbstractNum.java index ac95c29ab2..0ccbc0571a 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFAbstractNum.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFAbstractNum.java @@ -19,9 +19,6 @@ package org.apache.poi.xwpf.usermodel; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTAbstractNum; -/** - * @author Philipp Epp - */ public class XWPFAbstractNum { protected XWPFNumbering numbering; private CTAbstractNum ctAbstractNum; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFHyperlink.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFHyperlink.java index c00f75a890..2948463b6b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFHyperlink.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFHyperlink.java @@ -18,8 +18,6 @@ package org.apache.poi.xwpf.usermodel; /** * Sketch of XWPF hyperlink class - * - * @author Yury Batrakov (batrakov at gmail.com) */ public class XWPFHyperlink { String id, url; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java index 581c0128a4..292c831b03 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java @@ -38,9 +38,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNum; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNumbering; import org.openxmlformats.schemas.wordprocessingml.x2006.main.NumberingDocument; -/** - * @author Philipp Epp - */ public class XWPFNumbering extends POIXMLDocumentPart { protected List<XWPFAbstractNum> abstractNums = new ArrayList<>(); protected List<XWPFNum> nums = new ArrayList<>(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPicture.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPicture.java index f46d2cd158..5449c3bfd7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPicture.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPicture.java @@ -23,9 +23,6 @@ import org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties; import org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture; -/** - * @author Philipp Epp - */ public class XWPFPicture { private CTPicture ctPic; @@ -78,7 +75,7 @@ public class XWPFPicture { } return null; } - + /** * Returns the width of the picture (in points). * @@ -87,9 +84,9 @@ public class XWPFPicture { public double getWidth() { return Units.toPoints(ctPic.getSpPr().getXfrm().getExt().getCx()); } - + /** - * Returns the depth of the picture (in points). + * Returns the depth of the picture (in points). * * @since POI 4.1.1 */ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java index 548c614661..2674b2f541 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java @@ -31,8 +31,6 @@ import org.apache.poi.util.IOUtils; /** * Raw picture data, normally attached to a WordprocessingML Drawing. * As a rule, pictures are stored in the /word/media/ part of a WordprocessingML package. - * - * @author Philipp Epp */ public class XWPFPictureData extends POIXMLDocumentPart { @@ -69,13 +67,13 @@ public class XWPFPictureData extends POIXMLDocumentPart { * Construct XWPFPictureData from a package part * * @param part the package part holding the drawing data, - * + * * @since POI 3.14-Beta1 */ public XWPFPictureData(PackagePart part) { super(part); } - + @Override protected void onDocumentRead() throws IOException { super.onDocumentRead(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java index d67a8303b9..a3989aa7e2 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java @@ -25,9 +25,6 @@ import org.apache.poi.ooxml.POIXMLRelation; import org.apache.poi.openxml4j.opc.PackageRelationshipTypes; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -/** - * @author Yegor Kozlov - */ public final class XWPFRelation extends POIXMLRelation { /** diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFStyle.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFStyle.java index 05f59189a5..c141d8c2c8 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFStyle.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFStyle.java @@ -20,9 +20,6 @@ package org.apache.poi.xwpf.usermodel; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTStyle; import org.openxmlformats.schemas.wordprocessingml.x2006.main.STStyleType; -/** - * @author Philipp Epp - */ public class XWPFStyle { protected XWPFStyles styles; diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestFileHelper.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestFileHelper.java index 7a5d012fed..c1998ca132 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestFileHelper.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestFileHelper.java @@ -27,8 +27,6 @@ import org.junit.jupiter.api.Test; /** * Test TestFileHelper class. - * - * @author Julien Chable */ public final class TestFileHelper { diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/ZipFileAssert.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/ZipFileAssert.java index fcc6e3cff8..598630546b 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/ZipFileAssert.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/ZipFileAssert.java @@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; @@ -76,7 +75,7 @@ public final class ZipFileAssert { withDifferenceEvaluator(new IgnoreXMLDeclEvaluator()). withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndAllAttributes, ElementSelectors.byNameAndText)). build(); - assertFalse(diff.hasDifferences(), fileName+": "+diff.toString()); + assertFalse(diff.hasDifferences(), fileName+": "+ diff); } else { // not xml, may be an image or other binary format Assertions.assertEquals(contain1.size(), contain2.size(), fileName + " does not have the same size in both zip:"); @@ -118,10 +117,8 @@ public final class ZipFileAssert { } /** - * Asserts that two files are equal. Throws an <tt>AssertionFailedError</tt> + * Asserts that two files are equal. Throws an {@code AssertionFailedError} * if they are not. - * <p> - * */ public static void assertEquals(File expected, File actual) { assertNotNull(expected); diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/compliance/TestOPCCompliancePartName.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/compliance/TestOPCCompliancePartName.java index edfe0fea3e..c353234cd1 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/compliance/TestOPCCompliancePartName.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/compliance/TestOPCCompliancePartName.java @@ -80,8 +80,6 @@ import org.junit.jupiter.api.Test; * * Part name equivalence is determined by comparing part names as * case-insensitive ASCII strings. [M1.12] - * - * @author Julien Chable */ public final class TestOPCCompliancePartName { diff --git a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java index 938d8a6622..83b79e1cb2 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java +++ b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java @@ -412,6 +412,7 @@ class TestSignatureInfo { CommitableWorkbook(OPCPackage pkg) throws IOException { super(pkg); } + @Override public void commit() throws IOException { super.commit(); } diff --git a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestFormulaParser.java b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestFormulaParser.java index 5d1c7d8e31..18e189b03c 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestFormulaParser.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/TestFormulaParser.java @@ -43,8 +43,6 @@ import org.junit.jupiter.api.Test; /** * Test {@link FormulaParser}'s handling of row numbers at the edge of the * HSSF/XSSF ranges. - * - * @author David North */ class TestFormulaParser { diff --git a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/eval/TestXSSFCircularReferences.java b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/eval/TestXSSFCircularReferences.java index 114f70a13e..127c602680 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/eval/TestXSSFCircularReferences.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/formula/eval/TestXSSFCircularReferences.java @@ -22,8 +22,6 @@ import org.apache.poi.xssf.XSSFITestDataProvider; /** * Tests XSSFFormulaEvaluator for its handling of cell formula circular references. - * - * @author Josh Micich */ public final class TestXSSFCircularReferences extends BaseTestCircularReferences { public TestXSSFCircularReferences() { diff --git a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestXSSFBorderStyle.java b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestXSSFBorderStyle.java index d191c7ab7c..25aba7aaad 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestXSSFBorderStyle.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/usermodel/TestXSSFBorderStyle.java @@ -20,9 +20,6 @@ package org.apache.poi.ss.tests.usermodel; import org.apache.poi.ss.usermodel.BaseTestBorderStyle; import org.apache.poi.xssf.XSSFITestDataProvider; -/** - * @author Yegor Kozlov - */ public final class TestXSSFBorderStyle extends BaseTestBorderStyle { public TestXSSFBorderStyle() { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/XSLFTestDataSamples.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/XSLFTestDataSamples.java index 72ed16f94b..d902c12714 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/XSLFTestDataSamples.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/XSLFTestDataSamples.java @@ -25,9 +25,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; -/** - * @author Yegor Kozlov - */ public class XSLFTestDataSamples { public static XMLSlideShow openSampleDocument(String sampleName) { @@ -52,7 +49,7 @@ public class XSLFTestDataSamples { } catch (IOException e) { throw new RuntimeException(e); } - + InputStream bais; bais = new ByteArrayInputStream(baos.toByteArray()); try { @@ -67,6 +64,6 @@ public class XSLFTestDataSamples { throw new RuntimeException(e); } } - + } } diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSheet.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSheet.java index cd467554e3..da81218db2 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSheet.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSheet.java @@ -26,8 +26,6 @@ import org.junit.jupiter.api.Test; /** * test common properties for sheets (slides, masters, layouts, etc.) - * - * @author Yegor Kozlov */ class TestXSLFSheet { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlide.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlide.java index 3b83355369..6ba6751052 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlide.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlide.java @@ -31,9 +31,6 @@ import java.util.List; import org.apache.poi.xslf.XSLFTestDataSamples; import org.junit.jupiter.api.Test; -/** - * @author Yegor Kozlov - */ class TestXSLFSlide { @Test diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlideShow.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlideShow.java index 7e47a24b0a..adcbf3f34b 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlideShow.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFSlideShow.java @@ -28,9 +28,6 @@ import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.xslf.XSLFTestDataSamples; import org.junit.jupiter.api.Test; -/** - * @author Yegor Kozlov - */ class TestXSLFSlideShow { @Test void testCreateSlide() throws IOException { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java index 04fa9551d1..fc62cc945b 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextBox.java @@ -25,9 +25,6 @@ import org.apache.poi.sl.usermodel.Placeholder; import org.junit.jupiter.api.Test; import org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties; -/** - * @author Yegor Kozlov - */ class TestXSLFTextBox { @Test diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextRun.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextRun.java index 783e8abe4d..7e92cea273 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextRun.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTextRun.java @@ -36,9 +36,6 @@ import org.openxmlformats.schemas.drawingml.x2006.main.CTTextLineBreak; import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph; import org.openxmlformats.schemas.presentationml.x2006.main.CTShape; -/** - * @author Yegor Kozlov - */ class TestXSLFTextRun { @Test diff --git a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTheme.java b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTheme.java index 54f66f6b8b..a6bb976cb3 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTheme.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xslf/usermodel/TestXSLFTheme.java @@ -34,8 +34,6 @@ import org.junit.jupiter.api.Test; /** * test reading properties from a multi-theme and multi-master document - * - * @author Yegor Kozlov */ class TestXSLFTheme { @Test diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/SXSSFITestDataProvider.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/SXSSFITestDataProvider.java index 90de9c5977..744b02beb0 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/SXSSFITestDataProvider.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/SXSSFITestDataProvider.java @@ -37,14 +37,11 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -/** - * @author Yegor Kozlov - */ public final class SXSSFITestDataProvider implements ITestDataProvider { public static final SXSSFITestDataProvider instance = new SXSSFITestDataProvider(); // an instance of all SXSSFWorkbooks opened by this TestDataProvider, - // so that the temporary files created can be disposed up by cleanup() + // so that the temporary files created can be disposed up by cleanup() private final Collection<SXSSFWorkbook> instances = new ArrayList<>(); private SXSSFITestDataProvider() { @@ -89,7 +86,7 @@ public final class SXSSFITestDataProvider implements ITestDataProvider { instances.add(wb); return wb; } - + //************ SXSSF-specific methods ***************// @Override public SXSSFWorkbook createWorkbook(int rowAccessWindowSize) { @@ -97,13 +94,13 @@ public final class SXSSFITestDataProvider implements ITestDataProvider { instances.add(wb); return wb; } - + @Override public void trackAllColumnsForAutosizing(Sheet sheet) { ((SXSSFSheet)sheet).trackAllColumnsForAutoSizing(); } //************ End SXSSF-specific methods ***************// - + @Override public FormulaEvaluator createFormulaEvaluator(Workbook wb) { return new XSSFFormulaEvaluator(((SXSSFWorkbook) wb).getXSSFWorkbook()); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFITestDataProvider.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFITestDataProvider.java index e0ba6617ca..6876b9b61f 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFITestDataProvider.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFITestDataProvider.java @@ -26,9 +26,6 @@ import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -/** - * @author Yegor Kozlov - */ public final class XSSFITestDataProvider implements ITestDataProvider { public static final XSSFITestDataProvider instance = new XSSFITestDataProvider(); @@ -53,17 +50,17 @@ public final class XSSFITestDataProvider implements ITestDataProvider { public XSSFWorkbook createWorkbook() { return new XSSFWorkbook(); } - + //************ SXSSF-specific methods ***************// @Override public XSSFWorkbook createWorkbook(int rowAccessWindowSize) { return createWorkbook(); } - + @Override public void trackAllColumnsForAutosizing(Sheet sheet) {} //************ End SXSSF-specific methods ***************// - + @Override public FormulaEvaluator createFormulaEvaluator(Workbook wb) { return new XSSFFormulaEvaluator((XSSFWorkbook) wb); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java index b981b9994e..6beb153bd2 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java @@ -33,8 +33,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; /** * Centralises logic for finding/opening sample files in the test-data/spreadsheet folder. - * - * @author Josh Micich */ public class XSSFTestDataSamples { /** diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java index 5a6afb7e20..e85998cb12 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java @@ -50,9 +50,6 @@ import org.junit.jupiter.api.Test; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; -/** - * @author Roberto Manicardi - */ public final class TestXSSFExportToXML { @Test diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/model/TestMapInfo.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/model/TestMapInfo.java index 290e5fcd0c..b0960fc5d7 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/model/TestMapInfo.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/model/TestMapInfo.java @@ -30,9 +30,6 @@ import org.junit.jupiter.api.Test; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMapInfo; import org.w3c.dom.Node; -/** - * @author Roberto Manicardi - */ public final class TestMapInfo { @Test void testMapInfoExists() throws IOException { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFHyperlink.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFHyperlink.java index a29d0166e3..fb65eca044 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFHyperlink.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFHyperlink.java @@ -28,8 +28,6 @@ import org.apache.poi.xssf.usermodel.XSSFHyperlink; /** * Test setting hyperlinks in SXSSF - * - * @author Yegor Kozlov */ class TestSXSSFHyperlink extends BaseTestHyperlink { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestSXSSFSheetAutosizeColumn.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestSXSSFSheetAutosizeColumn.java index 38ff1fc352..cc162c3820 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestSXSSFSheetAutosizeColumn.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestSXSSFSheetAutosizeColumn.java @@ -23,9 +23,6 @@ import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.SXSSFITestDataProvider; import org.apache.poi.xssf.streaming.SXSSFSheet; -/** - * @author Yegor Kozlov - */ public final class TestSXSSFSheetAutosizeColumn extends BaseTestSheetAutosizeColumn { public TestSXSSFSheetAutosizeColumn(){ diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java index 4c9baa3a04..679c3c60bf 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java @@ -57,8 +57,6 @@ import org.junit.jupiter.api.Test; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRow; /** - * @author centic - * * This testcase contains tests for bugs that are yet to be fixed. Therefore, * the standard ant test target does not run these tests. Run this testcase with * the single-test target. The names of the tests usually correspond to the diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFPictureData.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFPictureData.java index 5f8514c87b..9842e9ea58 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFPictureData.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFPictureData.java @@ -29,9 +29,6 @@ import org.apache.poi.util.LocaleUtil; import org.apache.poi.xssf.XSSFTestDataSamples; import org.junit.jupiter.api.Test; -/** - * @author Yegor Kozlov - */ public final class TestXSSFPictureData { @Test void testRead() throws IOException { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xwpf/TestAllExtendedProperties.java b/poi-ooxml/src/test/java/org/apache/poi/xwpf/TestAllExtendedProperties.java index 09355e810d..ce6fd93ba4 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/TestAllExtendedProperties.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/TestAllExtendedProperties.java @@ -43,8 +43,6 @@ import org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTVect * The author of this has added {@link CoreProperties#getKeywords()} and * {@link CoreProperties#setKeywords(String)} and this test is supposed to test * them. - * - * @author Antoni Mylka */ public final class TestAllExtendedProperties { @Test diff --git a/poi-ooxml/src/test/java/org/apache/poi/xwpf/XWPFTestDataSamples.java b/poi-ooxml/src/test/java/org/apache/poi/xwpf/XWPFTestDataSamples.java index d7cb2c23ad..b24d0bf46c 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/XWPFTestDataSamples.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/XWPFTestDataSamples.java @@ -25,9 +25,6 @@ import org.apache.poi.POIDataSamples; import org.apache.poi.util.IOUtils; import org.apache.poi.xwpf.usermodel.XWPFDocument; -/** - * @author Yegor Kozlov - */ public class XWPFTestDataSamples { public static XWPFDocument openSampleDocument(String sampleName) throws IOException { diff --git a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java index 5e34741aed..adee241f69 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java @@ -26,9 +26,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -/** - * @author Paolo Mottadelli - */ public final class TestXWPFHeadings { private static final String HEADING1 = "Heading1"; |