incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 119622] [From Symphony]Table lost if cell contains field
Date Thu, 27 Sep 2012 03:47:24 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=119622

wujinlong@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79652|                            |review?
              Flags|                            |

--- Comment #1 from wujinlong@gmail.com ---
Created attachment 79652
  --> https://issues.apache.org/ooo/attachment.cgi?id=79652&action=edit
Patch

There is CR (carriage return) in the field command, which will cause finishing
of paragraph during parsing of the field command. This is not an expected
behavior, and will cause the table not be created correctly.

The fix is to add a new condition of "don't finish paragraph if the filed is
still open", thus would prevent such case.

Here is a sample of the field command. Notice that the CR is for visual sample
only, it won't show up in the MS Word document. You need to find them by
extracting the docx file, and look at the document.xml directly.

{ =d2 \# "0" CR CR}

And below is a snippet that shows up in the document.xml

<w:r w:rsidRPr="00D55084">
    <w:rPr>
        <w:b />
        <w:sz w:val="20" />
        <w:szCs w:val="20" />
    </w:rPr>
    <w:fldChar w:fldCharType="begin" />
</w:r>
<w:r w:rsidRPr="00D55084">
    <w:rPr>
        <w:b />
        <w:sz w:val="20" />
        <w:szCs w:val="20" />
    </w:rPr>
    <w:instrText xml:space="preserve"> =d2 \# "0" </w:instrText>
</w:r>
<w:r w:rsidRPr="00D55084">
    <w:rPr>
        <w:b />
        <w:sz w:val="20" />
        <w:szCs w:val="20" />
    </w:rPr>
    <w:cr />
</w:r>
<w:r w:rsidRPr="00D55084">
    <w:rPr>
        <w:b />
        <w:sz w:val="20" />
        <w:szCs w:val="20" />
    </w:rPr>
    <w:cr />
    <w:instrText xml:space="preserve"> </w:instrText>
</w:r>
<w:r w:rsidRPr="00D55084">
    <w:rPr>
        <w:b />
        <w:sz w:val="20" />
        <w:szCs w:val="20" />
    </w:rPr>
    <w:fldChar w:fldCharType="separate" />
</w:r>
<w:r>
    <w:rPr>
        <w:b />
        <w:noProof />
        <w:sz w:val="20" />
        <w:szCs w:val="20" />
    </w:rPr>
    <w:t>8</w:t>
</w:r>
<w:r w:rsidRPr="00D55084">
    <w:rPr>
        <w:b />
        <w:sz w:val="20" />
        <w:szCs w:val="20" />
    </w:rPr>
    <w:fldChar w:fldCharType="end" />
</w:r>

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message