{
if ( getPicturesManager() == null )
return;
// TODO: support headers
OfficeDrawing officeDrawing = doc.getOfficeDrawingsMain()
.getOfficeDrawingAt( characterRun.getStartOffset() );
if ( officeDrawing == null )
{
logger.log( POILogger.WARN, "Characters #" + characterRun
+ " references missing drawn object" );
return;
}
byte[] pictureData = officeDrawing.getPictureData();
if ( pictureData == null )
// usual shape?
return;
float width = ( officeDrawing.getRectangleRight() - officeDrawing
.getRectangleLeft() ) / AbstractWordUtils.TWIPS_PER_INCH;
float height = ( officeDrawing.getRectangleBottom() - officeDrawing
.getRectangleTop() ) / AbstractWordUtils.TWIPS_PER_INCH;
final PictureType type = PictureType.findMatchingType( pictureData );
String path = getPicturesManager()
.savePicture( pictureData, type,