sometimes, in the content.xml you have that:
<text:span text:style-name="T1"><draw:frame .....
/></draw:frame></text:span>
that is to say, a frame in a text. that happens almost
when you have pictures between text, on the same line,
in an odt document.
when the MainContentProcessor build the mixed content
of the paragraph that contains this text.
1) you check if the xml tag is a text (which is the
case here) so you create a text object
2) if the text object is null (which is not the case)
you try to create an IContent.
so i never see my image!
i've done a little fix (don't say it's perfect, but
works for me)
1) check that the node outputs a good IContent (not
null and not unknow)
2) if not, try to do the same with its first child (if
has one)
3) if not, create a text.
hope you will fix it soon
bye
ArrayList mixedContent = new ArrayList();
foreach(XmlNode nodeChild in paragraph.Node.ChildNodes)
{
bool isText = true;
IContent iContentt = this.CreateContent(nodeChild);
if( iContentt != null && !( iContentt is
UnknownContent ) )
{
mixedContent.Add(iContentt);
isText = false;
}
if( isText && nodeChild.HasChildNodes )
{
// check that child node is not a text content
IContent iContent = this.CreateContent(
nodeChild.ChildNodes[ 0 ]);
if( iContent != null && !( iContent is
UnknownContent ) )
{
mixedContent.Add( iContent );
isText = false;
}
}
if ( isText )
{
//Check for IText content first
TextContentProcessor tcp = new
TextContentProcessor();
IText iText =
tcp.CreateTextObject(this._document,
nodeChild.CloneNode(true));
if(iText != null)
mixedContent.Add(iText);
}
}