Re: [jopendocument] Cell Comment

2010-12-14 Thread Sylvain Cuaz

Le 01/12/2010 17:24, abad a écrit :

Ho to read a cell comment using the API?


Hi,

There's no support in the API but it's quite simple :

Cell? cell = sheet.getCellAt(A3);
XMLVersion version = sheet.getODDocument().getVersion();
Element annot = cell.getElement().getChild(annotation, 
version.getOFFICE());
String comment = annot.getChild(p, version.getTEXT()).getText();

HTH,
Sylvain


Re: [jopendocument] hideSection not works

2010-12-14 Thread Sylvain Cuaz

Le 13/12/2010 11:10, Boymix81 a écrit :

Hi,

I want management the visibility of some sections in a odt document .
In jopendocument library I only find showParagraph and hideParagraph
methods in org.jopendocument.dom.template.JavaScriptFileTemplate
class .

I extend this class with the following methods :

 public void showTable(String name) {
 this.setField(showTable_ + name, Boolean.TRUE);
 }
 public void hideTable(String name) {
 this.setField(showTable_ + name, Boolean.FALSE);
 }

 public void showSection(String name) {
 this.setField(showSection_ + name, Boolean.TRUE);
 }
 public void hideSection(String name) {
 this.setField(showSection_ + name, Boolean.FALSE);
 }

 public void showListItem(String name) {
 this.setField(showListItem_ + name, Boolean.TRUE);
 }
 public void hideListItem(String name) {
 this.setField(showListItem_ + name, Boolean.FALSE);
 }

but for section element the methods don't work and I have the
following error :


Hi,

Could you provide your java code, your template and the whole stack trace so we 
can look into it ?

Cheers,
Sylvain