aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2010-08-18 12:49:05 +0000
committerYegor Kozlov <yegor@apache.org>2010-08-18 12:49:05 +0000
commitfaa64fa1f42d6204a841a6e4b6e172dfc4a892b4 (patch)
tree04225d74098c8a3b7bfe0979366c10885aea476e /src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
parentbe31b2271549a722bee8a765a591f362e1113569 (diff)
downloadpoi-faa64fa1f42d6204a841a6e4b6e172dfc4a892b4.tar.gz
poi-faa64fa1f42d6204a841a6e4b6e172dfc4a892b4.zip
support for protecting a XSSF workbook, see Bugzilla #48900
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@986649 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
index 7613da4d87..da3eb8564f 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
@@ -640,4 +640,18 @@ public abstract class BaseTestSheet extends TestCase {
sheet.setColumnHidden(2, true);
assertTrue(sheet.isColumnHidden(2));
}
+
+ public void testProtectSheet() {
+
+ Workbook wb = _testDataProvider.createWorkbook();
+ Sheet sheet = wb.createSheet();
+ assertFalse(sheet.getProtect());
+ sheet.protectSheet("Test");
+ assertTrue(sheet.getProtect());
+ sheet.protectSheet(null);
+ assertFalse(sheet.getProtect());
+
+ }
+
+
}