Bonjour,

> De : news [mailto:[EMAIL PROTECTED] la part de Mos
> 
> Certains d'entre vous auraient-ils une idée pour centrer du texte 
> verticalement (comme le fait le GUI) dans une cellule de tableau ?
> 
> Dans Calc on a com.sun.star.table.CellVertJustify.CENTER, 
> dans Drawing 
> on a com::sun:star:drawing::TextVerticalAdjust (CENTER, 
> BOTTOM, BLOCK)...
> 
> Mais comment fait-on pour accéder à ce genre de propriétés 
> dans Writer..
> 
> Au niveau de la cellule ou d'un curseur rien ne me saute aux yeux !

Il faut utiliser la propriété : VertOrient de
com::sun::star::text::CellProperties 

Dans l'aide de l'API : 
"the vertical orientation of the text inside of the table cells in this
row." 
Cf. :
OpenOffice.org2.0_SDK/docs/common/ref/com/sun/star/text/CellProperties.html

Exemple (en C++) :
 Reference <XText> aCellText (getCellByName("A1"), UNO_QUERY);
 Reference <XPropertySet> xCellProp (aCellText, UNO_QUERY);
 xCellProp->setPropertyValue(OUString::createFromAscii("VertOrient"),
 makeAny((sal_Int8) 2)); // Centrer


Cordialement,
Emmanuel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Répondre à