How to Modify Table Cell Border (Line and Style)
Posted: Sun Oct 01, 2017 2:20 am
Hello
I'm trying to make a basic macro to create a table in a Writer document and I would like my table to have a it's cell to have a precise background color and border line (width and style).
I managed to create the table and set the background color with :
Now I would like to modify the border line, both the line width and the style (dashed, double, ...) but I didn't find how to to do. I found in the api site https://api.libreoffice.org/docs/idl/re ... Line2.html the struct BorderLine2 which seam to contain the relevant properties but there is no method in the Cell class which use it.
What is the right way to modify the line width and style of borders in tables ? If it's possible.
I'm trying to make a basic macro to create a table in a Writer document and I would like my table to have a it's cell to have a precise background color and border line (width and style).
I managed to create the table and set the background color with :
Code: Select all
vCursor = ThisComponent.CurrentController.getViewCursor ()
oTable = ThisComponent.createInstance ("com.sun.star.text.TextTable")
oTable.initialize (10, 5)
...
oTable.getCellByPosition(1,cpt).BackColor = RGB(51,204,102)
What is the right way to modify the line width and style of borders in tables ? If it's possible.