OpenXML Filter: the very first Word general style is mistakenly removed
Issue #878
resolved
The situation happens when Word style.xml
part does not have document defaults nor latent styles. Thus, the very first style is lost on reading.
For instance, if we have the following styles part content:
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:style w:styleId="style0" w:type="paragraph">
<w:name w:val="Normal"/>
<w:next w:val="style0"/>
<w:pPr>
<w:widowControl/>
<w:tabs>
<w:tab w:leader="none" w:pos="720" w:val="left"/>
</w:tabs>
<w:suppressAutoHyphens w:val="true"/>
<w:spacing w:after="200" w:before="0" w:line="276" w:lineRule="auto"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:cs="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri"/>
<w:color w:val="auto"/>
<w:sz w:val="22"/>
<w:szCs w:val="22"/>
<w:lang w:bidi="ar-SA" w:eastAsia="zh-CN" w:val="en-US"/>
</w:rPr>
</w:style>
<w:style w:styleId="style15" w:type="character">
<w:name w:val="Default Paragraph Font"/>
<w:next w:val="style15"/>
<w:rPr></w:rPr>
</w:style>
...
it appears as
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:style w:styleId="style15" w:type="character">
<w:name w:val="Default Paragraph Font"/>
<w:next w:val="style15"/>
</w:style>
...
after filtering.
For a complete package example please refer to the attached document.
Comments (3)
-
reporter -
reporter - changed status to resolved
The pull request #357 has been merged.
-
- changed milestone to 1.39.0
- Log in to comment
A related pull request #357 has been created.