Thanks Pierre and Rafael for the help on cleaning the list styles

For the record, the small piece of code is
--------8<----------
Sub CleanListStyles
  Dim sFamilies as Variant
  sFamily = ThisComponent.StyleFamilies.getByName("ParagraphStyles")
  Dim newStyle as Object
Set newStyle = ThisComponent.CreateInstance("com.sun.star.style.ParagraphStyle")'
  newStyle.ParentStyle = "Standard"
  sFamily.insertByName("olivier_dummy", newStyle)
  CleanExtraBullet("List 1", "olivier_dummy")
  CleanExtraBullet("List 2", "olivier_dummy")
  CleanExtraBullet("Heading Caution", "olivier_dummy")
  CleanExtraBullet("Heading Tip", "olivier_dummy")
  CleanExtraBullet("Heading Note", "olivier_dummy")
  sFamily.removeByName("olivier_dummy")
msgbox "Finished"
End sub
--------8<----------

where CleanExtraBullet() is the macro recording that Pierre suggested.

I am cleaning the source files of Getting Started 7.2

Regards
Olivier


Em 15/07/2021 05:50, pierre-yves.samyn escreveu:
Hi

I think you can do the macro by recording:

- Search & replace the List1 paragraph style with an unused style (e.g. Content10)
- Search for all paragraphs in Content10
- Apply the numbering via the toolbar
- Remove numbering via the toolbar
- Replace the paragraph style Contents10 with List1

Best regards

Pierre-Yves SAMYN



--
Olivier Hallot
LibreOffice Documentation Coordinator
Rio de Janeiro - Brasil - Local Time: UTC-03:00
LibreOffice – free and open source office suite: https://www.libreoffice.org
Respects your privacy, and gives you back control over your data
http://tdf.io/joinus

--
To unsubscribe e-mail to: documentation+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/documentation/
Privacy Policy: https://www.documentfoundation.org/privacy

Reply via email to