Anisha Newbie

Joined: 06 Dec 2004 Posts: 2
|
Posted: Thu Dec 09, 2004 10:56 pm Post subject: Cell Alignment and Cell Color |
|
|
Hi ..
I am writing to a word document using OpenOffice.
I would like to know how to align your text to the center/left of the cell in a table.
I tried the following:
xCell = xCellRange.getCellByPosition(i,j);
XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, xCell);
xCellProps.setPropertyValue("HoriJustify",com.sun.star.table.CellHoriJustify.CENTER);
It is throwing UnknownPropertyException.
Can someone tell me how to align the text.
Also I need to set the color as a String . OpenOffice accepts Color in RGB format.
I need to know how to convert Color to RGB .. i.e. from "red" to its RGB value.
Appreciate your help.
Thanks in advance.
Anisha. |
|