From 0b863c29a12e251f1d77beafa58f3c63268efb3c Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 5 Apr 2022 10:43:54 +0000 Subject: [PATCH] [github-319] fix javadoc on setColumnHidden. Thanks to CodeMonkeyLab. This closes #319 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899580 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java | 4 ++-- .../main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java | 4 ++-- .../main/java/org/apache/poi/hssf/model/InternalSheet.java | 3 ++- .../main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java | 4 ++-- poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java index 8b6ca89ce6..081a1f4b65 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java @@ -199,10 +199,10 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions { } /** - * Get the visibility state for a given column + * Set the visibility state for a given column * * @param columnIndex - the column to get (0-based) - * @param hidden - the visiblity state of the column + * @param hidden - the visibility state of the column */ @Override public void setColumnHidden(int columnIndex, boolean hidden) { 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 cd001179c6..783c70a018 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 @@ -2455,10 +2455,10 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet, OoxmlSheetEx } /** - * Get the visibility state for a given column. + * Set the visibility state for a given column. * * @param columnIndex - the column to get (0-based) - * @param hidden - the visiblity state of the column + * @param hidden - the visibility state of the column */ @Override public void setColumnHidden(int columnIndex, boolean hidden) { diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java index e580fd86ac..8deeec15a3 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java @@ -1066,13 +1066,14 @@ public final class InternalSheet { } /** - * Get the hidden property for a given column. + * Set the hidden property for a given column. * @param column - the column number * @param hidden - whether the column is hidden or not */ public void setColumnHidden(int column, boolean hidden) { setColumn( column, null, null, null, hidden, null); } + public void setDefaultColumnStyle(int column, int styleIndex) { setColumn(column, (short) styleIndex, null, null, null, null); } diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java index 5026f001a2..bf87959812 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java @@ -476,10 +476,10 @@ public final class HSSFSheet implements Sheet { } /** - * Get the visibility state for a given column. + * Set the visibility state for a given column. * * @param columnIndex - the column to get (0-based) - * @param hidden - the visiblity state of the column + * @param hidden - the visibility state of the column */ @Override public void setColumnHidden(int columnIndex, boolean hidden) { diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java b/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java index ee03e35ea7..fd946eb45e 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/Sheet.java @@ -118,7 +118,7 @@ public interface Sheet extends Iterable { int getLastRowNum(); /** - * Get the visibility state for a given column + * Set the visibility state for a given column * * @param columnIndex - the column to get (0-based) * @param hidden - the visibility state of the column