incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Meulmeester <>
Subject Re: OdfDrawImage from OdfTableCell
Date Sun, 04 Dec 2011 13:09:45 GMT
Hi Devin,

Ok, thank, I did not read anywhere that the ODFDOM was deprecated.

As a good lazy programmer I started by using the Simple API. :-)  And I
really liked the API.
But I found I could not iterate over a document and thought that I need to
drop down to ODFDOM for that...
Using the SimpleAPI I can iterate over all Tables, Paragraphs, Section but
I could not collect info according to the structure of the document, to
keep the info together.

I have a odt file from which I get information and expect the following

Header1 name-X
Header2 name-XX
Header2 name-XXX

Header1 name-Y
Header2 name-YY
Header2 name-YYY

I would like to find the Header1, use the "Name-X", then find and check the
next Header2, then find and check the Table etc...
Then go on to the next "Header1 Name-YYY"

I just want to do pseudocode:

Header 1.getNextElement()
Ok, this is a Header 2
Header 2.getNextElement()
Ok, this is a Table, get my info....

I could not find any examples of this in the Cookbook or am I missing


On Sun, Dec 4, 2011 at 7:27 AM, Devin Han <> wrote:

> Hi Jan,
> I suppose you are using ODFDOM doc API, isn't it?
> OK, ODFDOM doc API is deprecated in the coming release and we will not
> maintain it in future.
> I suggest you replace it with Simple API[1], which is a new convenient API
> for ODF Documnet and has very simliar design with ODFDOM doc API. But
> Simple API has more powerful features and more performance tuning. You can
> migrate to Simple API very easy.
> Let's back your question. If you migrate to Simple API, you can use the
> following simple code:
> Image Cell.getImage() ;
> Image.getOdfEelment();
> More information please reference the cookbook[2].
> Hope my answer can help you.
> [1]
> [2]
> 2011/12/3 ikeamanual <>
> > Hi,
> >
> > I have a odf cell:
> >
> > OdfTableCell cell = table.getCellByPosition(0, 1);
> >
> > and in the document the cell only has a picture/Image inside.
> >
> > How to I get an OdfDrawImage from the cell?
> >
> > thanks,
> > Jan
> >
> --
> -Devin

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message