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


Ah oui...
j'avais pas vu que c'était le nom du nœud de la propriété...
ça donne donc :

sub ConfigSetting_afficherImages( afficherImages)

'<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="SymbolSet" oor:op="fuse"><value>0</value></prop></item>
        Dim conf as Variant
conf = getConfigSetting("/org.openoffice.Office.Writer/Content/Display" ,true) '/org.openoffice.Office.Common/Misc
    conf.GraphicObject = afficherImages 'SymbolSet
    conf.commitChanges()
end sub

Aucune erreur d'exécution mais option non opérationnelle...

Je chercherai encore !

Merci

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

J'ai repéré la modification dans le fichier
C:\Users\utilisateur\AppData\Roaming\LibreOffice\4\user\registrymodifications.xcu


sur la clé
<item oor:path="/org.openoffice.Office.Writer/Content/Display">
  <prop oor:name="GraphicObject" oor:op="fuse">
    <value>true</value>
  </prop>
</item>

A l'exécution, j'ai une erreur
"Erreur d'exécution BASIC.
Propriété ou méthode non trouvée : SymbolSet."

sur
conf.SymbolSet = 0

Qu'ai-je oublié ?

LibreOffice 5.2.6.2

Merci


Le 20/10/2017 à 11:04, Laurent Godard a écrit :
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.