| Line | |
|---|
| 1 | package org.docx4j.openpackaging.parts.WordprocessingML; |
|---|
| 2 | // Ideally this part would have been created in the parts |
|---|
| 3 | // package itself, since it is also used when a |
|---|
| 4 | // chart is embedded in a pptx. ie there is nothing |
|---|
| 5 | // about it which is specific to WML. |
|---|
| 6 | |
|---|
| 7 | import org.apache.log4j.Logger; |
|---|
| 8 | import org.docx4j.openpackaging.exceptions.InvalidFormatException; |
|---|
| 9 | import org.docx4j.openpackaging.parts.PartName; |
|---|
| 10 | import org.docx4j.openpackaging.parts.relationships.Namespaces; |
|---|
| 11 | |
|---|
| 12 | public class EmbeddedPackagePart extends BinaryPart { // maybe should extend EmbeddedPackagePart |
|---|
| 13 | |
|---|
| 14 | private static Logger log = Logger.getLogger(EmbeddedPackagePart.class); |
|---|
| 15 | |
|---|
| 16 | public EmbeddedPackagePart(PartName partName) throws InvalidFormatException { |
|---|
| 17 | super(partName); |
|---|
| 18 | init(); |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | public EmbeddedPackagePart() throws InvalidFormatException { |
|---|
| 23 | super( new PartName("/word/embeddings/foo") ); // eg Microsoft_Office_Powerpoint_Presentation.pptx |
|---|
| 24 | init(); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | public void init() { |
|---|
| 28 | // Used if this Part is added to [Content_Types].xml |
|---|
| 29 | // setContentType(new org.docx4j.openpackaging.contenttype.ContentType( |
|---|
| 30 | // org.docx4j.openpackaging.contenttype.ContentTypes.PRESENTATION)); |
|---|
| 31 | |
|---|
| 32 | // Used when this Part is added to a rels |
|---|
| 33 | setRelationshipType(Namespaces.EMBEDDED_PKG); |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.