How do I get the position of a graphic in a Writer document through UNO?

I am struggling with UNO and parsing a Writer document. I can parse the text, tables and find the graphics, but I can’t seem to determine where the graphics are with reference to the text. I need to know where in the text the graphics occur. Any idea where I’d find that information?

Im not sure because I work with Basic, but there I find some information through the property “Anchor”. The “Anchor” is a SwXTextRange or Null (e.g. anchor type “to page”).

I find this:
http://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1text_1_1TextGraphicObject.html
And therein inherit from XTextContent the method getAnchor().
Although it is not adapted to LibreOffice you still find useful information in the old Developer Guide, e.g. Shape Objects in Text - Apache OpenOffice Wiki

You should ask the question in the forum Index page • Apache OpenOffice Community Forum which has a part “Macros and UNO API”. Or first search that forum, which gives Position of graphics and paragraph in a Writer document (View topic) • Apache OpenOffice Community Forum for example.