aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Vladimirov <sergey@apache.org>2011-08-23 15:34:42 +0000
committerSergey Vladimirov <sergey@apache.org>2011-08-23 15:34:42 +0000
commitebe0c65b9a9dc20cc2abb93b4185798f80e6ef48 (patch)
tree88968c224599e17f540b26a2bf4c929fe6d6e084
parent1aa9ddb2302942c23cfe4352b5628102d3cc5604 (diff)
downloadpoi-ebe0c65b9a9dc20cc2abb93b4185798f80e6ef48.tar.gz
poi-ebe0c65b9a9dc20cc2abb93b4185798f80e6ef48.zip
add getOfficeArtSpContainer() method to OfficeDrawing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1160744 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java11
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java5
2 files changed, 16 insertions, 0 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java
index 5b983f3bf5..5165c9eb58 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java
@@ -16,6 +16,8 @@
==================================================================== */
package org.apache.poi.hwpf.usermodel;
+import org.apache.poi.ddf.EscherContainerRecord;
+
/**
* User-friendly interface to office drawing objects.
* <p>
@@ -131,6 +133,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
*/
byte[] getPictureData();
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java
index 2d4c2a1a30..732879add0 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java
@@ -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() );