git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1004919 13f79535-47bb-0310-9956-ffa450edef68pull/1/head
@@ -96,14 +96,6 @@ under the License. | |||
<property name="scratchpad.output.test.dir" location="build/scratchpad-test-classes"/> | |||
<property name="scratchpad.testokfile" location="build/scratchpad-testokfile.txt"/> | |||
<!-- Contributed software: --> | |||
<property name="contrib.src" location="src/contrib/src"/> | |||
<property name="contrib.src.test" location="src/contrib/testcases"/> | |||
<property name="contrib.reports.test" location="build/contrib-test-results"/> | |||
<property name="contrib.output.dir" location="build/contrib-classes"/> | |||
<property name="contrib.output.test.dir" location="build/contrib-test-classes"/> | |||
<property name="contrib.testokfile" location="build/contrib-testokfile.txt"/> | |||
<!-- Examples: --> | |||
<property name="examples.src" location="src/examples/src"/> | |||
<property name="examples.output.dir" location="build/examples-classes"/> | |||
@@ -173,11 +165,6 @@ under the License. | |||
<pathelement location="${main.output.dir}"/> | |||
</path> | |||
<path id="contrib.classpath"> | |||
<path refid="main.classpath"/> | |||
<pathelement location="${main.output.dir}"/> | |||
</path> | |||
<path id="ooxml.classpath"> | |||
<pathelement location="${ooxml.jsr173.jar}"/> | |||
<pathelement location="${ooxml.dom4j.jar}"/> | |||
@@ -238,8 +225,8 @@ under the License. | |||
Timestamp ${DSTAMP} | |||
The main targets of interest are: | |||
- clean Erase all build work products (ie. everything in the build directory) | |||
- compile Compile all files from main, ooxml, contrib and scratchpad | |||
- test Run all unit tests from main, ooxml, contrib and scratchpad | |||
- compile Compile all files from main, ooxml and scratchpad | |||
- test Run all unit tests from main, ooxml and scratchpad | |||
- jar Produce jar files | |||
- site Generate all documentation (Requires Apache Forrest) | |||
- dist Create a distribution (Requires Apache Forrest) | |||
@@ -258,9 +245,6 @@ under the License. | |||
<mkdir dir="${scratchpad.output.dir}"/> | |||
<mkdir dir="${scratchpad.output.test.dir}"/> | |||
<mkdir dir="${scratchpad.reports.test}"/> | |||
<mkdir dir="${contrib.output.dir}"/> | |||
<mkdir dir="${contrib.output.test.dir}"/> | |||
<mkdir dir="${contrib.reports.test}"/> | |||
<mkdir dir="${ooxml.output.dir}"/> | |||
<mkdir dir="${ooxml.output.test.dir}"/> | |||
<mkdir dir="${ooxml.reports.test}"/> | |||
@@ -413,8 +397,8 @@ under the License. | |||
</target> | |||
<target name="compile" depends="init, compile-main, | |||
compile-scratchpad, compile-contrib, compile-examples" | |||
description="Compiles the POI main classes, scratchpad, contrib and examples"/> | |||
compile-scratchpad, compile-examples" | |||
description="Compiles the POI main classes, scratchpad and examples"/> | |||
<target name="compile-all" depends="compile,compile-ooxml-lite"/> | |||
@@ -473,31 +457,6 @@ under the License. | |||
</copy> | |||
</target> | |||
<target name="compile-contrib" depends="compile-main"> | |||
<javac target="${jdk.version.class}" | |||
source="${jdk.version.source}" | |||
destdir="${contrib.output.dir}" | |||
srcdir="${contrib.src}" | |||
debug="${compile.debug}" | |||
encoding="${java.source.encoding}" | |||
fork="yes"> | |||
<classpath refid="contrib.classpath"/> | |||
</javac> | |||
<javac target="${jdk.version.class}" | |||
source="${jdk.version.source}" | |||
failonerror="true" | |||
destdir="${contrib.output.test.dir}" | |||
srcdir="${contrib.src.test}" | |||
debug="${compile.debug}" | |||
encoding="${java.source.encoding}" | |||
fork="yes"> | |||
<classpath> | |||
<path refid="contrib.classpath"/> | |||
<pathelement path="${contrib.output.dir}"/> | |||
</classpath> | |||
</javac> | |||
</target> | |||
<target name="compile-examples" depends="compile-main,compile-scratchpad,compile-ooxml"> | |||
<javac target="${jdk.version.class}" | |||
source="${jdk.version.source}" | |||
@@ -566,8 +525,8 @@ under the License. | |||
<delete file="${version.java}"/> | |||
</target> | |||
<target name="test" depends="compile,test-main,test-scratchpad,test-contrib,test-ooxml" | |||
description="Tests main, contrib, scratchpad and ooxml"/> | |||
<target name="test" depends="compile,test-main,test-scratchpad,test-ooxml" | |||
description="Tests main, scratchpad and ooxml"/> | |||
<target name="test-all" depends="test,test-ooxml-lite"/> | |||
<target name="-test-main-check"> | |||
@@ -637,41 +596,6 @@ under the License. | |||
<echo file="${scratchpad.testokfile}" append="false" message="testok"/> | |||
</target> | |||
<target name="-test-contrib-check"> | |||
<uptodate property="contrib.test.notRequired" targetfile="${contrib.testokfile}"> | |||
<srcfiles dir="${contrib.src}"/> | |||
<srcfiles dir="${contrib.src.test}"/> | |||
</uptodate> | |||
</target> | |||
<target name="test-contrib" depends="compile-main,compile-contrib,-test-contrib-check" | |||
unless="contrib.test.notRequired"> | |||
<junit printsummary="yes" fork="yes" haltonfailure="${halt.on.test.failure}" | |||
failureproperty="contrib.test.failed"> | |||
<classpath> | |||
<path refid="contrib.classpath"/> | |||
<pathelement location="${main.output.dir}"/> | |||
<pathelement location="${contrib.output.dir}"/> | |||
<pathelement location="${contrib.output.test.dir}"/> | |||
</classpath> | |||
<syspropertyset refid="junit.properties"/> | |||
<jvmarg value="${poi.test.locale}"/> | |||
<formatter type="plain"/> | |||
<batchtest todir="${contrib.reports.test}"> | |||
<fileset dir="${contrib.src.test}"> | |||
<include name="**/Test*.java"/> | |||
<exclude name="**/AllTests.java"/> | |||
</fileset> | |||
</batchtest> | |||
</junit> | |||
<delete file="${contrib.testokfile}"/> | |||
<antcall target="-test-contrib-write-testfile"/> | |||
</target> | |||
<target name="-test-contrib-write-testfile" unless="contrib.test.failed"> | |||
<echo file="${contrib.testokfile}" append="false" message="testok"/> | |||
</target> | |||
<target name="-test-ooxml-check"> | |||
<uptodate property="ooxml.test.notRequired" targetfile="${ooxml.testokfile}"> | |||
<srcfiles dir="${ooxml.src}"/> | |||
@@ -775,9 +699,6 @@ under the License. | |||
<include name="org/apache/poi/**"/> | |||
<exclude name="org/apache/poi/hdf/**"/> | |||
</packageset> | |||
<packageset dir="${contrib.src}" defaultexcludes="yes"> | |||
<include name="org/apache/poi/**"/> | |||
</packageset> | |||
<packageset dir="${ooxml.src}" defaultexcludes="yes"> | |||
<include name="org/apache/poi/**"/> | |||
</packageset> | |||
@@ -785,7 +706,6 @@ under the License. | |||
<classpath id="javadoc.classpath"> | |||
<path refid="main.classpath"/> | |||
<path refid="scratchpad.classpath"/> | |||
<path refid="contrib.classpath"/> | |||
<path refid="ooxml.classpath"/> | |||
<path path="${env.CLASSPATH}"/> | |||
</classpath> | |||
@@ -845,13 +765,6 @@ under the License. | |||
</replacetokens> | |||
</filterchain> | |||
</copy> | |||
<copy file="maven/poi-contrib.pom" tofile="${dist.dir}/poi-contrib-${version.id}.pom"> | |||
<filterchain> | |||
<replacetokens> | |||
<token key="VERSION" value="${version.id}"/> | |||
</replacetokens> | |||
</filterchain> | |||
</copy> | |||
<copy file="maven/poi-scratchpad.pom" tofile="${dist.dir}/poi-scratchpad-${version.id}.pom"> | |||
<filterchain> | |||
<replacetokens> | |||
@@ -908,11 +821,6 @@ under the License. | |||
<fileset dir="${main.output.dir}"/> | |||
<metainf dir="legal/"/> | |||
</jar> | |||
<jar destfile="${dist.dir}/${jar.name}-contrib-${version.id}-${DSTAMP}.jar" | |||
manifest="build/poi-manifest.mf"> | |||
<fileset dir="${contrib.output.dir}"/> | |||
<metainf dir="legal/"/> | |||
</jar> | |||
<jar destfile="${dist.dir}/${jar.name}-scratchpad-${version.id}-${DSTAMP}.jar" | |||
manifest="build/poi-manifest.mf"> | |||
<fileset dir="${scratchpad.output.dir}"/> | |||
@@ -946,11 +854,6 @@ under the License. | |||
<fileset dir="${scratchpad.src}"/> | |||
<metainf dir="legal/"/> | |||
</jar> | |||
<jar destfile="${dist.dir}/${jar.name}-contrib-${version.id}-sources-${DSTAMP}.jar" | |||
manifest="build/poi-manifest.mf"> | |||
<fileset dir="${contrib.src}"/> | |||
<metainf dir="legal/"/> | |||
</jar> | |||
<jar destfile="${dist.dir}/${jar.name}-ooxml-${version.id}-sources-${DSTAMP}.jar" | |||
manifest="build/poi-manifest.mf"> | |||
<fileset dir="${ooxml.src}"/> | |||
@@ -967,7 +870,6 @@ under the License. | |||
<!-- jars to include in binary assemblies --> | |||
<patternset id="bin.dist.jars"> | |||
<include name="${jar.name}-${version.id}-${DSTAMP}.jar"/> | |||
<include name="${jar.name}-contrib-${version.id}-${DSTAMP}.jar"/> | |||
<include name="${jar.name}-scratchpad-${version.id}-${DSTAMP}.jar"/> | |||
<include name="${jar.name}-ooxml-${version.id}-${DSTAMP}.jar"/> | |||
<include name="${jar.name}-examples-${version.id}-${DSTAMP}.jar"/> | |||
@@ -1087,7 +989,6 @@ under the License. | |||
<target name="mvn-install" depends="maven.ant.tasks-check,jar,maven-poms"> | |||
<m2-install artifactId="poi"/> | |||
<m2-install artifactId="poi-scratchpad"/> | |||
<m2-install artifactId="poi-contrib"/> | |||
<m2-install artifactId="poi-ooxml"/> | |||
<m2-install artifactId="poi-examples"/> | |||
<m2-install artifactId="poi-ooxml-schemas"/> | |||
@@ -1105,7 +1006,6 @@ under the License. | |||
<exclude name="documentation/content/xdocs/dtd/" /> | |||
<exclude name="documentation/content/xdocs/entity/" /> | |||
<exclude name="scratchpad/testcases/dummy.txt" /> | |||
<exclude name="contrib/testcases/dummy.txt" /> | |||
<exclude name="examples/lib/dummy.txt" /> | |||
</fileset> | |||
</rat:report> |
@@ -46,7 +46,7 @@ M2_SCP=people.apache.org:/www/people.apache.org/repo/m2-ibiblio-rsync-repository | |||
VERSION=@VERSION@ | |||
DSTAMP=@DSTAMP@ | |||
for artifactId in poi poi-scratchpad poi-contrib poi-ooxml poi-examples poi-ooxml-schemas | |||
for artifactId in poi poi-scratchpad poi-ooxml poi-examples poi-ooxml-schemas | |||
do | |||
mvn gpg:sign-and-deploy-file -DrepositoryId=apache-releases -P apache-releases \ | |||
-Durl=$M2_REPOSITORY \ |
@@ -1,81 +0,0 @@ | |||
<?xml version="1.0"?> | |||
<!-- | |||
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. | |||
--> | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<groupId>org.apache.poi</groupId> | |||
<artifactId>poi-contrib</artifactId> | |||
<version>@VERSION@</version> | |||
<packaging>jar</packaging> | |||
<name>Apache POI</name> | |||
<url>http://poi.apache.org/</url> | |||
<description>Apache POI - Java API To Access Microsoft Format Files</description> | |||
<mailingLists> | |||
<mailingList> | |||
<name>POI Users List</name> | |||
<subscribe>user-subscribe@poi.apache.org</subscribe> | |||
<unsubscribe>user-unsubscribe@poi.apache.org</unsubscribe> | |||
<archive>http://mail-archives.apache.org/mod_mbox/poi-user/</archive> | |||
</mailingList> | |||
<mailingList> | |||
<name>POI Developer List</name> | |||
<subscribe>dev-subscribe@poi.apache.org</subscribe> | |||
<unsubscribe>dev-unsubscribe@poi.apache.org</unsubscribe> | |||
<archive>http://mail-archives.apache.org/mod_mbox/poi-dev/</archive> | |||
</mailingList> | |||
</mailingLists> | |||
<licenses> | |||
<license> | |||
<name>The Apache Software License, Version 2.0</name> | |||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | |||
</license> | |||
</licenses> | |||
<organization> | |||
<name>Apache Software Foundation</name> | |||
<url>http://www.apache.org/</url> | |||
</organization> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.poi</groupId> | |||
<artifactId>poi</artifactId> | |||
<version>@VERSION@</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>commons-logging</groupId> | |||
<artifactId>commons-logging</artifactId> | |||
<version>1.1</version> | |||
<scope>runtime</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>log4j</groupId> | |||
<artifactId>log4j</artifactId> | |||
<version>1.2.13</version> | |||
<scope>runtime</scope> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -1,127 +0,0 @@ | |||
<!doctype html public "-//W3C//DTD HTML 4.0//EN//"> | |||
<!-- | |||
/* ==================================================================== | |||
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. | |||
==================================================================== */ | |||
--> | |||
<html> | |||
<head> | |||
<title></title> | |||
</head> | |||
<body> | |||
<div> | |||
<p>The <strong>POI Browser</strong> is a very simple Swing GUI tool that | |||
displays the internal structure of a Microsoft Office file. It concentrates | |||
on streams in the <em>Horrible Property Set Format (HPSF)</em>. In order to | |||
access these streams the POI Browser uses the package | |||
<tt>org.apache.poi.hpsf</tt>.</p> | |||
<p>A file in Microsoft's Office format can be seen as a filesystem within a | |||
file. For example, a Word document like <var>sample.doc</var> is just a | |||
simple file from the operation system's point of view. However, internally | |||
it is organized into various directories and files. For example, | |||
<var>sample.doc</var> might consist of the three internal files (or | |||
"streams", as Microsoft calls them) <tt>\001CompObj</tt>, | |||
<tt>\005SummaryInformation</tt>, and <tt>WordDocument</tt>. (In these names | |||
\001 and \005 denote the unprintable characters with the character codes 1 | |||
and 5, respectively.) A more complicated Word file typically contains a | |||
directory named <tt>ObjectPool</tt> with more directories and files nested | |||
within it.</p> | |||
<p>The POI Browser makes these internal structures visible. It takes one or | |||
more Microsoft files as input on the command line and shows directories and | |||
files in a tree-like structure. On the top-level POI Browser displays the | |||
(operating system) filenames. An internal file (i.e. a "stream" or a | |||
"document") is shown with its name, its size and a hexadecimal dump of its | |||
first bytes.</p> | |||
</div> | |||
<div> | |||
<h3>Property Set Streams</h3> | |||
<p>The POI Browser pays special attention to property set streams. For | |||
example, the <tt>\005SummaryInformation</tt> stream contains information | |||
like title and author of the document. The POI Browser opens every stream | |||
in a POI filesystem. If it encounters a property set stream, it displays | |||
not just its first bytes but analyses the whole stream and displays its | |||
contents in a more or less readable manner.</p> | |||
</div> | |||
<div> | |||
<h3>Running POI Browser</h3> | |||
<p>Running the POI Browser requires you to start a Java Virtual Machine | |||
(JVM) and to set up a valid classpath so that the JVM can find all the Java | |||
classes it needs. These are the main POI classes and the "contrib" POI | |||
classes.</p> | |||
<p>The following instructions assume that you have set up your Java | |||
enviromnent variables properly, i.e. the variable JAVA_HOME contains the | |||
name of your Java installation directory and the variable PATH includes the | |||
<var>bin</var> subdirectory of the Java installation directory. At the time | |||
of this writing the current POI version was 2.5.1-final dating from August | |||
4th, 2004. The example statements reflect version numbering and | |||
date. Change the commands accordingly if you are running the POI Browser of | |||
a later or earlier than this!</p> | |||
<div> | |||
<h4>Running POI Browser on Unix</h4> | |||
<p>Suppose you have unpacked the POI 2.5.1 release in the | |||
<var>/opt/local/poi</var> directory of your Unix box. Then the following | |||
command starts the POI Browser and displays the structure of the files | |||
<var>MyWord.doc</var>, <var>MyExcel.xls</var> and | |||
<var>MyPowerpoint.ppt</var>:</p> | |||
<pre>java -classpath /opt/local/poi/poi-2.5.1-final-20040804.jar:/opt/local/poi/poi-contrib-2.5.1-final-20040804.jar org.apache.poi.contrib.poibrowser.POIBrowser MyWord.doc MyExcel.xls MyPowerpoint.ppt</pre> | |||
</div> | |||
<div> | |||
<h4>Running POI Browser on Windows</h4> | |||
<p>Suppose you have unpacked the POI 2.5.1 release in the | |||
<var>C:\Programs\POI</var> directory of your Windows box. Then the following | |||
command starts the POI Browser and displays the structure of the files | |||
<var>MyWord.doc</var>, <var>MyExcel.xls</var> and | |||
<var>MyPowerpoint.ppt</var>:</p> | |||
<pre>java -classpath C:\Programs\POI\poi-2.5.1-final-20040804.jar;C:\Programs\POI\poi-contrib-2.5.1-final-20040804.jar org.apache.poi.contrib.poibrowser.POIBrowser MyWord.doc MyExcel.xls MyPowerpoint.ppt</pre> | |||
</div> | |||
</div> | |||
</body> | |||
</html> | |||
<!-- Keep this comment at the end of the file | |||
Local variables: | |||
sgml-default-dtd-file:"HTML_4.0_Strict.ced" | |||
mode: html | |||
sgml-omittag:t | |||
sgml-shorttag:nil | |||
sgml-namecase-general:t | |||
sgml-general-insert-case:lower | |||
sgml-minimize-attributes:nil | |||
sgml-always-quote-attributes:t | |||
sgml-indent-step:1 | |||
sgml-indent-data:t | |||
sgml-parent-document:nil | |||
sgml-exposed-tags:nil | |||
sgml-local-catalogs:nil | |||
sgml-local-ecat-files:nil | |||
End: | |||
--> |
@@ -213,7 +213,7 @@ public final class CellUtil { | |||
* | |||
* @param style cell style | |||
* @return map of format properties (String -> Object) | |||
* @see #setFormatProperties(CellStyle, Map) | |||
* @see #setFormatProperties(org.apache.poi.ss.usermodel.CellStyle, org.apache.poi.ss.usermodel.Workbook, java.util.Map) | |||
*/ | |||
private static Map<String, Object> getFormatProperties(CellStyle style) { | |||
Map<String, Object> properties = new HashMap<String, Object>(); |