aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/testcases/org/apache/poi/xwpf
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2014-11-05 22:26:00 +0000
committerDominik Stadler <centic@apache.org>2014-11-05 22:26:00 +0000
commitac57e34264305add6076f18173876135f3da1ed0 (patch)
tree484d50efba549ae8dd55808fb98297dc403a449c /src/ooxml/testcases/org/apache/poi/xwpf
parent9bb00e4228d77656c651fa0b7bd10a4e56f07d08 (diff)
downloadpoi-ac57e34264305add6076f18173876135f3da1ed0.tar.gz
poi-ac57e34264305add6076f18173876135f3da1ed0.zip
github-7 - Form check box extraction with XWPFWordExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1636990 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases/org/apache/poi/xwpf')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java b/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
index d63bd642de..00408829df 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
@@ -397,4 +397,17 @@ public class TestXWPFWordExtractor extends TestCase {
extractor.getText();
extractor.close();
}
+
+ public void testCheckboxes() throws IOException {
+ XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("checkboxes.docx");
+ System.out.println(doc);
+ XWPFWordExtractor extractor = new XWPFWordExtractor(doc);
+
+ assertEquals("This is a small test for checkboxes \nunchecked: |_| \n" +
+ "Or checked: |X|\n\n\n\n\n" +
+ "Test a checkbox within a textbox: |_| -> |X|\n\n\n" +
+ "In Table:\n|_|\t|X|\n\n\n" +
+ "In Sequence:\n|X||_||X|\n", extractor.getText());
+ extractor.close();
+ }
}