From afecad3532da1822a288f0b84a32c9fe851faafd Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Mon, 7 Nov 2011 13:22:04 +0000 Subject: [PATCH] keep rat-check quiet, also started writing xslf docs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1198722 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/xdocs/slideshow/book.xml | 3 +- .../content/xdocs/slideshow/index.xml | 3 +- .../content/xdocs/slideshow/xslf-cookbook.xml | 278 ++++++++++++++++++ .../apache/poi/xslf/usermodel/PPTX2SVG.txt | 176 +++++++++++ .../apache/poi/hpsf/TypedPropertyValue.java | 18 ++ .../org/apache/poi/hpsf/VersionedStream.java | 18 ++ .../org/apache/poi/ss/util/DataMarker.java | 0 .../poi/xslf/usermodel/XSLFTextParagraph.java | 16 + .../poi/xslf/geom/TestFormulaParser.java | 18 ++ .../poi/xslf/geom/TestPresetGeometries.java | 18 ++ .../org/apache/poi/hwpf/model/LFOData.java | 18 ++ .../hwpf/model/types/PICFAbstractType.java | 19 +- .../hwpf/sprm/TableSprmUncompressorTest.java | 18 ++ 13 files changed, 599 insertions(+), 4 deletions(-) create mode 100644 src/documentation/content/xdocs/slideshow/xslf-cookbook.xml create mode 100644 src/examples/src/org/apache/poi/xslf/usermodel/PPTX2SVG.txt delete mode 100644 src/java/org/apache/poi/ss/util/DataMarker.java diff --git a/src/documentation/content/xdocs/slideshow/book.xml b/src/documentation/content/xdocs/slideshow/book.xml index 8ccf5c1bc..741b7bc6b 100644 --- a/src/documentation/content/xdocs/slideshow/book.xml +++ b/src/documentation/content/xdocs/slideshow/book.xml @@ -30,7 +30,8 @@ - + + diff --git a/src/documentation/content/xdocs/slideshow/index.xml b/src/documentation/content/xdocs/slideshow/index.xml index f364f3382..939ccb996 100644 --- a/src/documentation/content/xdocs/slideshow/index.xml +++ b/src/documentation/content/xdocs/slideshow/index.xml @@ -63,8 +63,7 @@ Please note that XSLF is still in early development and is a subject to incompatible changes in future.

- A quick guide is available in - XSLF Examples + A quick guide is available in the XSLF Cookbook

diff --git a/src/documentation/content/xdocs/slideshow/xslf-cookbook.xml b/src/documentation/content/xdocs/slideshow/xslf-cookbook.xml new file mode 100644 index 000000000..7b81569a0 --- /dev/null +++ b/src/documentation/content/xdocs/slideshow/xslf-cookbook.xml @@ -0,0 +1,278 @@ + + + + + +
+ XSLF Cookbook + + + +
+ +
XSLF Cookbook + + Please note that XSLF is still in early development and is a subject to incompatible changes in a future release. + +
Index of Features +
    +
  • Create a new presentation
  • +
  • Read an existing presentation
  • +
  • Create a slide with a predefined layout
  • +
  • Delete slide
  • +
  • Re-order slides
  • +
  • Change slide size
  • +
  • Read shapes
  • +
  • Add image
  • +
  • Read images contained in a presentation
  • +
  • Format text
  • +
  • Hyperlinks
  • +
  • Convert .pptx slides into images
  • +
+
+
Cookbok + +
New Presentation +

+ The following code creates a new .pptx slide show and adds a blank slide to it: +

