From b8cb440ce4d614600d3514a116330f32495cfc48 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 14 Nov 2020 16:39:44 +0000 Subject: [PATCH] [github-195] Rework getParagraph functions for XWPF. Thanks to Marius Volhart. This closes #195 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883424 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/xwpf/usermodel/IBody.java | 8 +++----- .../XWPFAbstractFootnoteEndnote.java | 20 ++++++------------- .../poi/xwpf/usermodel/XWPFDocument.java | 12 +++-------- .../poi/xwpf/usermodel/XWPFHeaderFooter.java | 11 +--------- .../poi/xwpf/usermodel/XWPFTableCell.java | 10 +--------- 5 files changed, 14 insertions(+), 47 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/IBody.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/IBody.java index fe06fb60ab..3c8be00a0f 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/IBody.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/IBody.java @@ -71,13 +71,11 @@ public interface IBody { public List getTables(); /** - * if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this header or footer - * the method will return this paragraph - * if there is no corresponding {@link XWPFParagraph} the method will return null + * Returns the paragraph corresponding to the provided {@link CTP}. * * @param p is instance of CTP and is searching for an XWPFParagraph - * @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer - * XWPFParagraph with the correspondig CTP p + * @return The paragraph corresponding to the {@link CTP}, or {@code null} if there is no corresponding paragraph in + * this body. */ public XWPFParagraph getParagraph(CTP p); diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java index 88998af955..6cdcbff8da 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFAbstractFootnoteEndnote.java @@ -90,7 +90,7 @@ public abstract class XWPFAbstractFootnoteEndnote implements Iterable