https://bz.apache.org/bugzilla/show_bug.cgi?id=69042

            Bug ID: 69042
           Summary: Calling `insertNewParagraph` pointing to object in
                    header leads to `ClassCastException`
           Product: POI
           Version: 5.2.3-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: XWPF
          Assignee: dev@poi.apache.org
          Reporter: aoelle...@protonmail.com
  Target Milestone: ---

When trying to insert an object into a document via
`XWPFDocument#insertNewParagraph(XmlCursor cursor)`, where the cursor points to
something in the header/footer, a `ClassCastException` is thrown.

The reason for this is in `insertIntoParentElement(IBodyElement iBodyElement,
Deque<XmlObject> path)`, where I assumed that the element can only be nested in
a table, when in reality it can also be in a header or footer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to