+ + //create a new empty slide show + XMLSlideShow ppt = new XMLSlideShow(); + + //add first slide + XSLFSlide blankSlide = ppt.createSlide(); + +
+ +
Read an existing presentation and append a slide to it + + XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("slideshow.pptx")); + + //append a new slide to the end + XSLFSlide blankSlide = ppt.createSlide(); + +
+ + +
Create a new slide from a predefined slide layout + + XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("slideshow.pptx")); + + // first see what slide layouts are available : + System.out.println("Available slide layouts:"); + for(XSLFSlideMaster master : ppt.getSlideMasters()){ + for(XSLFSlideLayout layout : master.getSlideLayouts()){ + System.out.println(layout.getType()); + } + } + + // blank slide + XSLFSlide blankSlide = ppt.createSlide(); + + // there can be multiple masters each referencing a number of layouts + // for demonstration purposes we use the first (default) slide master + XSLFSlideMaster defaultMaster = ppt.getSlideMasters()[0]; + + // title slide + XSLFSlideLayout titleLayout = defaultMaster.getLayout(SlideLayout.TITLE); + // fill the placeholders + XSLFSlide slide1 = ppt.createSlide(titleLayout); + XSLFTextShape title1 = slide1.getPlaceholder(0); + title1.setText("First Title"); + + // title and content + XSLFSlideLayout titleBodyLayout = defaultMaster.getLayout(SlideLayout.TITLE_AND_CONTENT); + XSLFSlide slide2 = ppt.createSlide(titleBodyLayout); + + XSLFTextShape title2 = slide2.getPlaceholder(0); + title2.setText("Second Title"); + + XSLFTextShape body2 = slide2.getPlaceholder(1); + body2.clearText(); // unset any existing text + body2.addNewTextParagraph().addNewTextRun().setText("First paragraph"); + body2.addNewTextParagraph().addNewTextRun().setText("Second paragraph"); + body2.addNewTextParagraph().addNewTextRun().setText("Third paragraph"); + +
+ + +
Delete slide + + XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("slideshow.pptx")); + + ppt.removeSlide(0); // 0-based index of a slide to be removed + +
+ + +
Re-order slides + + XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("slideshow.pptx")); + XSLFSlide[] slides = ppt.getSlides(); + + XSLFSlide thirdSlide = slides[2]; + ppt.setSlideOrder(thirdSlide, 0); // move the third slide to the beginning + +
+ + +
How to retrieve or change slide size + + XMLSlideShow ppt = new XMLSlideShow(); + //retrieve page size. Coordinates are expressed in points (72 dpi) + java.awt.Dimension pgsize = ppt.getPageSize(); + int pgx = pgsize.width; //slide width in points + int pgy = pgsize.height; //slide height in points + + //set new page size + ppt.setPageSize(new java.awt.Dimension(1024, 768)); + +
+ +
How to read shapes contained in a particular slide +

+ The following code demonstrates how to iterate over shapes for each slide. +

+ + XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("slideshow.pptx")); + //get slides + XSLFSlide[] slide = ppt.getSlides(); + for (int i = 0; i < slide.length; i++){ + XSLFShape[] sh = slide[i].getShapes(); + for (int j = 0; j < sh.length; j++){ + //name of the shape + String name = sh[j].getShapeName(); + + //shapes's anchor which defines the position of this shape in the slide + java.awt.geom.Rectangle2D anchor = sh[j].getAnchor(); + + if (sh[j] instanceof XSLFConnectorShape){ + XSLFConnectorShape line = (XSLFConnectorShape)sh[j]; + //work with Line + } else if (sh[j] instanceof XSLFTextShape){ + XSLFTextShape shape = (XSLFTextShape)sh[j]; + //work with a shape that can hold text + } else if (sh[j] instanceof XSLFPictureShape){ + XSLFPictureShape shape = (XSLFPictureShape)sh[j]; + //work with Picture + } + } + } + +
+ +
Add Image to Slide + + XMLSlideShow ppt = new XMLSlideShow(); + XSLFSlide slide = ppt.createSlide(); + + byte[] pictureData = IOUtils.toByteArray(new FileInputStream("image.png")); + + int idx = ppt.addPicture(pictureData, XSLFPictureData.PICTURE_TYPE_PNG); + XSLFPictureShape pic = slide.createPicture(idx); + +
+ + +
Read Images contained within a presentation + + XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("slideshow.pptx")); + for(XSLFPictureData data : ppt.getAllPictures()){ + byte[] bytes = data.getData(); + String fileName = data.getFileName(); + + } + +
+ + +
Basic text formatting + + XMLSlideShow ppt = new XMLSlideShow(); + XSLFSlide slide = ppt.createSlide(); + + XSLFTextBox shape = slide.createTextBox(); + XSLFTextParagraph p = shape.addNewTextParagraph(); + + XSLFTextRun r1 = p.addNewTextRun(); + r1.setText("The"); + r1.setFontColor(Color.blue); + r1.setFontSize(24); + + XSLFTextRun r2 = p.addNewTextRun(); + r2.setText(" quick"); + r2.setFontColor(Color.red); + r2.setBold(true); + + XSLFTextRun r3 = p.addNewTextRun(); + r3.setText(" brown"); + r3.setFontSize(12); + r3.setItalic(true); + r3.setStrikethrough(true); + + XSLFTextRun r4 = p.addNewTextRun(); + r4.setText(" fox"); + r4.setUnderline(true); + +
+ +
How to read hyperlinks from a slide show + + XMLSlideShow ppt = new XMLSlideShow(); + XSLFSlide slide = ppt.createSlide(); + + // assign a hyperlink to a text run + XSLFTextBox shape = slide.createTextBox(); + XSLFTextRun r = shape.addNewTextParagraph().addNewTextRun(); + r.setText("Apache POI"); + XSLFHyperlink link = r.createHyperlink(); + link.setAddress("http://poi.apache.org"); + +
+ +
PPTX2PNG is an application that converts each slide of a .pptx slideshow into a PNG image + +Usage: PPTX2PNG [options] <pptx file> +Options: + -scale <float> scale factor (default is 1.0) + -slide <integer> 1-based index of a slide to render. Default is to render all slides. + +

