mirror of https://github.com/apache/poi.git
[bug-66079] try to fix issue with XWPFNumbering.removeAbstractNum
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901083 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9527312287
commit
a0ce6b6728
|
@ -240,8 +240,16 @@ public class XWPFNumbering extends POIXMLDocumentPart {
|
||||||
for (XWPFAbstractNum abstractNum : abstractNums) {
|
for (XWPFAbstractNum abstractNum : abstractNums) {
|
||||||
BigInteger foundNumId = abstractNum.getAbstractNum().getAbstractNumId();
|
BigInteger foundNumId = abstractNum.getAbstractNum().getAbstractNumId();
|
||||||
if(abstractNumID.equals(foundNumId)) {
|
if(abstractNumID.equals(foundNumId)) {
|
||||||
ctNumbering.removeAbstractNum(foundNumId.byteValue());
|
|
||||||
abstractNums.remove(abstractNum);
|
abstractNums.remove(abstractNum);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ctNumbering.sizeOfAbstractNumArray(); i++) {
|
||||||
|
CTAbstractNum ctAbstractNum = ctNumbering.getAbstractNumArray(i);
|
||||||
|
BigInteger foundNumId = ctAbstractNum.getAbstractNumId();
|
||||||
|
if(abstractNumID.equals(foundNumId)) {
|
||||||
|
ctNumbering.removeAbstractNum(i);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue