aloizio wrote:
I need to change via OO API the following parameters
LineSpacing
ParaFirstLineIndent
ParaVertAlignment
hi,
this is the code for you:
XStyle xStyle = (XStyle)UnoRuntime.queryInterface (
XStyle.class,
this.xMultiServiceFactory.createInstance(
"com.sun.star.style.ParagraphStyle"));
XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface (
XPropertySet.class, xStyle);
//1)
if(lineSpacing.equals("Single"))
{
xPropertySet.setPropertyValue("ParaLineNumberCount",Boolean.TRUE);
LineSpacing linespacing = new LineSpacing();
linespacing.Mode = (short)Lines.Mode;
linespacing.Height = (short)Lines.Single;
xPropertySet.setPropertyValue("ParaLineSpacing",linespacing);
}
else if(lineSpacing.equals("1.5 lines"))
{
xPropertySet.setPropertyValue("ParaLineNumberCount",Boolean.TRUE);
LineSpacing linespacing = new LineSpacing();
linespacing.Mode = (short)Lines.Mode;
linespacing.Height = (short)Lines.halfLine;
xPropertySet.setPropertyValue("ParaLineSpacing",linespacing);
}
else if(lineSpacing.equals("Double"))
{
xPropertySet.setPropertyValue("ParaLineNumberCount",Boolean.TRUE);
LineSpacing linespacing = new LineSpacing();
linespacing.Mode = (short)Lines.Mode;
linespacing.Height = (short)Lines.Double;
xPropertySet.setPropertyValue("ParaLineSpacing",linespacing);
}
//2)
xPropertySet.setPropertyValue("ParaFirstLineIndent",new
Integer((int)(value*1000)));
//3)
to you..............
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]