From 33b901c1c9cc5027525c02f9b0013caaa5ed851a Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Sat, 19 Apr 2008 11:52:36 +0000 Subject: [PATCH] updated the docs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@649800 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/changes.xml | 1 + .../content/xdocs/hslf/how-to-shapes.xml | 23 ++++++++++++++++++- .../content/xdocs/hslf/index.xml | 8 +++++-- src/documentation/content/xdocs/index.xml | 3 +-- .../content/xdocs/poifs/embeded.xml | 6 ++--- src/documentation/content/xdocs/status.xml | 1 + 6 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/documentation/content/xdocs/changes.xml b/src/documentation/content/xdocs/changes.xml index 2f0c3606a2..02f5022840 100644 --- a/src/documentation/content/xdocs/changes.xml +++ b/src/documentation/content/xdocs/changes.xml @@ -37,6 +37,7 @@ + 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 diff --git a/src/documentation/content/xdocs/hslf/how-to-shapes.xml b/src/documentation/content/xdocs/hslf/how-to-shapes.xml index 6460f2b1db..7959eedaf6 100644 --- a/src/documentation/content/xdocs/hslf/how-to-shapes.xml +++ b/src/documentation/content/xdocs/hslf/how-to-shapes.xml @@ -42,6 +42,7 @@
  • Tables
  • How to remove shapes
  • How to retrieve embedded OLE objects
  • +
  • How to retrieve embedded sounds
  • How to create shapes of arbitrary geometry
  • Shapes and Graphics2D
  • How to convert slides into images
  • @@ -474,6 +475,26 @@ + +
    How to retrieve embedded sounds + + + FileInputStream is = new FileInputStream(args[0]); + SlideShow ppt = new SlideShow(is); + is.close(); + + SoundData[] sound = ppt.getSoundData(); + for (int i = 0; i < sound.length; i++) { + //save *WAV sounds on disk + if(sound[i].getSoundType().equals(".WAV")){ + FileOutputStream out = new FileOutputStream(sound[i].getSoundName()); + out.write(sound[i].getData()); + out.close(); + } + } + +
    +
    How to create shapes of arbitrary geometry @@ -556,7 +577,7 @@

    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 might look differently from PowerPoint due to the following reasons: + 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
    • diff --git a/src/documentation/content/xdocs/hslf/index.xml b/src/documentation/content/xdocs/hslf/index.xml index 438aab3f13..a4718a6d67 100755 --- a/src/documentation/content/xdocs/hslf/index.xml +++ b/src/documentation/content/xdocs/hslf/index.xml @@ -26,6 +26,7 @@ + @@ -37,9 +38,12 @@ Powerpoint '97(-2007) file format. It does not support the new PowerPoint 2007 .pptx file format, which is not OLE2 based.

      -

      HSLF provides a way to read powerpoint presentations, and extract text from it. - It also provides some (currently limited) edit capabilities. +

      HSLF provides a way to read, create or modify PowerPoint presentations. In particular, it provides:

      +
        +
      • api for data extraction (text, pictures, embedded objects, sounds)
      • +
      • usermodel api for creating, reading and modifying ppt files
      • +
      This code currently lives the scratchpad area diff --git a/src/documentation/content/xdocs/index.xml b/src/documentation/content/xdocs/index.xml index aa380620ec..92eaaea0d1 100644 --- a/src/documentation/content/xdocs/index.xml +++ b/src/documentation/content/xdocs/index.xml @@ -150,8 +150,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

    diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 50d4e44841..7992c62d15 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 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 -- 2.39.5