bring together CTRunTrackChange code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925611 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2025-05-17 09:57:02 +00:00
parent e17ddb0374
commit 62b351cbeb
2 changed files with 3 additions and 3 deletions

View File

@ -109,14 +109,13 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
* sub-paragraph that correspond to character text
* runs, and builds the appropriate runs for these.
*/
@SuppressWarnings("deprecation")
private void buildRunsInOrderFromXml(XmlObject object) {
try (XmlCursor c = object.newCursor()) {
c.selectPath("child::*");
while (c.toNextSelection()) {
XmlObject o = c.getObject();
if (o instanceof CTR) {
XWPFRun r = new XWPFRun((CTR) o, this);
XWPFRun r = new XWPFRun((CTR) o, (IRunBody) this);
runs.add(r);
iruns.add(r);
}
@ -147,7 +146,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
if (o instanceof CTRunTrackChange) {
final CTRunTrackChange parentRecord = (CTRunTrackChange) o;
for (CTR r : parentRecord.getRArray()) {
XWPFRun cr = new XWPFRun(r, this);
XWPFRun cr = new XWPFRun(r, (IRunBody) this);
runs.add(cr);
iruns.add(cr);
}

View File

@ -137,6 +137,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
* @deprecated Use {@link XWPFRun#XWPFRun(CTR, IRunBody)}
*/
@Deprecated
@Removal(version = "7.0.0")
public XWPFRun(CTR r, XWPFParagraph p) {
this(r, (IRunBody) p);
}