ASF Bugzilla – Attachment 30677 Details for
Bug 55361
Add CTMoveBookmark to ooxml-lite to avoid OOXML NoSuchMethodException when loading some XWPF Docs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
trivial patch
POI-CTMoveBookmark_v1.patch (text/plain), 2.17 KB, created by
Tim Allison
on 2013-08-05 17:58:07 UTC
(
hide
)
Description:
trivial patch
Filename:
MIME Type:
Creator:
Tim Allison
Created:
2013-08-05 17:58:07 UTC
Size:
2.17 KB
patch
obsolete
>Index: src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java >=================================================================== >--- src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java (revision 1510593) >+++ src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java (working copy) >@@ -18,6 +18,7 @@ > package org.apache.poi.xwpf.usermodel; > > import java.io.IOException; >+ > import java.math.BigInteger; > import java.util.List; > >@@ -28,6 +29,7 @@ > import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder; > import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTInd; > import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc; >+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTMoveBookmark; > import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff; > import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP; > import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPBdr; >@@ -39,6 +41,7 @@ > import org.openxmlformats.schemas.wordprocessingml.x2006.main.STLineSpacingRule; > import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff; > import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTextAlignment; >+import org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTMoveBookmarkImpl; > import org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture; > import org.openxmlformats.schemas.drawingml.x2006.picture.PicDocument; > import org.openxmlformats.schemas.drawingml.x2006.picture.impl.PicDocumentImpl; >@@ -342,4 +345,15 @@ > r.getCTR().getDrawingArray(0).getInlineArray(0).getGraphic().getGraphicData(); > PicDocument pd = new PicDocumentImpl(null); > } >-} >+ >+ public void testTika792() throws Exception{ >+ XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Tika-792.docx"); >+ //this is the key part that forces POIs builders to add >+ //CTMoveBookmark into the ooxml-lite build >+ CTMoveBookmark b = new CTMoveBookmarkImpl(null); >+ >+ //this is largely extraneous >+ XWPFParagraph paragraph = doc.getParagraphs().get(0); >+ assertEquals("s", paragraph.getText()); >+ } >+ }
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 Raw
Actions:
View
Attachments on
bug 55361
: 30677