>
>
> without having a test case, I would assume that what you see is a
> automatic style, while you desired to have a named style,
> see
>
> http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01-part1.html#__RefHeading__1415054_253892949
>
>
Yes, you are right, when I set a style on a paragraph it creates an
automatic style with that name. However, the mentioned paragraphs does not
have this style assigned but instead has some 8-character style name that
is not even defined in the output document.

My intention was to reference a custom style that is already defined in the
ODT document (I am appending content to it using odftoolkit). Is it
possible to reference an already existing style?

I will create a junit test if I have to... but perhaps there is a quick
answer to the question ;)...

Regards,
Grzegorz

Am 20.10.2011 13:27, schrieb Grzegorz Kaczor:
> > Hello,
> >
> > I tried using both:
> >
> > -
> org.odftoolkit.odfdom.dom.element.OdfStylableElement.setStyleName(String)
> > - and org.odftoolkit.simple.text.Paragraph.setStyleName(String)
> >
> > to set style name of a newly created paragraph. The style name
> corresponds
> > to a paragraph style defined in ODT document I read, append to, and then
> > write to a new file.
> >
> > However, when I look at the generated document, the paragraphs have
> > text:style-name attribute value set to various values, like "a6d441b" or
> > similar (instead of the name I set).
> >
> > Why is this attribute value changed? And when? At which stage of document
> > processing? When I debug the functions above they set correct value. It
> gets
> > changed somewhere later...
> >
> > Regards,
> > Grzegorz
> >
>
>


-- 
Grzegorz Kaczor
Architekt Systemów
e-point SA

+ 48 512 173 837
[email protected]

www.e-point.pl
www.youtube.com/epointsa

Reply via email to