From ac57e34264305add6076f18173876135f3da1ed0 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Wed, 5 Nov 2014 22:26:00 +0000 Subject: 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 --- .../apache/poi/xwpf/extractor/TestXWPFWordExtractor.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ooxml/testcases/org/apache/poi/xwpf') 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(); + } } -- cgit v1.2.3