OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

set CellBorder in TextTable over OLE

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
PatrickUlmer
Guest





PostPosted: Mon Oct 13, 2003 1:43 am    Post subject: set CellBorder in TextTable over OLE Reply with quote

Hi,

I have create a TextTable and can set the TableBoder without a problem. Now I want to set the cellborder TopBorder from the CellProperties, but how can I get access to CellProperties?
I only get XCell und XCellRange over getCellRangeByPosition getCellByName. I use OLE with Delphi.
Isn't it possible?

Thanks...Patrick
Back to top
jowege
General User
General User


Joined: 21 Aug 2003
Posts: 10

PostPosted: Mon Oct 13, 2003 4:40 am    Post subject: Reply with quote

Hi Patrick,

a liddle procedure to visible or unvisible a TextTableBorder:

Code:

procedure TOfficeFunc.SetTextTableBorder(iTableName:String;iVisible:Boolean);
var oTableBorder, oHelpLine, oTable:Variant;
begin
  oTable:= oObj[oAktO].oDoc.TextTables.GetByName(iTableName);
  oTableBorder := oTable.TableBorder;
  oHelpLine := oTableBorder.BottomLine;
  if iVisible then begin
    oHelpLine.InnerLineWidth := 1;
    oHelpLine.OuterLineWidth := 1;
  end else begin
    oHelpLine.InnerLineWidth := 0;
    oHelpLine.OuterLineWidth := 0;
  end;
  oTableBorder.TopLine:=     oHelpLine;
  oTableBorder.BottomLine:=  oHelpLine;
  oTableBorder.LeftLine:=    oHelpLine;
  oTableBorder.RightLine:=   oHelpLine;
  oTableBorder.HorizontalLine:= oHelpLine;
  oTableBorder.VerticalLine:=   oHelpLine;
  oTable.TableBorder:=       oTableBorder;
end;


I hope it will help you to solve your problem.

jowege
Back to top
View user's profile Send private message
PatrickUlmer
Guest





PostPosted: Mon Oct 13, 2003 4:51 am    Post subject: set cellborder Reply with quote

Hi,

sorry, I need to set borders of single cells to get a good looking invoice.

Patrick
Back to top
PatrickUlmer
Guest





PostPosted: Thu Oct 16, 2003 1:03 am    Post subject: set cellborder - SOLVED Reply with quote

Hi,

my problem is solved.

Code:

_cellrange  := _table.getCellRangeByPosition (1, 1, 1, 1);
_borderline := _cellrange.BottomBorder;
_borderline.InnerLineWidth := 0;
_borderline.OuterLineWidth := 1 * PT2MM * 100;
_borderline.LineDistance   := 1 * PT2MM * 100;
_cellrange.BottomBorder         := _borderline;
_cellrange.BottomBorderDistance := 50;


Thanks...Patrick
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group