ASF Bugzilla – Attachment 38294 Details for
Bug 66079
XWPFNumbering.removeAbstractNum still removes by list index, not abstractNumId
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
test for numbering edit
test_66079_1.patch (text/plain), 1.66 KB, created by
Vladislav Arakelov
on 2022-05-21 22:12:08 UTC
(
hide
)
Description:
test for numbering edit
Filename:
MIME Type:
Creator:
Vladislav Arakelov
Created:
2022-05-21 22:12:08 UTC
Size:
1.66 KB
patch
obsolete
>Index: poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java >IDEA additional info: >Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP ><+>UTF-8 >=================================================================== >diff --git a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java >--- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java (revision 944b17744139021861e6db08f2fb09a4c040c9eb) >+++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java (revision 1bd4a2538f4fbc2748fc554d3b45c084a00187ee) >@@ -195,6 +195,10 @@ > > //attempt to remove item with numId 2 > assertTrue(numbering.removeAbstractNum(BigInteger.valueOf(2))); >+ >+ //adding one level to numbering with id 1 >+ numbering.getAbstractNum(BigInteger.valueOf(1)).getCTAbstractNum().addNewLvl(); >+ > XWPFDocument docReloaded = writeOutAndReadBack(doc); > XWPFNumbering numberingReloaded = docReloaded.getNumbering(); > >@@ -207,6 +211,13 @@ > } else { > assertNotNull(abstractNum, "Failed for " + id); > assertEquals(id, abstractNum.getAbstractNum().getAbstractNumId().longValue()); >+ >+ // we added one level for numbering with id "1" >+ if (id == 1) { >+ assertEquals(1, abstractNum.getAbstractNum().getLvlList().size()); >+ } else { >+ assertEquals(0, abstractNum.getAbstractNum().getLvlList().size()); >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 66079
:
38293
| 38294