Background Notes: I have seen bouncing messages, so be warned about that, perhaps copy me directly if I do not reply.
I told Olivier Hallot that I would automate finding problems in existing Documents and I am currently looking at fixing problems related to Styles. The intent is to automate (as much as possible) a currently laborous manual process of preparing documents for export to HTML. I am aware (by inspection) of some styles, for example, I know that a Figure should be anchored as a character to a paragraph with style Figure and its caption should be of style Caption. Paragraph styles in Tables tables should be "Table Contents" and "Table Heading" except when the table is used to position things (such as figures). As a first step towards GUESSING, which styles should be considered properly used in a document, I need to have a list of styles that are considered "valid" in a document that we produce. I wrote a Macro that inspects styles to see what styles are in a document. I randomly chose WG7202-WorkingWithTextBasics.odt I see the following number of styles: 30 CharacterStyles 139 ParagraphStyles 11 PageStyles 7 FrameStyles 17 NumberingStyles 18 TableStyles 288 CellStyles Oliver did not mention Cell Styles or Page Styles, so I will ignore those entirely. But there qare a bunch of Cell Styles (288) and Paragraph Styles (139) in this document. After I understand what styles types are of interest, I can document those and isolate them in my macros so that I can flag unexpected styles and we can set them to something that we want. I will automate this process if possible. Do I care about Character styles. In a perfect world, I will not worry about all of the styles? For Character Styles, however, this is a list ordered by IsUserDefined, IsInUse, and finally by DisplayName. Name IsUserDefined IsInUse Keystroke True True Code True False Emphasis False True Index Link False True Internet Link False True No Character Style False True Strong Emphasis False True Bullets False False Bullets False False Caption Characters False False Definition False False Drop Caps False False Endnote Anchor False False Endnote Characters False False Example False False Footnote Anchor False False Footnote Characters False False Line Numbering False False Main Index Entry False False Numbering Symbols False False Page Number False False Placeholder False False Quotation False False Rubies False False Source Text False False Teletype False False User Entry False False Variable False False Vertical Numbering Symbols False False Visited Internet Link False False *********************** Paragraph Styles, using the same sorting criteria for character styles *********************** Name IsUserDefined IsInUse Definition Term True True Guide Name True True Heading Caution True True Heading Note True True Heading Tip True True LOList 1_TextBody True True New Chapter True True Text Body List Intro True True Text Note True True Code True False Code End True False Guide Subtitle True False Guide Title True False Page Break True False Caption False True Contents 1 False True Contents 2 False True Contents 3 False True Contents Heading False True Default Paragraph Style False True Figure False True Footer False True Heading False True Heading 1 False True Heading 2 False True Heading 3 False True List 1 False True List Contents False True Numbering 1 False True Subtitle False True Table Contents False True Table Heading False True Text Body False True Text Body Indent False True Title False True Addressee False False Appendix False False Bibliography 1 False False Bibliography Heading False False Complimentary Close False False Contents 10 False False Contents 4 False False Contents 5 False False Contents 6 False False Contents 7 False False Contents 8 False False Contents 9 False False Drawing False False Endnote False False Figure Index 1 False False Figure Index Heading False False First Line Indent False False Footer Left False False Footer Right False False Footnote False False Frame Contents False False Hanging Indent False False Header False False Header and Footer False False Header Left False False Header Right False False Heading 10 False False Heading 4 False False Heading 5 False False Heading 6 False False Heading 7 False False Heading 8 False False Heading 9 False False Horizontal Line False False Illustration False False Index False False Index 1 False False Index 2 False False Index 3 False False Index Heading False False Index Separator False False List False False List 1 Cont. False False List 1 End False False List 1 Start False False List 2 False False List 2 Cont. False False List 2 End False False List 2 Start False False List 3 False False List 3 Cont. False False List 3 End False False List 3 Start False False List 4 False False List 4 Cont. False False List 4 End False False List 4 Start False False List 5 False False List 5 Cont. False False List 5 End False False List 5 Start False False List Heading False False List Indent False False Marginalia False False Numbering 1 Cont. False False Numbering 1 End False False Numbering 1 Start False False Numbering 2 False False Numbering 2 Cont. False False Numbering 2 End False False Numbering 2 Start False False Numbering 3 False False Numbering 3 Cont. False False Numbering 3 End False False Numbering 3 Start False False Numbering 4 False False Numbering 4 Cont. False False Numbering 4 End False False Numbering 4 Start False False Numbering 5 False False Numbering 5 Cont. False False Numbering 5 End False False Numbering 5 Start False False Object Index 1 False False Object Index Heading False False Preformatted Text False False Quotations False False Sender False False Signature False False Table False False Table Index 1 False False Table Index Heading False False Text False False User Index 1 False False User Index 10 False False User Index 2 False False User Index 3 False False User Index 4 False False User Index 5 False False User Index 6 False False User Index 7 False False User Index 8 False False User Index 9 False False User Index Heading False False *********************** Page Styles, using the same sorting criteria for character styles *********************** I am ignoring these for now, but the list is short, so: Name IsUserDefined IsInUse Default Page Style False True First Page False True Front Matter True True Left Page False False Right Page False False Envelope False False Index False False HTML False False Footnote False False Endnote False False Landscape False False *********************** Frame Styles, using the same sorting criteria for character styles *********************** Name IsUserDefined IsInUse Frame False True Graphics False True OLE False False Formula False False Marginalia False False Watermark False False Labels False False *********************** Numbering Styles, using the same sorting criteria for character styles *********************** Name IsUserDefined IsInUse Heading Caution True True Heading Note True True Heading Tip True True Numbering 1 True True Numbering 2 True True Numbering 3 True True Bullet – False True Bullet • False True Bullet False False Bullet False False Bullet False False No List False False Numbering 123 False False Numbering ABC False False Numbering abc False False Numbering IVX False False Numbering ivx False False *********************** Table Styles, using the same sorting criteria for character styles *********************** Name IsUserDefined IsInUse 3D True False Black 1 True False Black 2 True False Blue True False Brown True False Currency True False Currency 3D True False Currency Gray True False Currency Lavender True False Currency Turquoise True False Gray True False Green True False Guides True True Lavender True False Red True False Turquoise True False Yellow True False Default Table Style False False *********************** Cell Styles, using the same sorting criteria for character styles *********************** Should I be checking these? I see many user defined cell styles such as Guides.1, Guides.2, Green.2, and some of these are even used. I won't bother you with the long list. Any THoughts? -- To unsubscribe e-mail to: [email protected] 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
