Code: Select all
//php
$bo=$o->Bridge_GetStruct('com.sun.star.table.BorderLine');
$bo->InnerLineWidth=0;
$bo->OuterLineWidth=10;
$bo->Color=0x000000;
$bo->LineDistance=0;
ps($d,'ph',array('BottomBorder'=>$bo,'ParaBackColor'=>0xcccccc));
// this line execute my function to create ParagraphStyles named 'ph'
$s=$d->StyleFamilies->getByName('PageStyles')->getByName('Standard');
$s->HeaderIsOn=true;
$t=$s->HeaderText->Text;
$c=$t->createTextCursor();
$c->paraStyleName='ph';
$t->insertString($c,'header',false);
2. How to create space inside this paragraph under black borderline ?
Oops. Moved back to the External programs forum (once the Code section was added I realised it wasn't a regular Writer topic) (The Gurkha, Moderator).