1 message in org.openoffice.fr.progRE: [prog] Centrer verticalement du ...
FromSent OnAttachments
emma...@fr.thalesgroup.comApr 20, 2007 5:31 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: [prog] Centrer verticalement du texte dans une cellule de ta bleau WriterActions...
From:emma...@fr.thalesgroup.com (emma@fr.thalesgroup.com)
Date:Apr 20, 2007 5:31:47 am
List:org.openoffice.fr.prog

Bonjour,

De : news [mailto:ne@sea.gmane.org]De 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