How it works:

+

+ The XSLFSlide object implements a draw(Graphics2D graphics) method that recursively paints all shapes + in the slide into the supplied graphics canvas: +

+ + slide.draw(graphics); + +

+ where graphics is a class implementing java.awt.Graphics2D. In PPTX2PNG the graphic canvas is derived from + java.awt.image.BufferedImage, i.e. the destination is an image in memory, but in general case you can pass + any compliant implementation of java.awt.Graphics2D. The + PPTX2SVG + example demonstrates how to use Apache Batik to convert .pptx slides into SVG format. +

+
+ +
+
+ +
diff --git a/src/examples/src/org/apache/poi/xslf/usermodel/PPTX2SVG.txt b/src/examples/src/org/apache/poi/xslf/usermodel/PPTX2SVG.txt new file mode 100644 index 000000000..dbe089ac3 --- /dev/null +++ b/src/examples/src/org/apache/poi/xslf/usermodel/PPTX2SVG.txt @@ -0,0 +1,176 @@ +/* + * ==================================================================== + * 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.xslf.usermodel; + +import org.apache.batik.dom.svg.SVGDOMImplementation; +import org.apache.batik.svggen.SVGGraphics2D; +import org.apache.batik.transcoder.wmf.tosvg.WMFPainter; +import org.apache.batik.transcoder.wmf.tosvg.WMFRecordStore; +import org.apache.poi.openxml4j.opc.OPCPackage; +import org.apache.poi.openxml4j.opc.PackagePart; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; + +import javax.imageio.ImageIO; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import java.awt.Dimension; +import java.awt.Graphics2D; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; +import java.io.DataInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; + +/** + * Convert each slide of a .pptx presentation into SVG + * + * @author Yegor Kozlov + */ +public class PPTX2SVG { + + static void usage() { + System.out.println("Usage: PPTX2SVG "); + } + + public static void main(String[] args) throws Exception { + if (args.length == 0) { + usage(); + return; + } + + String file = args[0]; + + System.out.println("Processing " + file); + + // read the .pptx file + XMLSlideShow ppt = new XMLSlideShow(OPCPackage.open(file)); + + Dimension pgsize = ppt.getPageSize(); + + // convert each slide into a .svg file + XSLFSlide[] slide = ppt.getSlides(); + for (int i = 0; i < slide.length; i++) { + // Create initial SVG DOM + DOMImplementation domImpl = SVGDOMImplementation.getDOMImplementation(); + Document doc = domImpl.createDocument("http://www.w3.org/2000/svg", "svg", null); + //Use Batik SVG Graphics2D driver + SVGGraphics2D graphics = new SVGGraphics2D(doc); + graphics.setRenderingHint(XSLFRenderingHint.IMAGE_RENDERER, new WMFImageRender()); + graphics.setSVGCanvasSize(pgsize); + + String title = slide[i].getTitle(); + System.out.println("Rendering slide " + (i + 1) + (title == null ? "" : ": " + title)); + + // draw stuff. All the heavy-lifting happens here + slide[i].draw(graphics); + + // save the result. + int sep = file.lastIndexOf("."); + String fname = file.substring(0, sep == -1 ? file.length() : sep) + "-" + (i + 1) + ".svg"; + OutputStreamWriter out = + new OutputStreamWriter(new FileOutputStream(fname), "UTF-8"); + DOMSource domSource = new DOMSource(graphics.getRoot()); + StreamResult streamResult = new StreamResult(out); + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer serializer = tf.newTransformer(); + serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); + serializer.setOutputProperty(OutputKeys.INDENT, "yes"); + serializer.transform(domSource, streamResult); + out.flush(); + out.close(); + } + System.out.println("Done"); + } + + /** + * Image renderer with support for .wmf images + */ + static class WMFImageRender extends XSLFImageRendener { + + /** + * Use Apache Batik to render WMF, + * delegate all other types of images to the javax.imageio framework + */ + @Override + public boolean drawImage(Graphics2D graphics, XSLFPictureData data, + Rectangle2D anchor) { + try { + // see what type of image we are + PackagePart part = data.getPackagePart(); + String contentType = part.getContentType(); + if (contentType.equals("image/x-wmf")) { + WMFRecordStore currentStore = new WMFRecordStore(); + currentStore.read(new DataInputStream(part.getInputStream())); + int wmfwidth = currentStore.getWidthPixels(); + float conv = (float) anchor.getWidth() / wmfwidth; + + // Build a painter for the RecordStore + WMFPainter painter = new WMFPainter(currentStore, + (int) anchor.getX(), (int) anchor.getY(), conv); + painter.paint(graphics); + } else { + BufferedImage img = ImageIO.read(data.getPackagePart().getInputStream()); + graphics.drawImage(img, + (int) anchor.getX(), (int) anchor.getY(), + (int) anchor.getWidth(), (int) anchor.getHeight(), null); + } + } catch (Exception e) { + return false; + } + return true; + } + + /** + * Convert data form the supplied package part into a BufferedImage. + * This method is used to create texture paint. + */ + @Override + public BufferedImage readImage(PackagePart packagePart) throws IOException { + String contentType = packagePart.getContentType(); + if (contentType.equals("image/x-wmf")) { + try { + WMFRecordStore currentStore = new WMFRecordStore(); + currentStore.read(new DataInputStream(packagePart.getInputStream())); + int wmfwidth = currentStore.getWidthPixels(); + int wmfheight = currentStore.getHeightPixels(); + + BufferedImage img = new BufferedImage(wmfwidth, wmfheight, BufferedImage.TYPE_INT_RGB); + Graphics2D graphics = img.createGraphics(); + + // Build a painter for the RecordStore + WMFPainter painter = new WMFPainter(currentStore, 0, 0, 1.0f); + painter.paint(graphics); + + return img; + } catch (IOException e) { + return null; + } + } else { + return ImageIO.read(packagePart.getInputStream()); + } + } + + } +} diff --git a/src/java/org/apache/poi/hpsf/TypedPropertyValue.java b/src/java/org/apache/poi/hpsf/TypedPropertyValue.java index 455aef6bd..982139ba8 100644 --- a/src/java/org/apache/poi/hpsf/TypedPropertyValue.java +++ b/src/java/org/apache/poi/hpsf/TypedPropertyValue.java @@ -1,3 +1,21 @@ +/* + * ==================================================================== + * 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.hpsf; import org.apache.poi.util.Internal; diff --git a/src/java/org/apache/poi/hpsf/VersionedStream.java b/src/java/org/apache/poi/hpsf/VersionedStream.java index 89a269ea7..c3c066e4f 100644 --- a/src/java/org/apache/poi/hpsf/VersionedStream.java +++ b/src/java/org/apache/poi/hpsf/VersionedStream.java @@ -1,3 +1,21 @@ +/* + * ==================================================================== + * 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.hpsf; import org.apache.poi.util.Internal; diff --git a/src/java/org/apache/poi/ss/util/DataMarker.java b/src/java/org/apache/poi/ss/util/DataMarker.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java index 7134246bb..669fa3661 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java @@ -510,6 +510,22 @@ public class XSLFTextParagraph implements Iterable{ return fetcher.getValue() == null ? false : fetcher.getValue(); } + /** + * + * @param isBullet whether text in this paragraph has bullets + */ + public void setBullet(boolean flag) { + if(isBullet() == flag) return; + + CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); + if(!flag) { + pr.addNewBuNone(); + } else { + pr.addNewBuFont().setTypeface("Arial"); + pr.addNewBuChar().setChar("\u2022"); + } + } + @Override public String toString(){ return "[" + getClass() + "]" + getText(); diff --git a/src/ooxml/testcases/org/apache/poi/xslf/geom/TestFormulaParser.java b/src/ooxml/testcases/org/apache/poi/xslf/geom/TestFormulaParser.java index df3e2ec29..1168003c9 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/geom/TestFormulaParser.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/geom/TestFormulaParser.java @@ -1,3 +1,21 @@ +/* + * ==================================================================== + * 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.xslf.geom; import junit.framework.TestCase; diff --git a/src/ooxml/testcases/org/apache/poi/xslf/geom/TestPresetGeometries.java b/src/ooxml/testcases/org/apache/poi/xslf/geom/TestPresetGeometries.java index c71a065bb..eefdd91b4 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/geom/TestPresetGeometries.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/geom/TestPresetGeometries.java @@ -1,3 +1,21 @@ +/* + * ==================================================================== + * 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.xslf.geom; import junit.framework.TestCase; diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/LFOData.java b/src/scratchpad/src/org/apache/poi/hwpf/model/LFOData.java index 3c6cdb0b1..9910dcaef 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/LFOData.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/LFOData.java @@ -1,3 +1,21 @@ +/* + * ==================================================================== + * 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.hwpf.model; import java.io.IOException; diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/PICFAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/PICFAbstractType.java index ed0174318..2df2e0474 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/PICFAbstractType.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/PICFAbstractType.java @@ -1,4 +1,21 @@ - +/* + * ==================================================================== + * 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.hwpf.model.types; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java index ebd3a9583..77c6e86c8 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java @@ -1,3 +1,21 @@ +/* + * ==================================================================== + * 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.hwpf.sprm; import org.apache.poi.hwpf.usermodel.TableProperties;