add getOfficeArtSpContainer() method to OfficeDrawing

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1160744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-08-23 15:34:42 +00:00
parent bf295239bb
commit ca541c93a3
2 changed files with 16 additions and 0 deletions

View File

@ -16,6 +16,8 @@
==================================================================== */
package org.apache.poi.hwpf.usermodel;
import org.apache.poi.ddf.EscherContainerRecord;
/**
* User-friendly interface to office drawing objects.
* <p>
@ -130,6 +132,15 @@ public interface OfficeDrawing
*/
public HorizontalRelativeElement getHorizontalRelative();
/**
* Returns escher record that represent shape container (record type is
* <tt>0xF004</tt>). Returned record has a child with record type
* <tt>0xF00A</tt> and value of shape id equals to {@link #getShapeId()}.
*
* @return Returns office art shape container or <tt>null</tt> if not found
*/
public EscherContainerRecord getOfficeArtSpContainer();
/**
* Returns picture data if this shape has (single?) associated picture data
*/

View File

@ -167,6 +167,11 @@ public class OfficeDrawingsImpl implements OfficeDrawings
return HorizontalRelativeElement.TEXT;
}
public EscherContainerRecord getOfficeArtSpContainer()
{
return getEscherShapeRecordContainer( getShapeId() );
}
public byte[] getPictureData()
{
EscherContainerRecord shapeDescription = getEscherShapeRecordContainer( getShapeId() );