From 24ba833f03681e495d239a9675394281575544d2 Mon Sep 17 00:00:00 2001
From: Nick Burch
Date: Wed, 23 Apr 2008 16:49:18 +0000
Subject: [PATCH] Merged revisions
638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645347,645349-645351,645353-645559,645561-645565,645568-645951,645953-646193,646195-646311,646313-646404,646406-646665,646667-646853,646855-646869,646871-647151,647153-647185,647187-647277,647279-647566,647568-647573,647575,647578-647711,647714-647737,647739-647823,647825-648155,648157-648202,648204-648273,648275,648277-648302,648304-648333,648335-650914,650916-650920
via svnmerge from https://svn.apache.org:443/repos/asf/poi/trunk
........
r648589 | yegor | 2008-04-16 08:47:16 +0100 (Wed, 16 Apr 2008) | 1 line
bug #41071 is fixed in trunk. Added a unit test and resolved.
........
r648623 | yegor | 2008-04-16 09:43:08 +0100 (Wed, 16 Apr 2008) | 1 line
Rich text in HSSFTextbox must have at least one format run. Make sure it is so and apply th default fopnt if no formats were applied.
........
r648624 | yegor | 2008-04-16 09:44:07 +0100 (Wed, 16 Apr 2008) | 1 line
Misc improvements in Freeform shape
........
r648674 | yegor | 2008-04-16 12:57:15 +0100 (Wed, 16 Apr 2008) | 1 line
Support for getting OLE object data from slide show
........
r649142 | yegor | 2008-04-17 16:06:01 +0100 (Thu, 17 Apr 2008) | 1 line
added a unit test and closed bug #28774
........
r649143 | yegor | 2008-04-17 16:08:03 +0100 (Thu, 17 Apr 2008) | 1 line
initial support for rendering powerpoint slides into images
........
r649145 | yegor | 2008-04-17 16:09:37 +0100 (Thu, 17 Apr 2008) | 1 line
updated the list of changes
........
r649557 | yegor | 2008-04-18 15:57:07 +0100 (Fri, 18 Apr 2008) | 1 line
improved rendering of text
........
r649796 | yegor | 2008-04-19 12:09:59 +0100 (Sat, 19 Apr 2008) | 1 line
Support for getting embedded sounds from slide show
........
r649797 | yegor | 2008-04-19 12:16:53 +0100 (Sat, 19 Apr 2008) | 1 line
properly set shapeId for new shapes
........
r649798 | yegor | 2008-04-19 12:17:37 +0100 (Sat, 19 Apr 2008) | 1 line
misc improvements in slide rendering
........
r649800 | yegor | 2008-04-19 12:52:36 +0100 (Sat, 19 Apr 2008) | 1 line
updated the docs
........
r649911 | yegor | 2008-04-20 12:17:48 +0100 (Sun, 20 Apr 2008) | 1 line
more improvements in slide rendering
........
r649914 | yegor | 2008-04-20 12:58:08 +0100 (Sun, 20 Apr 2008) | 1 line
set version.id=3.0.3-beta1
........
r650129 | yegor | 2008-04-21 13:51:47 +0100 (Mon, 21 Apr 2008) | 1 line
more improvements in slide rendering
........
r650130 | yegor | 2008-04-21 13:52:23 +0100 (Mon, 21 Apr 2008) | 1 line
a couple of HSLF examples
........
r650133 | yegor | 2008-04-21 14:10:33 +0100 (Mon, 21 Apr 2008) | 1 line
update current version to 3.1-beta1
........
r650138 | yegor | 2008-04-21 14:29:59 +0100 (Mon, 21 Apr 2008) | 1 line
unfinished release guide. It would be nice to have a html version.
........
r650139 | yegor | 2008-04-21 14:31:53 +0100 (Mon, 21 Apr 2008) | 1 line
unfinished release guide. It would be nice to have a html version.
........
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@650938 13f79535-47bb-0310-9956-ffa450edef68
---
src/documentation/content/xdocs/changes.xml | 8 +-
src/documentation/content/xdocs/index.xml | 3 +-
.../content/xdocs/poifs/embeded.xml | 6 +-
.../content/xdocs/slideshow/how-to-shapes.xml | 195 ++++++++-
.../content/xdocs/slideshow/index.xml | 8 +-
src/documentation/content/xdocs/status.xml | 8 +-
src/documentation/release-guide.txt | 135 +++++++
.../poi/hssf/usermodel/HSSFTextbox.java | 7 +-
.../poi/hslf/examples/DataExtraction.java | 148 +++++++
.../poi/hslf/examples/Graphics2DDemo.java | 80 ++++
.../org/apache/poi/hslf/examples/PPT2PNG.java | 108 +++++
.../org/apache/poi/hslf/HSLFSlideShow.java | 20 +-
.../org/apache/poi/hslf/model/AutoShape.java | 16 +
.../org/apache/poi/hslf/model/AutoShapes.java | 373 ++++++++++++++++++
.../org/apache/poi/hslf/model/Background.java | 43 +-
.../src/org/apache/poi/hslf/model/Fill.java | 8 +-
.../org/apache/poi/hslf/model/Freeform.java | 113 +++++-
.../src/org/apache/poi/hslf/model/Line.java | 7 +
.../apache/poi/hslf/model/MasterSheet.java | 30 ++
.../org/apache/poi/hslf/model/OLEShape.java | 160 ++++++++
.../apache/poi/hslf/model/PPGraphics2D.java | 1 -
.../org/apache/poi/hslf/model/Picture.java | 61 ++-
.../src/org/apache/poi/hslf/model/Shape.java | 132 ++++++-
.../apache/poi/hslf/model/ShapeFactory.java | 13 +-
.../org/apache/poi/hslf/model/ShapeGroup.java | 93 ++++-
.../apache/poi/hslf/model/ShapeOutline.java | 27 ++
.../apache/poi/hslf/model/ShapePainter.java | 102 +++++
.../src/org/apache/poi/hslf/model/Sheet.java | 12 +-
.../apache/poi/hslf/model/SimpleShape.java | 85 ++++
.../src/org/apache/poi/hslf/model/Slide.java | 84 +++-
.../apache/poi/hslf/model/SlideMaster.java | 72 +++-
.../src/org/apache/poi/hslf/model/Table.java | 3 +-
.../org/apache/poi/hslf/model/TableCell.java | 2 -
.../org/apache/poi/hslf/model/TextBox.java | 9 -
.../apache/poi/hslf/model/TextPainter.java | 253 ++++++++++++
.../org/apache/poi/hslf/model/TextRun.java | 20 +
.../org/apache/poi/hslf/model/TextShape.java | 10 +
.../apache/poi/hslf/record/ExOleObjStg.java | 20 +-
.../poi/hslf/record/PPDrawingGroup.java | 15 +
.../apache/poi/hslf/record/PersistRecord.java | 37 ++
.../apache/poi/hslf/record/RecordTypes.java | 5 +-
.../src/org/apache/poi/hslf/record/Sound.java | 136 +++++++
.../poi/hslf/record/SoundCollection.java | 73 ++++
.../org/apache/poi/hslf/record/SoundData.java | 103 +++++
.../poi/hslf/record/StyleTextPropAtom.java | 2 +-
.../apache/poi/hslf/usermodel/ObjectData.java | 9 +
.../poi/hslf/usermodel/RichTextRun.java | 280 ++++++++++++-
.../apache/poi/hslf/usermodel/SlideShow.java | 16 +-
.../apache/poi/hslf/usermodel/SoundData.java | 93 +++++
.../org/apache/poi/hslf/data/41071.ppt | Bin 0 -> 18432 bytes
.../org/apache/poi/hslf/data/ringin.wav | Bin 0 -> 10026 bytes
.../org/apache/poi/hslf/data/sound.ppt | Bin 0 -> 43520 bytes
.../apache/poi/hslf/model/TestFreeform.java | 80 ++++
.../poi/hslf/model/TestOleEmbedding.java | 46 +++
.../org/apache/poi/hslf/model/TestShapes.java | 18 +
.../org/apache/poi/hslf/record/TestSound.java | 86 ++++
.../apache/poi/hslf/usermodel/TestBugs.java | 20 +
.../poi/hslf/usermodel/TestPictures.java | 29 ++
.../poi/hslf/usermodel/TestSlideOrdering.java | 2 +-
.../poi/hslf/usermodel/TestSoundData.java | 63 +++
.../org/apache/poi/hssf/data/28774.xls | Bin 0 -> 27136 bytes
.../apache/poi/hssf/usermodel/TestBugs.java | 11 +
.../poi/hssf/usermodel/TestHSSFTextbox.java | 19 +
63 files changed, 3483 insertions(+), 135 deletions(-)
create mode 100755 src/documentation/release-guide.txt
create mode 100755 src/scratchpad/examples/src/org/apache/poi/hslf/examples/DataExtraction.java
create mode 100755 src/scratchpad/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java
create mode 100755 src/scratchpad/examples/src/org/apache/poi/hslf/examples/PPT2PNG.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/model/AutoShapes.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/model/ShapeOutline.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/model/ShapePainter.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/model/TextPainter.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/record/PersistRecord.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/record/Sound.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/record/SoundCollection.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/record/SoundData.java
create mode 100755 src/scratchpad/src/org/apache/poi/hslf/usermodel/SoundData.java
create mode 100755 src/scratchpad/testcases/org/apache/poi/hslf/data/41071.ppt
create mode 100755 src/scratchpad/testcases/org/apache/poi/hslf/data/ringin.wav
create mode 100755 src/scratchpad/testcases/org/apache/poi/hslf/data/sound.ppt
create mode 100755 src/scratchpad/testcases/org/apache/poi/hslf/model/TestFreeform.java
create mode 100755 src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java
create mode 100755 src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java
create mode 100755 src/testcases/org/apache/poi/hssf/data/28774.xls
diff --git a/src/documentation/content/xdocs/changes.xml b/src/documentation/content/xdocs/changes.xml
index 0fb5cac07c..d0d73c8d8a 100644
--- a/src/documentation/content/xdocs/changes.xml
+++ b/src/documentation/content/xdocs/changes.xml
@@ -43,7 +43,13 @@
Created a common interface for handling PowerPoint files, irrespective of if they are .ppt or .pptxCreated a common interface for handling Excel files, irrespective of if they are .xls or .xlsx
-
+
+ HSLF: Support for getting embedded sounds from slide show
+ HSLF: Initial support for rendering slides into images
+ HSLF: Support for getting OLE object data from slide show
+ HSLF: Implemented more methods in PPGraphics2D
+ HSLF: Added Freeform shape which can contain both lines and Bezier curves
+ 41071 - Improved text extraction in HSLF30311 - Conditional Formatting - improved API, added HSSFSheetConditionalFormattingUpdate the formula parser code to use a HSSFWorkbook, rather than the low level model.Workbook, to make things cleaner and make supporting XSSF formulas in future much easierFix the logger used by POIFSFileSystem, so that commons-logging isn't required when not used
diff --git a/src/documentation/content/xdocs/index.xml b/src/documentation/content/xdocs/index.xml
index 5d5067c8a9..e6f136652b 100644
--- a/src/documentation/content/xdocs/index.xml
+++ b/src/documentation/content/xdocs/index.xml
@@ -136,8 +136,7 @@
HSLF for PowerPoint Documents
HSLF is our port of the Microsoft PowerPoint 97(-2003) file format to pure
- Java. It supports read and write capabilities of some, but not yet all
- of the core records. Please see the HSLF project page for more
information.
diff --git a/src/documentation/content/xdocs/poifs/embeded.xml b/src/documentation/content/xdocs/poifs/embeded.xml
index d888e2ed53..a4620f5a94 100644
--- a/src/documentation/content/xdocs/poifs/embeded.xml
+++ b/src/documentation/content/xdocs/poifs/embeded.xml
@@ -61,9 +61,9 @@
Files embeded in PowerPoint
PowerPoint does not normally store embeded files
in the OLE2 layer. Instead, they are held within records
- of the main PowerPoint file. To get at them, you need to
- find the appropriate data within the PowerPoint stream,
- and work from that.
+ of the main PowerPoint file.
+ See the HSLF Tutorial
+ for how to retrieve embedded OLE objects from a presentation
Features
@@ -80,14 +86,8 @@
How to get shapes contained in a particular slide
-
The superclass of all shapes in HSLF is the Shape class - the elemental object that composes a drawing.
- The following pictute shows the class tree of HSLF shapes:
-
-
-
-
- The following fragment demonstrates how to iterate over shapes for each slide.
+ The following code demonstrates how to iterate over shapes for each slide.
-
+
+ How to remove shapes from a slide
+
+
+
+ How to retrieve embedded OLE objects
+
+
+
+
+ How to retrieve embedded sounds
+
+
+
+
+ How to create shapes of arbitrary geometry
+
+
+
+
+ How to draw into a slide using Graphics2D
+
+ Current implementation of the PowerPoint Graphics2D driver is not fully compliant with the java.awt.Graphics2D specification.
+ Some features like clipping, drawing of images are not yet supported.
+
+
+
+
+
+ Export PowerPoint slides into java.awt.Graphics2D
+
+ HSLF provides a way to export slides into images. You can capture slides into java.awt.Graphics2D object (or any other)
+ and serialize it into a PNG or JPEG format. Please note, although HSLF attempts to render slides as close to PowerPoint as possible,
+ the output may look differently from PowerPoint due to the following reasons:
+
+
+
Java2D renders fonts differently vs PowerPoint. There are always some differences in the way the font glyphs are painted
+
HSLF uses java.awt.font.LineBreakMeasurer to break text into lines. PowerPoint may do it in a different way.
+
If a font from the presentation is not avaiable, then the JDK default font will be used.
+
+
+ Current Limitations:
+
+
+
Some types of shapes are not yet supported (WordArt, complex auto-shapes)
+
Only Bitmap images (PNG, JPEG, DIB) can be rendered in Java