poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Gaeremynck <gaeremyn...@gmail.com>
Subject Paragraph runs are wrongly considered to be deleted in review
Date Thu, 16 Nov 2017 15:47:52 GMT
Hello all,

I think this is a bug but wanted to run it past the email list first before I open a bug ticket.

I have a document that contains paragraphs and runs that all have zeroed out rsidDel attributes.
[1]
I’m having a bit of trouble trying to find the right reference documentation to help discern
what the expected behavior should be, but from just eyeballing that XML, it looks like w:rsidRDefault
declares the value 00000000 to be the default ID and therefore ignorable?

When doing a paragraph.getText() the runs are filtered out as they have an rsidDel attribute.
https://github.com/apache/poi/blob/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java#L192

This was done as a fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=58067 (getText()
of XWPFParagraph returns deleted text if in "review" mode) but I wonder whether the right
behavior is to compare the value of rsidDel to rsidRDefault (or filter out 00000000 values)?

You can find the source .docx file at https://s3.amazonaws.com/ally-dev/files/essay.docx

Let me know what you think.

Thanks!
Simon


[1] Example of paragraph runs
<w:p w:rsidDel="00000000" w:rsidP="00000000" w:rsidR="00000000" w:rsidRDefault="00000000"
w:rsidRPr="00000000">
    <w:pPr>
        <w:pStyle w:val="Title"/>
        <w:contextualSpacing w:val="0"/>
        <w:rPr/>
    </w:pPr>
    <w:bookmarkStart w:colFirst="0" w:colLast="0" w:id="0" w:name="_u0zbcgllb07d"/>
    <w:bookmarkEnd w:id="0"/>
    <w:r w:rsidDel="00000000" w:rsidR="00000000" w:rsidRPr="00000000">
        <w:rPr>
            <w:rtl w:val="0"/>
        </w:rPr>
        <w:t xml:space="preserve">Personal Worldview Essay</w:t>
    </w:r>
</w:p>
<w:p w:rsidDel="00000000" w:rsidP="00000000" w:rsidR="00000000" w:rsidRDefault="00000000"
w:rsidRPr="00000000">
    <w:pPr>
        <w:contextualSpacing w:val="0"/>
        <w:rPr/>
    </w:pPr>
    <w:r w:rsidDel="00000000" w:rsidR="00000000" w:rsidRPr="00000000">
        <w:rPr>
            <w:rtl w:val="0"/>
        </w:rPr>
    </w:r>
</w:p>




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message