5 messages in org.openoffice.fr.progRe: [prog] ParentSection
FromSent OnAttachments
Agnès SimonetJul 10, 2004 11:25 am 
Agnès SimonetJul 10, 2004 10:04 pm 
Agnès SimonetJul 10, 2004 10:30 pm 
Tony GALMICHEJul 12, 2004 9:30 am 
Agnès SimonetJul 12, 2004 1:03 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] ParentSectionActions...
From:Agnès Simonet (agne@laposte.net)
Date:Jul 10, 2004 10:04:38 pm
List:org.openoffice.fr.prog

Bonjour,

J'ai un document comportant deux sections : "Section1" et "Section_liée". Section_liée est liée à "Section1" (étonnant, non ?)

J'essaie d'obtenir l'affichage du nom de la section mère (ici "Section1") correspondant à la section fille (ici "Section_liée")

oSectionFille = ThisComponent.TextSections.GetByName("section liée") oSectionMere = oSectionFille.getParentSection() XRay.XRay oSectionMere

Xray dit : Cette variable est un objet NULL

évidemment ensuite NomSection = oSectionMere.getName() entraîne un message d'erreur.

Manifestement je n'ai pas compris comment s'utilise la méthode getParentSection. Pourtant l'API indique 'If the object is a child section, then this method returns the parent text section'.

Quelqu'un saurait-il m'éclairer ?

Agnès S.

Je réponds à moi-même. Une section fille est une section contenue dans une autre (la section mère) et non pas liée à une autre. Reste que je ne sais pas accéder à une section à laquelle une autre est liée. Je vais continuer à chercher. Agnès S.