To add Outline Levels 1/2 to Indexes at Levels 1/2

Hello All -

I am using LibreOffice 5.2 on Ubuntu and trying to see how to best solve this issue.

I would like add Outline Levels 1/2 to 4 Index entries I have so the items in the 4 indexes, when inserted at Level 3, show up under the Outline Levels 1/2 added at levels 1/2 in those Indexes.

I have been able to do this manually to get the desired effect.


However, I wanted to see whether one or both of the following are true:

  1. If this could be done as part of feature already in LO 5.2
  2. Or whether this needed to be done programmatically through a macro?

If programmatically through a macro then I assume the following rough pseudocode would be necessary:

  1. Check the 4 indexes and if any item in those indexes appear at Levels 1/2 then move them to Level 3 if they are not in Outline Levels 1/2.
  2. For each Outline Level 1/2 add to the 4 Indexes at Levels 1/2.

I am a programmer and was hoping to write it in Basic using the XDocumentIndexes. I am assuming there is a Outline Index or some interface to access the Outlines also.

I assume Basic would be best language as it is the default language? I am a good Python programmer.

However, I assume setup is already there for Basic in LO.

Would appreciate hearing from you on how to best accomplish this. If LO already has this feature then how do I use it? And if programming, then where would be a good place to start in accessing the Indexes please.

Thank you for your help and suggestions.

Mono

You might take a look at OOME_3_0.pdf, by Andrew Pitonyak. His site is site link. Section 14.13 has some examples for table of contents.

Thanks Mark. Going through it now. Is there a way to request this as a feature in LO - ie adding the Outlines to Indexes with a choice of Levels and to which Indexes.

Is it not easy to just use the lower level of heading and set the format to the same as outline format? You could take a look at the LibreOffice Bugzilla (google search) and submit a bug as enhancement request, but search for any existing report first before posting.

By ‘to just use the lower level of heading and set the format to the same as outline format?’ - do you mean lower 'evel as to set the Index entry to the lower level ie 3?

Also not sure how to (or what you mean by) set the format to the ‘Outline format’. Do you mean for the Indexes? Is that even possible as I had not seen. And if so will it not show all levels of Outline not just 1 and 2 which is all i want.

Not sure if this is what you meant but attached example, Untitled 30.odt, of what I thought you were describing. Although the text “Outline 3” and “Outline 3a” look the same, only “Outline 3a” is shown in the table of contents.

Hi Mark - What I want is not with TOC but with Indexes.
I have 4 Indexes (Emails/Documents/Invoices/Comparisons).
I would like Levels 1/2 of TOC to show up in ALL 4 Indexes. And I will always add the 4 Index entries at Level 3.
Hope that helps.