Hi,

i'm currently trying to solve my problem with tablecells.
I managed to get my GraphicObjects into my oWriter files with help of snippets, mainly with

http://codesnippets.services.openoffice.org/Writer/Writer.EmbedAGraphicIntoATextdocument.snip

To determine the position where to anchor the image, I'm using placeholders as normal strings within my oWriter file.
A XTextCursor is placed onto that placeholder and ist used for

text.insertTextContent(cursor, xTextContent, true);

Runs smoothly except for the fact, that if my placeholder is within a table I'm getting a RuntimeException with no further details. After some research online I've found several approaches to that problem. One which suggests using the method

getCellParagraph($cell)

to get an anchor to that specific cell. Problem is, there is no getCellParagraph() method in the API of OOo.
Maybe it was an older approach.
The second approach I found suggests using Shapes to add them to DrawPages. I couldn't figure out to make that one work, maybe because it was suggested for oCalc instead of oWriter. But I don't know if it should work in oWriter the same way and I'm just too dumb to use it.
That one was discussed here:

http://api.openoffice.org/servlets/ReadMsg?listName=dev&msgNo=2618

So my questions are:
(1) Is it possible to use insertTextContent with images in tablecells when I'm in oWriter? And what do I have to change to make it work? When not, why isn't it possible? (2) Is using Shapes also the way to go for oWriter if I'm trying to get images into tablecells? (3) What mehtod is used if I manually insert images into cells with the oWriter GUI?

Thanks in advance.

Steffen Boersig


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

Reply via email to