diff options
author | Josh Micich <josh@apache.org> | 2009-02-19 19:50:20 +0000 |
---|---|---|
committer | Josh Micich <josh@apache.org> | 2009-02-19 19:50:20 +0000 |
commit | 6f1a7911c923b8a67cf28242795cc590fc8b834b (patch) | |
tree | 3818e84fd2148073b03cb96c5cbc198a9f9feece /src/ooxml/java/org | |
parent | b339adbe7d5badfeaddd3fe241cf90d667eb398c (diff) | |
download | poi-6f1a7911c923b8a67cf28242795cc590fc8b834b.tar.gz poi-6f1a7911c923b8a67cf28242795cc590fc8b834b.zip |
Added Apache License text to files where it was missing. Also fixed some compiler warnings in those files.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@745976 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org')
3 files changed, 57 insertions, 36 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFActiveXData.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFActiveXData.java index af7d645676..be967cf062 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFActiveXData.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFActiveXData.java @@ -1,3 +1,20 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + package org.apache.poi.xssf.usermodel; import java.io.IOException; @@ -9,43 +26,47 @@ import org.apache.poi.xssf.model.XSSFWritableModel; import org.apache.poi.POIXMLException; import org.apache.poi.openxml4j.opc.PackagePart; -public class XSSFActiveXData implements PictureData, XSSFWritableModel { - - private PackagePart packagePart; - private String originalId; - - public XSSFActiveXData(PackagePart packagePart, String originalId) { - this(packagePart); - this.originalId = originalId; - } - - public XSSFActiveXData(PackagePart packagePart) { - this.packagePart = packagePart; - } - - public String getOriginalId() { - return originalId; - } - - public PackagePart getPart() { - return packagePart; - } - +/** + * + * @author Nick Burch + */ +public final class XSSFActiveXData implements PictureData, XSSFWritableModel { + + private final PackagePart _packagePart; + private final String _originalId; + + public XSSFActiveXData(PackagePart packagePart, String originalId) { + _packagePart = packagePart; + _originalId = originalId; + } + + public XSSFActiveXData(PackagePart packagePart) { + this(packagePart, null); + } + + public String getOriginalId() { + return _originalId; + } + + public PackagePart getPart() { + return _packagePart; + } + public void writeTo(OutputStream out) throws IOException { - IOUtils.copy(packagePart.getInputStream(), out); + IOUtils.copy(_packagePart.getInputStream(), out); + } + + public byte[] getData() { + // TODO - is this right? + // Are there headers etc? + try { + return IOUtils.toByteArray(_packagePart.getInputStream()); + } catch(IOException e) { + throw new POIXMLException(e); + } } - public byte[] getData() { - // TODO - is this right? - // Are there headers etc? - try { - return IOUtils.toByteArray(packagePart.getInputStream()); - } catch(IOException e) { - throw new POIXMLException(e); - } - } - - public String suggestFileExtension() { - return packagePart.getPartName().getExtension(); - } + public String suggestFileExtension() { + return _packagePart.getPartName().getExtension(); + } } diff --git a/src/ooxml/java/org/apache/poi/xssf/util/CTFontWrapper.java b/src/ooxml/java/org/apache/poi/xssf/util/CTFontWrapper.java deleted file mode 100755 index e69de29bb2..0000000000 --- a/src/ooxml/java/org/apache/poi/xssf/util/CTFontWrapper.java +++ /dev/null diff --git a/src/ooxml/java/org/apache/poi/xssf/util/Charset.java b/src/ooxml/java/org/apache/poi/xssf/util/Charset.java deleted file mode 100755 index e69de29bb2..0000000000 --- a/src/ooxml/java/org/apache/poi/xssf/util/Charset.java +++ /dev/null |