Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


Merci  Yves Dutrieux.

Pour l'utilisation d'un tableau, je n'ai pas compris.

Macro sur le fichier joint :  Couleur de lettre.odt
<https://www.cjoint.com/c/HFhp365pd8n>  

donne :
REM  *****  BASIC  *****

sub DiffCouleur12c
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent
curseur=ThisComponent.currentcontroller.ViewCursor
' change les 10 caractères qui suivent le curseur courant par une couleur
pré-définie
rem couleur premier caractère
      curseur.goright(1,true)
      curseur.CharColor=rgb(107,52,02)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(14,72,98)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(643,20,02)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(544,00,96)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(887,42,40)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(41,21,12)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(165,386,24)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(544,00,96)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(148,869,11)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(161,45,95)
      curseur.goleft(1,false)
      curseur.goright(1,false)

      curseur.goright(1,true)
      curseur.CharColor=rgb(22,36,51)
      curseur.goleft(1,false)
      curseur.goright(1,false)

rem couleur 12e et dernier caractère
      curseur.goright(1,true)
      curseur.CharColor=rgb(106,982,43)
      curseur.goleft(1,false)
      curseur.goright(1,false)


end sub 

C'est pas évident de récupérer les codes de couleur utilisés par LibreOffice
pour les convertir en RVB 



-----
Utilise Libreoffice avec Ubuntu
--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Users-f1744091.html

-- 
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour vous désinscrire
Les archives de la liste sont disponibles à https://listarchives.libreoffice.org/fr/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


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.