From e2c597c016b79c97d978a9e8ead710d9daf6a792 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Thu, 8 Nov 2012 19:52:20 +0000 Subject: [PATCH] Bugzilla 54099 - Ensure that CTHMerge and CTTcBorders go to poi-ooxml-schemas jar git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1407242 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/status.xml | 1 + .../poi/xwpf/usermodel/TestXWPFTableCell.java | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 50f9edc54..c39312745 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 54099 - Ensure that CTHMerge and CTTcBorders go to poi-ooxml-schemas jar 54111 - Fixed extracting text from table cells in HSLF 52583 - add support for drop-down lists in doc to html convertion 52863 - add workaround for files with broken CHP SPRMs diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTableCell.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTableCell.java index cf28ffd0c..644b9e61c 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTableCell.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTableCell.java @@ -22,11 +22,7 @@ package org.apache.poi.xwpf.usermodel; import junit.framework.TestCase; import org.apache.poi.xwpf.usermodel.XWPFTableCell.XWPFVertAlign; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShd; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTVerticalJc; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.STShd; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc; +import org.openxmlformats.schemas.wordprocessingml.x2006.main.*; public class TestXWPFTableCell extends TestCase { @@ -79,9 +75,20 @@ public class TestXWPFTableCell extends TestCase { assertEquals("F0000F", clr); } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } + /** + * ensure that CTHMerge & CTTcBorders go in poi-ooxml.jar + */ + public void test54099(){ + XWPFDocument doc = new XWPFDocument(); + CTTbl ctTable = CTTbl.Factory.newInstance(); + XWPFTable table = new XWPFTable(ctTable, doc); + XWPFTableRow tr = table.getRow(0); + XWPFTableCell cell = tr.getCell(0); + CTTc ctTc = cell.getCTTc(); + CTTcPr tcPr = ctTc.addNewTcPr(); + CTHMerge hMerge = tcPr.addNewHMerge(); + + CTTcBorders tblBorders = tcPr.addNewTcBorders(); + } }