Re: [jopendocument] Conditional text

2013-08-01 Thread Sylvain Cuaz

Le 31/07/2013 10:09, Jenthe Marien a écrit :

Hi

I'm developing my first project using jOpenDocument.

Is there some way to put Conditional Text in my OpenOffice template as I
would do using the OpenOffice api?


Hi,

Install the addon and see http://www.jopendocument.org/start_text_2.html
If you want a conditional text, you can insert a field and then call 
setField()
If you want a conditional paragraph, you can tag it and then call 
hideParagraph()

Cheers,
Sylvain

--

--- 
You received this message because you are subscribed to the Google Groups "jOpenDocument" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to jopendocument+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [jopendocument] src/org/jopendocument/examples/SimpleOdt2.java

2013-08-01 Thread Sylvain Cuaz

Le 24/07/2013 09:50, Gmail a écrit :

Hi,

ok fine,

This code does not work anymore :

ODPackage outputDocument = new ODPackage(new File("styles.odt"));
contentDom = outputDocument.toSingle();
final Paragraph paragraph = new Paragraph();
contentDom.add(paragraph);

What is the correct way to do it in version 1.3 ?


The add() method is now in TextDocument. So your second line should be

TextDocument contentDom = outputDocument.getTextDocument();


HTH,
Sylvain

--

--- 
You received this message because you are subscribed to the Google Groups "jOpenDocument" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to jopendocument+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.