build issue

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-08-28 13:09:38 +00:00
parent 2ffef9d249
commit 0edc08a358
1 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,7 @@ import static org.apache.poi.openxml4j.OpenXML4JTestDataSamples.getSampleFile;
import static org.apache.poi.openxml4j.OpenXML4JTestDataSamples.getSampleFileName; import static org.apache.poi.openxml4j.OpenXML4JTestDataSamples.getSampleFileName;
import static org.apache.poi.openxml4j.OpenXML4JTestDataSamples.openSampleStream; import static org.apache.poi.openxml4j.OpenXML4JTestDataSamples.openSampleStream;
import static org.apache.poi.openxml4j.opc.PackagingURIHelper.createPartName; import static org.apache.poi.openxml4j.opc.PackagingURIHelper.createPartName;
import static org.apache.poi.xwpf.usermodel.XWPFDocument.NS_OOXML_WP_MAIN; import static org.apache.poi.xssf.usermodel.XSSFRelation.NS_WORDPROCESSINGML;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertFalse;
@ -192,15 +192,15 @@ public final class TestPackage {
PackagePart corePart = pkg.createPart(corePartName, XWPFRelation.DOCUMENT.getContentType()); PackagePart corePart = pkg.createPart(corePartName, XWPFRelation.DOCUMENT.getContentType());
Document doc = DocumentHelper.createDocument(); Document doc = DocumentHelper.createDocument();
Element elDocument = doc.createElementNS(NS_OOXML_WP_MAIN, "w:document"); Element elDocument = doc.createElementNS(NS_WORDPROCESSINGML, "w:document");
doc.appendChild(elDocument); doc.appendChild(elDocument);
Element elBody = doc.createElementNS(NS_OOXML_WP_MAIN, "w:body"); Element elBody = doc.createElementNS(NS_WORDPROCESSINGML, "w:body");
elDocument.appendChild(elBody); elDocument.appendChild(elBody);
Element elParagraph = doc.createElementNS(NS_OOXML_WP_MAIN, "w:p"); Element elParagraph = doc.createElementNS(NS_WORDPROCESSINGML, "w:p");
elBody.appendChild(elParagraph); elBody.appendChild(elParagraph);
Element elRun = doc.createElementNS(NS_OOXML_WP_MAIN, "w:r"); Element elRun = doc.createElementNS(NS_WORDPROCESSINGML, "w:r");
elParagraph.appendChild(elRun); elParagraph.appendChild(elRun);
Element elText = doc.createElementNS(NS_OOXML_WP_MAIN, "w:t"); Element elText = doc.createElementNS(NS_WORDPROCESSINGML, "w:t");
elRun.appendChild(elText); elRun.appendChild(elText);
elText.setTextContent("Hello Open XML !"); elText.setTextContent("Hello Open XML !");
@ -339,15 +339,15 @@ public final class TestPackage {
// Create a content // Create a content
Document doc = DocumentHelper.createDocument(); Document doc = DocumentHelper.createDocument();
Element elDocument = doc.createElementNS(NS_OOXML_WP_MAIN, "w:document"); Element elDocument = doc.createElementNS(NS_WORDPROCESSINGML, "w:document");
doc.appendChild(elDocument); doc.appendChild(elDocument);
Element elBody = doc.createElementNS(NS_OOXML_WP_MAIN, "w:body"); Element elBody = doc.createElementNS(NS_WORDPROCESSINGML, "w:body");
elDocument.appendChild(elBody); elDocument.appendChild(elBody);
Element elParagraph = doc.createElementNS(NS_OOXML_WP_MAIN, "w:p"); Element elParagraph = doc.createElementNS(NS_WORDPROCESSINGML, "w:p");
elBody.appendChild(elParagraph); elBody.appendChild(elParagraph);
Element elRun = doc.createElementNS(NS_OOXML_WP_MAIN, "w:r"); Element elRun = doc.createElementNS(NS_WORDPROCESSINGML, "w:r");
elParagraph.appendChild(elRun); elParagraph.appendChild(elRun);
Element elText = doc.createElementNS(NS_OOXML_WP_MAIN, "w:t"); Element elText = doc.createElementNS(NS_WORDPROCESSINGML, "w:t");
elRun.appendChild(elText); elRun.appendChild(elText);
elText.setTextContent("Hello Open XML !"); elText.setTextContent("Hello Open XML !");