You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Francisco2626 <fa...@isaltda.com.uy> on 2011/05/13 16:06:14 UTC
Re: XWPF styles.xml
Anybody knows how? I still investigating that.
Thanks.
Francisco.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XWPF-styles-xml-tp4346612p4393209.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: XWPF styles.xml
Posted by Francisco2626 <fa...@isaltda.com.uy>.
I found this! If anybody are interesting about that...
If you want to extract the style from the Styles.xml you have to do this:
XWPFStyles styles = document.getStyles(); /*first get the styles*/
XWPFStyle xwpfStyle = styles.getStyle(paragraph.getStyleID()); /*then get
the style (this case a paragraph style)*/
/*And finaly parse the style from the Styles.xml*/
CTStyle cTStyle = xwpfStyle.getCTStyle();
if(cTStyle != null){
/*Get the base style*/
CTString basedOn = cTStyle.getBasedOn();
if(basedOn != null){
...
...
**Question: Question: What means in this xml the tags <w:next>, <w:qFormat>,
<w:keepNext> and <w:tabs>?
<w:style w:type="paragraph" w:styleId="Heading3">
<w:name w:val="heading 3" />
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:qFormat />
<w:rsid w:val="00BC5BD5" />
- <w:pPr>
<w:keepNext />
- <w:tabs>
<w:tab w:val="num" w:pos="0" />
</w:tabs>
<w:spacing w:before="240" w:after="60" />
<w:ind w:left="720" w:hanging="720" />
<w:outlineLvl w:val="2" />
</w:pPr>
- <w:rPr>
<w:rFonts w:ascii="Cambria" w:eastAsia="Times New Roman" w:hAnsi="Cambria"
/>
<w:b />
<w:bCs />
<w:sz w:val="26" />
<w:szCs w:val="26" />
</w:rPr>
</w:style>
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XWPF-styles-xml-tp4346612p4403545.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org