Bonjour,
Quelles lignes de code dois-je ajouter à la macro ci-dessous pour avoir
un alignement du texte à droite aux lignes 3 et 5 de mon tableau ,
Merci
option explicit
sub Paleo_G
rem - Créée par Pierre-Yves Samyn, le 23-08-2011
rem - Modifiée par Sandy-Pascal Andriant, le le 23-08-2011
dim PysCursor as object, PysTable as object, PysTableBorder as object
dim PysLine as new com.sun.star.table.BorderLine
dim PysNoLine as new com.sun.star.table.BorderLine
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(4) as new com.sun.star.beans.PropertyValue
args1(0).Name = "CharFontName.StyleName"
args1(0).Value = ""
args1(1).Name = "CharFontName.Pitch"
args1(1).Value = 2
args1(2).Name = "CharFontName.CharSet"
args1(2).Value = -1
args1(3).Name = "CharFontName.Family"
args1(3).Value = 5
args1(4).Name = "CharFontName.FamilyName"
args1(4).Value = "Arial"
dispatcher.executeDispatch(document, ".uno:CharFontName", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(2) as new com.sun.star.beans.PropertyValue
args2(0).Name = "FontHeight.Height"
args2(0).Value = 10
args2(1).Name = "FontHeight.Prop"
args2(1).Value = 100
args2(2).Name = "FontHeight.Diff"
args2(2).Value = 0
dispatcher.executeDispatch(document, ".uno:FontHeight", "", 0, args2())
PysCursor = thisComponent.currentController.viewCursor
if (isEmpty(PysCursor.textTable)) then
msgbox "Le curseur n'est pas dans un tableau", 64, "Mise en forme
du tableau"
else
with PysLine
.Color = 0
.InnerLineWidth = 0
.LineDistance = 0
.OuterLineWidth = 9
end with
with PysNoLine
.Color = 0
.InnerLineWidth = 0
.LineDistance = 0
.OuterLineWidth = 0
end with
PysTable = PysCursor.TextTable
PysTableBorder = PysTable.TableBorder
PysTableBorder.IsLeftLineValid = true
PysTableBorder.IsRightLineValid = true
PysTableBorder.IsTopLineValid = true
PysTableBorder.IsBottomLineValid = true
PysTableBorder.IsHorizontalLineValid = true
PysTableBorder.IsVerticalLineValid = true
PysTableBorder.LeftLine = PysLine
PysTableBorder.RightLine = PysLine
PysTableBorder.TopLine = PysLine
PysTableBorder.BottomLine = PysLine
PysTableBorder.HorizontalLine = PysNoLine
PysTableBorder.VerticalLine = PysNoLine
PysTable.TableBorder = PysTableBorder
PysTable.HoriOrient = com.sun.star.text.HoriOrientation.FULL
end if
end sub
--
---
Cordialement
Mr Sandy-Pascal Andriant
--
Envoyez un mail à users+help@fr.libreoffice.org pour savoir comment vous désinscrire
Les archives de la liste sont disponibles à http://listarchives.libreoffice.org/fr/users/
Tous les messages envoyés sur cette liste seront archivés publiquement et ne pourront pas être
supprimés
Context
- [fr-users] Alignement à droite · Conil26
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.