Date: prev next · Thread: first prev next last


Hi

(I hope this is the right place to post this.)

Using odfdom, I created a numbered list this way (brackets added for
readability) :

OdfTextDocument odt = OdfTextDocument.newTextDocument();
// ...
{
        TextListElement ol0 = odt.getContentRoot().newTextListElement();
        ol0.setTextStyleNameAttribute("Numbering_20_1");
        {
                TextListItemElement li = ol0.newTextListItemElement();
                TextPElement p = li.newTextPElement();
                p.setTextContent("item num 1")
        }
}

It works fine but leaves me with two questions :

- Can I reliably rely on the existence of the "Numbering_20_1" (as well
as other styles defined in the generated styles.xml) when a document is
created from scratch using odfdom ?

- When the "text:style-name" attribute of a "text:list" element is left
unset, lowriter defaults to displaying a bullet list. Is this behavior
standard, or should I set the "text:style-name" to a defined bullet list
style like "List_20_1".

Or am I missing an easier way to create bullet/ordered lists altogether?

Thanks!

V.

--
To unsubscribe e-mail to: dev+unsubscribe@odftoolkit.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.odftoolkit.org/dev/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.