incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svante Schubert <svante.schub...@gmail.com>
Subject Re: How to set column width styles ?
Date Mon, 10 Feb 2014 10:26:47 GMT
Rafael,

you are setting a cell style not a column style below.

>From Nick's test ODS document there is one spreadsheet:

<table:table table:name="Sheet1" table:style-name="ta1">
    <table:table-column table:style-name="co1"
table:default-cell-style-name="Default"/>
    <table:table-row table:style-name="ro1">
        <table:table-cell/>
    </table:table-row>
</table:table>

The width is within co1, cee
<office:automatic-styles>
    <style:style style:name="co1" style:family="table-column">
        <style:table-column-properties fo:break-before="auto"
*style:column-width="0.889in*"/>
    </style:style>
    <style:style style:name="ro1" style:family="table-row">
        <style:table-row-properties style:row-height="0.1681in"
fo:break-before="auto" style:use-optimal-row-height="true"/>
    </style:style>
    <style:style style:name="ro2" style:family="table-row">
        <style:table-row-properties style:row-height="0.178in"
fo:break-before="auto" style:use-optimal-row-height="true"/>
    </style:style>
    <style:style style:name="ta1" style:family="table"
style:master-page-name="Default">
        <style:table-properties table:display="true"
style:writing-mode="lr-tb"/>
    </style:style>
</office:automatic-styles>

Hope it helps,
Svante

Am 10.02.2014 11:14, schrieb Rafael Medeiros:
> Dear,
>
>
>
>
> *How to set column width styles ?*        final OdfStyle
> cabecalhoSubDinamico =
> spreadsheetDocument.getOrCreateDocumentStyles().newStyle(EstiloHelper.STYLE_CABECALHO_SUB_DINAMICO,
> OdfStyleFamily.TableCell);
>         cabecalhoSubDinamico.setProperty(StyleTextPropertiesElement.Color,
> "#000000");
>
> cabecalhoSubDinamico.setProperty(StyleTextPropertiesElement.FontSize,
> "10pt");
>
> cabecalhoSubDinamico.setProperty(StyleTextPropertiesElement.FontWeight,
> "bold");
>
> cabecalhoSubDinamico.setProperty(StyleParagraphPropertiesElement.TextAlign,
> "center");
>
> cabecalhoSubDinamico.setProperty(StyleTableCellPropertiesElement.VerticalAlign,
> "middle");
>
> cabecalhoSubDinamico.setProperty(StyleTableCellPropertiesElement.Border,
> "0.0007in solid #000000");
>
> cabecalhoSubDinamico.setProperty(StyleTableCellPropertiesElement.BackgroundColor,
> "#c0c0c0");
> //
> cabecalhoSubDinamico.setProperty(StyleTableCellPropertiesElement.WrapOption,
> "wrap");
>
>
> Atenciosamente,
>
> Rafael Nunes
> I'm free - Linux
> Linux User #439174
> http://www.linkedin.com/in/mederafael
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message