Hello Sebastian,

On Friday 03 April 2009, 10:51, Sebastian Patschorke wrote:
> what I want to do is finding a specific image in a text document. 

if you *just* want to able to find an image in an OOo Writer document, the best 
thing is to name it: the css.text.TextGraphicObject is derived from 
css.text.BaseFrame, which implements css.container.XNamed; with 
XNamed.setName() you can set a name (must be unique) different from the default 
one; and then you can get this image by name from the collection of 
TextGraphicObjects.

> So I
> try to put a reference mark on an image. The best would be something
> with a caption in addition.

if you want a caption like the one OOo inserts when right-clicking on an image 
and selecting "Caption...", then this is a more complicated, though possible:

* insert a text frame
* inside the text frame insert the image
* insert the sequence field
* insert the text for the caption

There was recently a question about adding a caption to a text table, very 
similar to this, see 
http://api.openoffice.org/servlets/ReadMsg?list=dev&msgNo=21083

I think I have some Java code showing how to this, I'll check this later at 
home.

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


"Aus der Kriegsschule des Lebens
                - Was mich nicht umbringt,
        macht mich härter."
                Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to