| 1 | /* |
|---|
| 2 | * Copyright 2007-2008, Plutext Pty Ltd. |
|---|
| 3 | * |
|---|
| 4 | * This file is part of docx4j. |
|---|
| 5 | |
|---|
| 6 | docx4j is licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 7 | you may not use this file except in compliance with the License. |
|---|
| 8 | |
|---|
| 9 | You may obtain a copy of the License at |
|---|
| 10 | |
|---|
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 12 | |
|---|
| 13 | Unless required by applicable law or agreed to in writing, software |
|---|
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 16 | See the License for the specific language governing permissions and |
|---|
| 17 | limitations under the License. |
|---|
| 18 | |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | package org.docx4j.openpackaging.parts; |
|---|
| 22 | |
|---|
| 23 | import javax.xml.bind.JAXBException; |
|---|
| 24 | import javax.xml.bind.Unmarshaller; |
|---|
| 25 | |
|---|
| 26 | import org.apache.log4j.Logger; |
|---|
| 27 | import org.docx4j.dml.Theme; |
|---|
| 28 | import org.docx4j.openpackaging.exceptions.InvalidFormatException; |
|---|
| 29 | import org.docx4j.openpackaging.parts.relationships.Namespaces; |
|---|
| 30 | import org.docx4j.vml.root.Xml; |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | public final class VMLPart extends JaxbXmlPart<Xml> { |
|---|
| 35 | |
|---|
| 36 | private static Logger log = Logger.getLogger(VMLPart.class); |
|---|
| 37 | |
|---|
| 38 | public VMLPart(PartName partName) throws InvalidFormatException { |
|---|
| 39 | super(partName); |
|---|
| 40 | init(); |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | public VMLPart() throws InvalidFormatException { |
|---|
| 44 | super(new PartName("/xl/drawings/vmlDrawing1.xml")); |
|---|
| 45 | init(); |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | public void init() { |
|---|
| 50 | |
|---|
| 51 | // Used if this Part is added to [Content_Types].xml |
|---|
| 52 | setContentType(new org.docx4j.openpackaging.contenttype.ContentType( |
|---|
| 53 | org.docx4j.openpackaging.contenttype.ContentTypes.VML_DRAWING)); |
|---|
| 54 | |
|---|
| 55 | // Used when this Part is added to a rels |
|---|
| 56 | setRelationshipType(Namespaces.VML); |
|---|
| 57 | |
|---|
| 58 | } |
|---|
| 59 | |
|---|
| 60 | } |
|---|