]> source.dussan.org Git - poi.git/commitdiff
add getOfficeArtSpContainer() method to OfficeDrawing
authorSergey Vladimirov <sergey@apache.org>
Tue, 23 Aug 2011 15:34:42 +0000 (15:34 +0000)
committerSergey Vladimirov <sergey@apache.org>
Tue, 23 Aug 2011 15:34:42 +0000 (15:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1160744 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawing.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java

index 5b983f3bf5ad4addc25adc6729def698f4794167..5165c9eb58c5a10ad9f64e032290ad3fff4b609b 100644 (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
      */
index 2d4c2a1a300a5ac3046cb84e3952bcb569eb1d07..732879add051c2c1ecb4285bef02fd942bba88ec 100644 (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() );