aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/testcases
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2012-01-11 14:02:40 +0000
committerNick Burch <nick@apache.org>2012-01-11 14:02:40 +0000
commit57c4509faabf7025bc52ecfe90684512b2cf01a4 (patch)
tree3c625db3caab689913fb6096df9c420b66572d9d /src/ooxml/testcases
parentee24b94d8052851ba6dccf5ff712020e62ff1dce (diff)
downloadpoi-57c4509faabf7025bc52ecfe90684512b2cf01a4.tar.gz
poi-57c4509faabf7025bc52ecfe90684512b2cf01a4.zip
Fix bug #52449 - Support writing XWPF documents with glossaries (plus fix some indenting)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1230045 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
index 156e1b5802..3c13504cdf 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
@@ -68,8 +68,18 @@ public class TestXWPFStyles extends TestCase {
assertTrue(styles.styleExist(strStyleName));
}
-// protected void tearDown() throws Exception {
-// super.tearDown();
-// }
+ /**
+ * Bug #52449 - We should be able to write a file containing
+ * both regular and glossary styles without error
+ */
+ public void test52449() throws Exception {
+ XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("52449.docx");
+ XWPFStyles styles = doc.getStyles();
+ assertNotNull(styles);
+
+ XWPFDocument docIn = XWPFTestDataSamples.writeOutAndReadBack(doc);
+ styles = docIn.getStyles();
+ assertNotNull(styles);
+ }
}