diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XMLWordDocument.java b/src/examples/src/org/apache/poi/xwpf/usermodel/SimpleDocument.java
old mode 100644
new mode 100755
similarity index 53%
rename from src/ooxml/java/org/apache/poi/xwpf/usermodel/XMLWordDocument.java
rename to src/examples/src/org/apache/poi/xwpf/usermodel/SimpleDocument.java
index 3a79da989..29d502f9b
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XMLWordDocument.java
+++ b/src/examples/src/org/apache/poi/xwpf/usermodel/SimpleDocument.java
@@ -1,53 +1,50 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.xwpf.usermodel;
-
-import org.apache.poi.xwpf.XWPFDocument;
-import org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy;
-
-/**
- * High level representation of a ooxml text document.
- */
-public class XMLWordDocument {
- private XWPFDocument xwpfXML;
-
- public XMLWordDocument(XWPFDocument xml) {
- this.xwpfXML = xml;
- }
-
- public XWPFDocument _getXWPFXML() {
- return xwpfXML;
- }
-
- public XWPFHyperlink getHyperlinkByID(String id) {
- return xwpfXML.getHyperlinkByID(id);
- }
- public XWPFHyperlink[] getHyperlinks() {
- return xwpfXML.getHyperlinks();
- }
-
- public XWPFComment getCommentByID(String id) {
- return xwpfXML.getCommentByID(id);
- }
- public XWPFComment[] getComments() {
- return xwpfXML.getComments();
- }
-
- public XWPFHeaderFooterPolicy getHeaderFooterPolicy() {
- return xwpfXML.getHeaderFooterPolicy();
- }
-}
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.xwpf.usermodel;
+
+import java.io.FileOutputStream;
+
+/**
+ * A simple WOrdprocessingML document created by POI XWPF API
+ *
+ * @author Yegor Kozlov
+ */
+public class SimpleDocument {
+
+ public static void main(String[] args) throws Exception {
+ XWPFDocument doc = new XWPFDocument();
+
+ XWPFParagraph p1 = doc.createParagraph();
+ p1.setAlignment(ParagraphAlignment.CENTER);
+
+ XWPFRun r1 = p1.createRun();
+ r1.setBold(true);
+ r1.setText("The quick brown fox");
+
+ XWPFParagraph p2 = doc.createParagraph();
+ p2.setAlignment(ParagraphAlignment.RIGHT);
+
+ XWPFRun r2 = p2.createRun();
+ r2.setBold(false);
+ r2.setText("jumped over the lazy dog");
+
+ FileOutputStream out = new FileOutputStream("simple.docx");
+ doc.write(out);
+ out.close();
+
+ }
+}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/extractor/ExcelExtractor.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/extractor/ExcelExtractor.java
deleted file mode 100644
index 8817bc7e2..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/extractor/ExcelExtractor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.ss.extractor;
-
-/**
- * Common interface for Excel text extractors, covering
- * HSSF and XSSF
- */
-public interface ExcelExtractor {
- /**
- * Should sheet names be included? Default is true
- */
- public void setIncludeSheetNames(boolean includeSheetNames);
-
- /**
- * Should we return the formula itself, and not
- * the result it produces? Default is false
- */
- public void setFormulasNotResults(boolean formulasNotResults);
-
- /**
- * Should cell comments be included? Default is false
- */
- public void setIncludeCellComments(boolean includeCellComments);
-
- /**
- * Retreives the text contents of the file
- */
- public String getText();
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java
deleted file mode 100644
index 2dbb5715b..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import java.util.Date;
-
-import org.apache.poi.hssf.usermodel.HSSFCellStyle;
-import org.apache.poi.hssf.usermodel.HSSFRichTextString;
-import org.apache.poi.hssf.usermodel.HSSFSheet;
-
-/**
- * This is a JDK 1.4 compatible interface for HSSFCell.
- * If you are using JDK 1.5 or later, use the other set of interfaces,
- * which work properly for both HSSFCell and XSSFCell
- */
-public interface Cell {
- /**
- * Numeric Cell type (0)
- * @see #setCellType(int)
- * @see #getCellType()
- */
-
- public final static int CELL_TYPE_NUMERIC = 0;
-
- /**
- * String Cell type (1)
- * @see #setCellType(int)
- * @see #getCellType()
- */
-
- public final static int CELL_TYPE_STRING = 1;
-
- /**
- * Formula Cell type (2)
- * @see #setCellType(int)
- * @see #getCellType()
- */
-
- public final static int CELL_TYPE_FORMULA = 2;
-
- /**
- * Blank Cell type (3)
- * @see #setCellType(int)
- * @see #getCellType()
- */
-
- public final static int CELL_TYPE_BLANK = 3;
-
- /**
- * Boolean Cell type (4)
- * @see #setCellType(int)
- * @see #getCellType()
- */
-
- public final static int CELL_TYPE_BOOLEAN = 4;
-
- /**
- * Error Cell type (5)
- * @see #setCellType(int)
- * @see #getCellType()
- */
-
- public final static int CELL_TYPE_ERROR = 5;
-
-
- int getCellType();
- /**
- * @deprecated (Oct 2008) use {@link #getColumnIndex()}
- */
- short getCellNum();
-
- /**
- * @return the cell's column index (zero based)
- */
- int getColumnIndex();
- int getRowIndex();
-
- String getCellFormula();
-
- byte getErrorCellValue();
- void setCellErrorValue(byte value);
-
- HSSFCellStyle getCellStyle();
- HSSFSheet getSheet();
-
- boolean getBooleanCellValue();
- double getNumericCellValue();
- /**
- * get the value of the cell as a date. For strings we throw an exception.
- * For blank cells we return a null.
- */
- Date getDateCellValue();
- HSSFRichTextString getRichStringCellValue();
-
- void setCellType(int cellType);
- void setCellValue(boolean value);
- void setCellValue(double value);
- void setCellValue(RichTextString value);
- void setCellFormula(String formula);
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CellStyle.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CellStyle.java
deleted file mode 100644
index 2105937fe..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CellStyle.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface CellStyle {
- short getDataFormat();
- String getDataFormatString();
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Color.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Color.java
deleted file mode 100644
index 7a9633a0c..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Color.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Color {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Comment.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Comment.java
deleted file mode 100644
index c85f79bfd..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Comment.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Comment {
- public void setRow(int row);
- public void setColumn(short row);
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java
deleted file mode 100644
index fb560199c..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.ss.usermodel;
-
-import org.apache.poi.hssf.usermodel.HSSFRichTextString;
-
-/**
- * This is a JDK 1.4 compatible interface for HSSFCreationHelper.
- * If you are using JDK 1.5 or later, use the other set of interfaces,
- * which work properly for both HSSFCreationHelper and XSSFCreationHelper
- */
-public interface CreationHelper {
- HSSFRichTextString createRichTextString(String text);
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/DataFormat.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/DataFormat.java
deleted file mode 100644
index 525c79c6b..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/DataFormat.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface DataFormat {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Font.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Font.java
deleted file mode 100644
index f19bac4cc..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Font.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Font {
-
- /**
- * Arial font
- */
-
- public final static String FONT_ARIAL = "Arial";
-
- /**
- * Normal boldness (not bold)
- */
-
- public final static short BOLDWEIGHT_NORMAL = 0x190;
-
- /**
- * Bold boldness (bold)
- */
-
- public final static short BOLDWEIGHT_BOLD = 0x2bc;
-
- /**
- * normal type of black color.
- */
-
- public final static short COLOR_NORMAL = 0x7fff;
-
- /**
- * Dark Red color
- */
-
- public final static short COLOR_RED = 0xa;
-
- /**
- * no type offsetting (not super or subscript)
- */
-
- public final static short SS_NONE = 0;
-
- /**
- * superscript
- */
-
- public final static short SS_SUPER = 1;
-
- /**
- * subscript
- */
-
- public final static short SS_SUB = 2;
-
- /**
- * not underlined
- */
-
- public final static byte U_NONE = 0;
-
- /**
- * single (normal) underline
- */
-
- public final static byte U_SINGLE = 1;
-
- /**
- * double underlined
- */
-
- public final static byte U_DOUBLE = 2;
-
- /**
- * accounting style single underline
- */
-
- public final static byte U_SINGLE_ACCOUNTING = 0x21;
-
- /**
- * accounting style double underline
- */
-
- public final static byte U_DOUBLE_ACCOUNTING = 0x22;
-
- /**
- * ANSI character set
- */
- public final static byte ANSI_CHARSET = 0;
-
- /**
- * Default character set.
- */
- public final static byte DEFAULT_CHARSET = 1;
-
- /**
- * Symbol character set
- */
- public final static byte SYMBOL_CHARSET = 2;
-
-
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Footer.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Footer.java
deleted file mode 100644
index c278c5d49..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Footer.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Footer {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Header.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Header.java
deleted file mode 100644
index 0c7ba2c33..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Header.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Header {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Hyperlink.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Hyperlink.java
deleted file mode 100644
index 04d7dc40a..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Hyperlink.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Hyperlink {
- /**
- * Link to a existing file or web page
- */
- public static final int LINK_URL = 1;
-
- /**
- * Link to a place in this document
- */
- public static final int LINK_DOCUMENT = 2;
-
- /**
- * Link to an E-mail address
- */
- public static final int LINK_EMAIL = 3;
-
- /**
- * Link to a file
- */
- public static final int LINK_FILE = 4;
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Iterable.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Iterable.java
deleted file mode 100644
index 17a2820c8..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Iterable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import java.util.Iterator;
-
-/**
- * Workaround for java.lang.Iterable not existing on java 1.4, but
- * people wanting to use it all the same.
- * Must only be present for java 1.4 interfaces! Do not add for
- * java 1.5, as that has its own real one from java.lang
- */
-public interface Iterable {
- public Iterator iterator();
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Name.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Name.java
deleted file mode 100644
index bf4823972..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Name.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Name {
- void setNameName(String nameName);
- boolean isFunctionName();
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Palette.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Palette.java
deleted file mode 100644
index 9048fb5b7..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Palette.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Palette {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Patriarch.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Patriarch.java
deleted file mode 100644
index 92db05756..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Patriarch.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Patriarch {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/PictureData.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/PictureData.java
deleted file mode 100644
index a38a70a02..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/PictureData.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface PictureData {}
\ No newline at end of file
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/PrintSetup.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/PrintSetup.java
deleted file mode 100644
index 20b5b080d..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/PrintSetup.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface PrintSetup {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java
deleted file mode 100644
index d026f05fb..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * This is a JDK 1.4 compatible interface for HSSFRichTextString.
- * If you are using JDK 1.5 or later, use the other set of interfaces,
- * which work properly for both HSSFRichTextString and XSSFRichTextString
- */
-public interface RichTextString {
- String getString();
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java
deleted file mode 100644
index 8a0810dd3..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import org.apache.poi.hssf.usermodel.HSSFCell;
-import java.util.Iterator;
-
-/**
- * This is a JDK 1.4 compatible interface for HSSFRow.
- * If you are using JDK 1.5 or later, use the other set of interfaces,
- * which work properly for both HSSFRow and XSSFRow
- */
-public interface Row {
- int getRowNum();
- short getFirstCellNum();
- short getLastCellNum();
- int getPhysicalNumberOfCells();
- HSSFCell getCell(int cellnum);
-
- Iterator cellIterator();
-
- /**
- * Used to specify the different possible policies
- * if for the case of null and blank cells
- */
- public static class MissingCellPolicy {
- private static int NEXT_ID = 1;
- public final int id;
- private MissingCellPolicy() {
- this.id = NEXT_ID++;
- }
- }
- /** Missing cells are returned as null, Blank cells are returned as normal */
- public static final MissingCellPolicy RETURN_NULL_AND_BLANK = new MissingCellPolicy();
- /** Missing cells are returned as null, as are blank cells */
- public static final MissingCellPolicy RETURN_BLANK_AS_NULL = new MissingCellPolicy();
- /** A new, blank cell is created for missing cells. Blank cells are returned as normal */
- public static final MissingCellPolicy CREATE_NULL_AS_BLANK = new MissingCellPolicy();
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java
deleted file mode 100644
index ef5aac4ce..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import org.apache.poi.hssf.usermodel.HSSFRow;
-import java.util.Iterator;
-
-/**
- * This is a JDK 1.4 compatible interface for HSSFSheet.
- * If you are using JDK 1.5 or later, use the other set of interfaces,
- * which work properly for both HSSFSheet and XSSFSheet
- */
-public interface Sheet {
- int getPhysicalNumberOfRows();
- int getFirstRowNum();
- int getLastRowNum();
-
- HSSFRow getRow(int rownum);
- Iterator rowIterator();
-}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Textbox.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Textbox.java
deleted file mode 100644
index 212c400ac..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Textbox.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Textbox {}
diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java
deleted file mode 100644
index c4cdd2153..000000000
--- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
-import org.apache.poi.hssf.usermodel.*;
-
-/**
- * This is a JDK 1.4 compatible interface for HSSFWorkbook.
- * If you are using JDK 1.5 or later, use the other set of interfaces,
- * which work properly for both HSSFWorkbook and XSSFWorkbook
- */
-public interface Workbook {
-
- int getActiveSheetIndex();
- void setActiveSheet(int sheetIndex);
-
- int getFirstVisibleTab();
- void setFirstVisibleTab(int sheetIndex);
-
- int getNumberOfSheets();
- short getNumberOfFonts();
- int getNumberOfNames();
-
- HSSFName createName();
- HSSFName getNameAt(int index);
- int getNameIndex(String name);
- String getNameName(int index);
-
- String getSheetName(int sheet);
- HSSFSheet getSheetAt(int index);
- int getSheetIndex(String name);
- int getSheetIndex(Sheet sheet);
-
- CreationHelper getCreationHelper();
-
- /**
- * Retrieves the current policy on what to do when
- * getting missing or blank cells from a row.
- * The default is to return blank and null cells.
- * {@link MissingCellPolicy}
- */
- MissingCellPolicy getMissingCellPolicy();
- /**
- * Sets the policy on what to do when
- * getting missing or blank cells from a row.
- * This will then apply to all calls to
- * {@link Row.getCell()}. See
- * {@link MissingCellPolicy}
- */
- void setMissingCellPolicy(MissingCellPolicy missingCellPolicy);
-}
diff --git a/src/ooxml/java/org/apache/poi/POIXMLDocument.java b/src/ooxml/java/org/apache/poi/POIXMLDocument.java
index 2287ef4f1..ab2d04c72 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLDocument.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLDocument.java
@@ -21,6 +21,7 @@ import java.util.List;
import org.apache.poi.poifs.common.POIFSConstants;
import org.apache.poi.util.IOUtils;
+import org.apache.poi.util.PackageHelper;
import org.apache.xmlbeans.XmlException;
import org.openxml4j.exceptions.InvalidFormatException;
import org.openxml4j.exceptions.OpenXML4JException;
@@ -169,4 +170,35 @@ public abstract class POIXMLDocument extends POIXMLDocumentPart{
*/
public abstract List
+ * If this element is not set on a given paragraph, its value is determined by the setting previously + * set at any level of the style hierarchy (i.e. that previous setting remains unchanged). + * If this setting is never specified in the style hierarchy, then no alignment is applied to the paragraph. + *
+ * + * @param align the paragraph alignment to apply to this paragraph. + */ + public void setAlignment(ParagraphAlignment align){ + CTPPr pr = paragraph.isSetPPr() ? paragraph.getPPr() : paragraph.addNewPPr(); + CTJc jc = pr.isSetJc() ? pr.getJc() : pr.addNewJc(); + STJc.Enum en = STJc.Enum.forInt(align.getValue()); + jc.setVal(en); + } + } diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraphText.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraphText.java deleted file mode 100644 index a25b16467..000000000 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraphText.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.apache.poi.xwpf.usermodel; - -public class XWPFParagraphText -{ - -} diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java new file mode 100755 index 000000000..7b44e841a --- /dev/null +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java @@ -0,0 +1,94 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ +package org.apache.poi.xwpf.usermodel; + +import org.apache.poi.POIXMLRelation; +import org.apache.poi.POIXMLDocumentPart; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Yegor Kozlov + */ +public class XWPFRelation extends POIXMLRelation { + public static final String MAIN_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"; + public static final String HEADER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"; + public static final String HEADER_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"; + public static final String FOOTER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"; + public static final String FOOTER_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"; + public static final String STYLES_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"; + public static final String STYLES_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"; + public static final String HYPERLINK_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"; + public static final String COMMENT_RELATION_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"; + + /** + * A map to lookup POIXMLRelation by its relation type + */ + protected static Maphttp://schemas.openxmlformats.org/officeDocument/2006/relationships/image
+ * @return registered POIXMLRelation or null if not found
+ */
+ public static XWPFRelation getInstance(String rel) {
+ return _table.get(rel);
+ }
+
+}
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
new file mode 100755
index 000000000..0db7a8a65
--- /dev/null
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
@@ -0,0 +1,105 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.xwpf.usermodel;
+
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRPr;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
+
+/**
+ * XWPFRun object defines a region of text with a common set of properties
+ *
+ * @author Yegor Kozlov
+ */
+public class XWPFRun {
+ private CTR run;
+ private XWPFParagraph paragraph;
+
+ /**
+ *
+ * @param r the CTR bean which holds the run attributes
+ * @param p the parent paragraph
+ */
+ protected XWPFRun(CTR r, XWPFParagraph p){
+ this.run = r;
+ this.paragraph = p;
+ }
+
+ public CTR getCTR(){
+ return run;
+ }
+
+ public XWPFParagraph getParagraph(){
+ return paragraph;
+ }
+
+ /**
+ * Whether the bold property shall be applied to all non-complex script characters in the
+ * contents of this run when displayed in a document
+ *
+ * @return true
if the bold property is applied
+ */
+ public boolean isBold(){
+ CTRPr pr = run.getRPr();
+ return pr != null && pr.isSetB();
+ }
+
+ /**
+ * Whether the bold property shall be applied to all non-complex script characters in the
+ * contents of this run when displayed in a document
+ *
+ *
+ * This formatting property is a toggle property, which specifies that its behavior differs between its use within a
+ * style definition and its use as direct formatting. When used as part of a style definition, setting this property
+ * shall toggle the current state of that property as specified up to this point in the hierarchy (i.e. applied to not
+ * applied, and vice versa). Setting it to false
(or an equivalent) shall result in the current
+ * setting remaining unchanged. However, when used as direct formatting, setting this property to true or false
+ * shall set the absolute state of the resulting property.
+ *
+ * If this element is not present, the default value is to leave the formatting applied at previous level in the style + * hierarchy. If this element is never applied in the style hierarchy, then bold shall not be applied to non-complex + * script characters. + *
+ * + * @param valuetrue
if the bold property is applied to this run
+ */
+ public void setBold(boolean value){
+ CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
+ pr.addNewB().setVal(value ? STOnOff.TRUE : STOnOff.FALSE);
+ }
+
+ /**
+ * Return the string content of this text run
+ *
+ * @return the text of this text run or null
if not set
+ */
+ public String getText(){
+ return run.sizeOfTArray() == 0 ? null : run.getTArray(0).getStringValue();
+ }
+
+ /**
+ * Sets the text of this text run
+ *
+ * @param value the literal text which shall be displayed in the document
+ */
+ public void setText(String value){
+ CTText t = run.sizeOfTArray() == 0 ? run.addNewT() : run.getTArray(0);
+ t.setStringValue(value);
+ }
+}
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
index aa647503b..352181219 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
@@ -37,7 +37,7 @@ public class XWPFTable
StringBuffer rowText = new StringBuffer();
for(CTTc cell : row.getTcArray()) {
for(CTP ctp : cell.getPArray()) {
- XWPFParagraph p = new XWPFParagraph(ctp);
+ XWPFParagraph p = new XWPFParagraph(ctp, null);
if(rowText.length() > 0) {
rowText.append('\t');
}
diff --git a/src/ooxml/testcases/org/apache/poi/TestEmbeded.java b/src/ooxml/testcases/org/apache/poi/TestEmbeded.java
index 95bbe51f2..f6049c396 100644
--- a/src/ooxml/testcases/org/apache/poi/TestEmbeded.java
+++ b/src/ooxml/testcases/org/apache/poi/TestEmbeded.java
@@ -20,12 +20,11 @@
package org.apache.poi;
import java.io.File;
-import java.util.Iterator;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xslf.XSLFSlideShow;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.apache.poi.xwpf.XWPFDocument;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.openxml4j.opc.Package;
import org.openxml4j.opc.PackagePart;
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java b/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java
index 0bd24a207..c76df4691 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java
@@ -19,6 +19,8 @@ package org.apache.poi.xwpf;
import java.io.File;
import org.apache.poi.POIXMLDocument;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
+import org.apache.poi.xwpf.usermodel.XWPFRelation;
import org.openxml4j.opc.Package;
import org.openxml4j.opc.PackagePart;
@@ -49,7 +51,7 @@ public class TestXWPFDocument extends TestCase {
boolean found = false;
for(PackagePart part : pack.getParts()) {
- if(part.getContentType().equals(XWPFDocument.MAIN_CONTENT_TYPE)) {
+ if(part.getContentType().equals(XWPFRelation.MAIN_CONTENT_TYPE)) {
found = true;
}
System.out.println(part);
@@ -76,7 +78,7 @@ public class TestXWPFDocument extends TestCase {
);
// Check it has key parts
assertNotNull(xml.getDocument());
- assertNotNull(xml.getDocumentBody());
+ assertNotNull(xml.getDocument().getBody());
assertNotNull(xml.getStyle());
// Complex file
@@ -84,7 +86,7 @@ public class TestXWPFDocument extends TestCase {
POIXMLDocument.openPackage(complexFile.toString())
);
assertNotNull(xml.getDocument());
- assertNotNull(xml.getDocumentBody());
+ assertNotNull(xml.getDocument().getBody());
assertNotNull(xml.getStyle());
}
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 8fc83bc91..2704e0371 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java
@@ -19,7 +19,7 @@ package org.apache.poi.xwpf.extractor;
import java.io.File;
import org.apache.poi.POIXMLDocument;
-import org.apache.poi.xwpf.XWPFDocument;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
import junit.framework.TestCase;
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java
index 9d0e96a17..b55b01951 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java
@@ -19,7 +19,7 @@ package org.apache.poi.xwpf.model;
import java.io.File;
import org.apache.poi.POIXMLDocument;
-import org.apache.poi.xwpf.XWPFDocument;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
import junit.framework.TestCase;
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java
index 5a775c361..65fb7f331 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java
@@ -19,7 +19,7 @@ package org.apache.poi.xwpf.usermodel;
import java.io.File;
import org.apache.poi.POIXMLDocument;
-import org.apache.poi.xwpf.XWPFDocument;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
import junit.framework.TestCase;