incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Günter Mayer <h8952...@wu.ac.at>
Subject AW: TextDocument.getListIterator() doesn't include lists in Sections
Date Wed, 31 Oct 2012 13:06:31 GMT
 Hello

I'm writing a seminar paper for the university. One of my tasks is to put an
image into an .ods document.
I'm trying to use a frame, because as i know the direct import into a cell
is not possible.

I write in ooRexx and via BSF4ooRexx i use the ODFDOM.

My code looks as follows:

 clz=bsf.import("org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument")
 outputOds=clz~newSpreadsheetDocument
 outputDom=outputOds~getContentDom()

 
page=.bsf~new("org.odftoolkit.odfdom.dom.element.office.OfficeImageElement",
outputDom)

 officesheet=outputOds~getContentRoot()
 sheet=officesheet~getFirstChild()
	
 frame=page~newDrawFrameElement()

 image=frame~newDrawImageElement()
 image~newImage(.bsf~new("java.net.URI","psepptest.jpg"))

 outputOds~save("test.ods")

 ::requires BSF.CLS


The program creates the document but it's empty.

So i think the connection between the ImageElement or the frame and the
table is missing.

But how to establish this connection?

Does anybody has an idea how to do this, or any other method to import a
picture into a spreadsheet document?


Many thanks in advance
Regards
Günter 


Mime
View raw message