try {
TextPElement pElement = OdfElement.findFirstChildNode(TextPElement.class, mCellElement);
if (pElement != null) {
DrawFrameElement drawFrame = OdfElement.findFirstChildNode(DrawFrameElement.class, pElement);
if (drawFrame != null) {
DrawImageElement imageElement = OdfElement.findFirstChildNode(DrawImageElement.class, drawFrame);
return Image.getInstanceof(imageElement);
}
} else {
DrawFrameElement drawFrame = OdfElement.findFirstChildNode(DrawFrameElement.class, mCellElement);
if (drawFrame != null) {
DrawImageElement imageElement = OdfElement.findFirstChildNode(DrawImageElement.class, drawFrame);
return Image.getInstanceof(imageElement);
}
}
} catch (Exception ex) {
Logger.getLogger(Cell.class.getName()).log(Level.SEVERE, null, ex);