| 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.WordprocessingML; |
|---|
| 22 | |
|---|
| 23 | import org.apache.log4j.Logger; |
|---|
| 24 | import org.docx4j.openpackaging.exceptions.InvalidFormatException; |
|---|
| 25 | import org.docx4j.openpackaging.parts.PartName; |
|---|
| 26 | import org.docx4j.openpackaging.parts.relationships.Namespaces; |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | public class VbaProjectBinaryPart extends BinaryPart { |
|---|
| 30 | |
|---|
| 31 | private static Logger log = Logger.getLogger(VbaProjectBinaryPart.class); |
|---|
| 32 | |
|---|
| 33 | public VbaProjectBinaryPart(PartName partName) throws InvalidFormatException { |
|---|
| 34 | super(partName); |
|---|
| 35 | init(); |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | public VbaProjectBinaryPart() throws InvalidFormatException { |
|---|
| 40 | super( new PartName("/word/vbaProject.bin") ); |
|---|
| 41 | init(); |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | public void init() { |
|---|
| 45 | // Used if this Part is added to [Content_Types].xml |
|---|
| 46 | setContentType(new org.docx4j.openpackaging.contenttype.ContentType( |
|---|
| 47 | org.docx4j.openpackaging.contenttype.ContentTypes.OFFICEDOCUMENT_VBA_PROJECT)); |
|---|
| 48 | |
|---|
| 49 | // Used when this Part is added to a rels |
|---|
| 50 | setRelationshipType(Namespaces.VBA_PROJECT); |
|---|
| 51 | } |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | } |
|---|