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


Bonjour


Le 19/10/2017 à 21:21, Stéphane Santon a écrit :
Bonjour,

Pour exécuter une macro qui importe environ 200 images, j'aimerais désactiver l'option d'affichage des images dans Writer, au début de la macro, et la réactiver à la fin.


oui c'est possible si c'est une configuation accessinble dans le tree des configurations, mais ce demande un peu de 'travail'
deja identifier le fichier et la propriété dans la conf .xcu de libreoffice
(par exemple en modifiant ta propriéete et en regardant ensuite quel fichier et noeuds ont changé)

ensuite

exemple sur la taille des icones
sub ConfigSetting_tailleIcones()

    '<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="SymbolSet" oor:op="fuse"><value>0</value></prop></item>

    conf = getConfigSetting("/org.openoffice.Office.Common/Misc" ,true)
    conf.SymbolSet = 0 'petit
    conf.commitChanges()

end sub


function getConfigSetting(target as string, forUpdate as boolean)
' retourne le noeud de config demandé
' exemple: aSettings = getConfigSetting( "/org.openoffice.Office.Common/Path/Current", false)

    dim service as String ' nom du service d'acces à la configuration
    dim aSettings, aConfigProvider
    dim aParams(0) As new com.sun.star.beans.PropertyValue
    dim varEmpty

    if forUpdate then
        service = "com.sun.star.configuration.ConfigurationUpdateAccess"
    else
        service = "com.sun.star.configuration.ConfigurationAccess"
    endif

    aConfigProvider = createUnoService( "com.sun.star.configuration.ConfigurationProvider" )
    aParams(0).Name = "nodepath"
    aParams(0).Value = target

    aSettings = aConfigProvider.createInstanceWithArguments(service, aParams() )

    getConfigSetting = aSettings

end function

HTH

laurent


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