Bonjour
Ci-dessous l'exemple pour créer un style de dessin "fils" de Standard>Objet
sans remplissage:
Sub PysCreateGraphicStyle
const STYLE_NAME = "pys"
Dim oDoc As Object
Dim oGraphics As Object
Dim oStyle As Object
oDoc = ThisComponent
oGraphics =oDoc. StyleFamilies.getByName("graphics")
if oGraphics.hasByName(STYLE_NAME) then
msgbox "Le style " & STYLE_NAME & " est déjà créé", MB_ICONINFORMATION,
"Création de style"
else
oStyle = oGraphics.createInstance("com.sun.star.style.Style")
oStyle.parentStyle = "objectwithoutfill"
oGraphics.insertByName("pys", oStyle)
end if
End Sub
Cordialement
--
Sent from:
http://document-foundation-mail-archive.969070.n3.nabble.com/Users-f1744091.html
--
Envoyez un mail à [email protected] pour vous désinscrire
Les archives de la liste sont disponibles à
https://listarchives.libreoffice.org/fr/users/
Privacy Policy: https://www.documentfoundation.org/privacy