Bonjour
J'avais un code qui fonctionnait sous Open Office, mais en passant sous Libre Office, ce codage fait a près la même chose sauf pour les lignes de bordures de tableau. Rien n'y fait, j'ai tracé le code en pas à pas, j'ai l'impression que la variable oZone.TableBorder voire oZone.TableBorder2 sont en lecture seule.
Puis j'ai essayé de modifier à la main oZone.TableBorder.RightLine.OuterLineWidth=250 mais tout ceci reste à nouveau sans effet
Avez-vous des pistes à me donner ?
D'avance merci
Xavier
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 Sub Main dim oBord as new com.sun.star.table.BorderLine oDocument=thiscomponent oFeuilles=oDocument.Sheets oFeuilleDest=oFeuilles.getByName("Feuille1") oZone=oFeuilleDest.GetCellRangeByPosition(0,0,10,10) oBordTable=oZone.TableBorder with oBord .OuterLineWidth=250 .InnerLineWidth=250 oBordTable.Leftline=oBord oBordTable.Rightline=oBord oBordTable.TopLine=oBord oBordTable.BottomLine=oBord oBordTable.HorizontalLine=oBord oBordTable.VerticalLine=oBord end with with oBordTable .IsBottomLineValid=true .IsTopLineValid=true .IsLeftLineValid=true .IsRightLineValid=true .IsHorizontalLineValid=true .IsVerticalLineValid=true end with oZone.TableBorder2=oBordTable 'sans effet oZone.TableBorder=oBordTable 'sans effet ?? semble être en lecture seule oZone.TableBorder.RightLine.OuterLineWidth=250 oZone.Rows.Height=700 '1/100 mm oZone.Columns.OptimalWidth=true oZone.HoriJustify=com.sun.star.table.CellHoriJustify.LEFT 'active l'alignement oZone.VertJustify=com.sun.star.table.CellVertJustify.CENTER End Sub
Partager