From 9a6fde7673b477dc8cf4ea748b7df57274340b03 Mon Sep 17 00:00:00 2001
From: PJ Fanning
* These classes have so far been built only for read-only processing. */ -public abstract class AbstractXWPFSDT implements ISDTContents { +public abstract class XWPFAbstractSDT implements ISDTContents { private final String title; private final String tag; private final IBody part; - public AbstractXWPFSDT(CTSdtPr pr, IBody part) { + public XWPFAbstractSDT(CTSdtPr pr, IBody part) { if (pr == null) { title = ""; tag = ""; diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnote.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnote.java index 8f728788d..f18c1c118 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnote.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnote.java @@ -34,11 +34,11 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR; * the footnote ID to create a reference to a footnote from within a paragraph.
*To create a reference to a footnote within a paragraph you create a run * with a CTFtnEdnRef that specifies the ID of the target paragraph. - * The {@link XWPFParagraph#addFootnoteReference(AbstractXWPFFootnoteEndnote)} + * The {@link XWPFParagraph#addFootnoteReference(XWPFAbstractFootnoteEndnote)} * method does this for you.
* @since 4.0.0 */ -public class XWPFEndnote extends AbstractXWPFFootnoteEndnote { +public class XWPFEndnote extends XWPFAbstractFootnoteEndnote { public XWPFEndnote() {} @@ -48,7 +48,7 @@ public class XWPFEndnote extends AbstractXWPFFootnoteEndnote { } @Internal - public XWPFEndnote(CTFtnEdn note, AbstractXWPFFootnotesEndnotes footnotes) { + public XWPFEndnote(CTFtnEdn note, XWPFAbstractFootnotesEndnotes footnotes) { super(note, footnotes); } @@ -57,7 +57,7 @@ public class XWPFEndnote extends AbstractXWPFFootnoteEndnote { * end note by adding a footnote reference if one is not found. *This method is for the first paragraph in the footnote, not * paragraphs that will refer to the footnote. For references to - * the footnote, use {@link XWPFParagraph#addFootnoteReference(AbstractXWPFFootnoteEndnote))}. + * the footnote, use {@link XWPFParagraph#addFootnoteReference(XWPFAbstractFootnoteEndnote))}. *
*The first run of the first paragraph in a footnote should * contain a {@link CTFtnEdnRef} object.
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java index ebca459c0..deb76de2c 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java @@ -44,7 +44,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFtnEdn; * Managed end notes ({@link XWPFEndnote}). * @since 4.0.0 */ -public class XWPFEndnotes extends AbstractXWPFFootnotesEndnotes { +public class XWPFEndnotes extends XWPFAbstractFootnotesEndnotes { protected CTEndnotes ctEndnotes; @@ -183,7 +183,7 @@ public class XWPFEndnotes extends AbstractXWPFFootnotesEndnotes { */ public ListTo create a reference to a footnote within a paragraph you create a run * with a CTFtnEdnRef that specifies the ID of the target paragraph. - * The {@link XWPFParagraph#addFootnoteReference(AbstractXWPFFootnoteEndnote)} + * The {@link XWPFParagraph#addFootnoteReference(XWPFAbstractFootnoteEndnote)} * method does this for you.
*/ -public class XWPFFootnote extends AbstractXWPFFootnoteEndnote { +public class XWPFFootnote extends XWPFAbstractFootnoteEndnote { @Internal - public XWPFFootnote(CTFtnEdn note, AbstractXWPFFootnotesEndnotes xFootnotes) { + public XWPFFootnote(CTFtnEdn note, XWPFAbstractFootnotesEndnotes xFootnotes) { super(note, xFootnotes); } diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java index 4f3fa83b0..144c692dc 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java @@ -43,7 +43,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFtnEdn; * Looks after the collection of Footnotes for a document. * Manages bottom-of-the-page footnotes ({@link XWPFFootnote}). */ -public class XWPFFootnotes extends AbstractXWPFFootnotesEndnotes { +public class XWPFFootnotes extends XWPFAbstractFootnotesEndnotes { protected CTFootnotes ctFootnotes; /** @@ -173,7 +173,7 @@ public class XWPFFootnotes extends AbstractXWPFFootnotesEndnotes { */ public List* WARNING - APIs expected to change rapidly */ -public class XWPFSDT extends AbstractXWPFSDT +public class XWPFSDT extends XWPFAbstractSDT implements IBodyElement, IRunBody, ISDTContents, IRunElement { private final ISDTContent content; diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTCell.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTCell.java index 438303c40..558928726 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTCell.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTCell.java @@ -27,7 +27,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtCell; *
* WARNING - APIs expected to change rapidly
*/
-public class XWPFSDTCell extends AbstractXWPFSDT implements ICell {
+public class XWPFSDTCell extends XWPFAbstractSDT implements ICell {
private final XWPFSDTContentCell cellContent;
public XWPFSDTCell(CTSdtCell sdtCell, XWPFTableRow xwpfTableRow, IBody part) {
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java
index 39fb39744..1071f40c7 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java
@@ -31,11 +31,11 @@ public class TestXWPFFootnotes extends TestCase {
public void testCreateFootnotes() throws IOException{
XWPFDocument docOut = new XWPFDocument();
- AbstractXWPFFootnotesEndnotes footnotes = docOut.createFootnotes();
+ XWPFAbstractFootnotesEndnotes footnotes = docOut.createFootnotes();
assertNotNull(footnotes);
- AbstractXWPFFootnotesEndnotes secondFootnotes = docOut.createFootnotes();
+ XWPFAbstractFootnotesEndnotes secondFootnotes = docOut.createFootnotes();
assertSame(footnotes, secondFootnotes);
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java
index 39a3ac675..deac5c09a 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java
@@ -40,8 +40,8 @@ public final class TestXWPFSDT {
XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Bug54849.docx");
String tag = null;
String title = null;
- List