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


Le 20/08/2011 13:03, andriant.sandy a écrit :
Bonjour,

Comment dois-je intégrer

[QUOT]dispatcher.executeDispatch(document, ".uno:SetOptimalColumnWidth", "", 0, Array())[/QUOT]
dans une macro pour obtenir 1 tableau à 1 seule colonne, largeur : 100% ?

http://www.oooforum.org/forum/viewtopic.phtml?t=102575

Cordialement,
Sandy-Pascal Andriant


Ce code fonctionne :

REM  *****  Insère Tableau avec 1 ligne et 1 colonne  *****


sub Tableau_1_ligne_1_colonne
rem ----------------------------------------------------------------------
rem define variables
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(3) as new com.sun.star.beans.PropertyValue
args1(0).Name = "TableName"
args1(0).Value = "Tableau1"
args1(1).Name = "Columns"
args1(1).Value = 1
args1(2).Name = "Rows"
args1(2).Value = 1
args1(3).Name = "Flags"
args1(3).Value = 9

dispatcher.executeDispatch(document, ".uno:InsertTable", "", 0, args1())
end sub


mais il y a d'autres manières sans Macro  :
http://wiki.documentfoundation.org/FR/FAQ/Writer/136
J.M


--
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


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.