aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2009-02-24 08:38:16 +0000
committerYegor Kozlov <yegor@apache.org>2009-02-24 08:38:16 +0000
commit2ef665caf691d9b5514c1d474061332ccdddac10 (patch)
treedf4cf1705e54e7555b7109f4cb610aff798c7ca5 /src/ooxml/java/org
parent2c52226d5f6cd687116bf4bbc2dce23f166e2f41 (diff)
downloadpoi-2ef665caf691d9b5514c1d474061332ccdddac10.tar.gz
poi-2ef665caf691d9b5514c1d474061332ccdddac10.zip
added setDisplayZeros / isDisplayZeros and getMergedRegion(int) to common interface org.apache.poi.ss.usermodel.Sheet; more progress on testing common xssf-hssf interfaces
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@747307 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org')
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index e44208b75e..bdc917d839 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -540,6 +540,28 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
}
/**
+ * Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value.
+ * When false, cells with zero value appear blank instead of showing the number zero.
+ *
+ * @return whether all zero values on the worksheet are displayed
+ */
+ public boolean isDisplayZeros(){
+ CTSheetView view = getDefaultSheetView();
+ return view == null ? true : view.getShowZeros();
+ }
+
+ /**
+ * Set whether the window should show 0 (zero) in cells containing zero value.
+ * When false, cells with zero value appear blank instead of showing the number zero.
+ *
+ * @param value whether to display or hide all zero values on the worksheet
+ */
+ public void setDisplayZeros(boolean value){
+ CTSheetView view = getSheetTypeSheetView();
+ view.setShowZeros(value);
+ }
+
+ /**
* Gets the first row on the sheet
*
* @return the number of the first logical row on the sheet, zero based