Association between ToC index object and its paragraph content
Jens Tröger
jens.troeger at light-speed.de
Fri Dec 8 09:19:29 UTC 2017
On Fri, Dec 08, 2017 at 10:03:57AM +0100, Miklos Vajna wrote:
> […]
>
> > Second, calling update() _duplicated_ each and every entry in the ToC
> > which looks like a bug to me (LO 5.3.6.1)…
>
> 5.3 is quite old, almost EOL; to discuss problems on this dev list, the
> best is if you first try your problem on master (towards 6.1) first.
Same happens for 5.4.3.2 and 6.0 (dev) as well. I've got a tiny test
DOCX here which demonstrates the problem, should I file a bug? Also, it
seems to happen only for top-level entries (i.e. Heading 1) but deeper
nested ones aren't duplicated.
> > I’m still curious though: iterating over the paragraphs, is there any
> > other indication than the par’s name that the par is in fact part of the
> > ToC index object?
>
> If you know what are the properties of the ToC object (does it only
> contain Heading 1 paragraphs? Or also Heading 2? etc), then just
> querying the outline numbering property ("OutlineLevel" is the UNO
> property name) of the paragraph should work. Or check if it has a
> RefHeading bookmark (see my previous mail) if that works better for you.
Great, thank you, I will try that!
Cheers,
Jens
--
Jens Tröger
http://savage.light-speed.de/
More information about the LibreOffice
mailing list