I am using the following code to make the header top border visible in a document. I get the header content correctly but the lines are not visible. Please help.
Code: Select all
XNameAccess PageStyles = (XNameAccess) AnyConverter.toObject (new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles"));
StdStyle = (XStyle) AnyConverter.toObject(new Type(XStyle.class),PageStyles.getByName("Standard"));
XPropertySet PropSet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, StdStyle);
PropSet.setPropertyValue("HeaderIsOn", new Boolean(true));
BorderLine bl = (BorderLine)UnoRuntime.queryInterface(BorderLine.class,PropSet.getPropertyValue("HeaderTopBorder"));
bl.Color=30;
bl.InnerLineWidth=(short)2;
bl.OuterLineWidth=(short)2;
//set the borderline object back to the property
PropSet.setPropertyValue("HeaderTopBorder", bl);
Thanks
Ravi