]> source.dussan.org Git - poi.git/commitdiff
updated the docs
authorYegor Kozlov <yegor@apache.org>
Sat, 19 Apr 2008 11:52:36 +0000 (11:52 +0000)
committerYegor Kozlov <yegor@apache.org>
Sat, 19 Apr 2008 11:52:36 +0000 (11:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@649800 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/hslf/how-to-shapes.xml
src/documentation/content/xdocs/hslf/index.xml
src/documentation/content/xdocs/index.xml
src/documentation/content/xdocs/poifs/embeded.xml
src/documentation/content/xdocs/status.xml

index 2f0c3606a29b0d8416ef8d6845a2360e7273102c..02f502284035e42def4406dda6b73b6e3734b52c 100644 (file)
@@ -37,6 +37,7 @@
 
                <!-- Don't forget to update status.xml too! -->
         <release version="3.0.3-beta1" date="2008-04-??">
+           <action dev="POI-DEVELOPERS" type="add">HSLF: Support for getting embedded sounds from slide show </action>
            <action dev="POI-DEVELOPERS" type="add">HSLF: Initial support for rendering slides into images</action>
            <action dev="POI-DEVELOPERS" type="add">HSLF: Support for getting OLE object data from slide show </action>
            <action dev="POI-DEVELOPERS" type="add">HSLF: Implemented more methods in PPGraphics2D</action>
index 6460f2b1db4a8221b5c68f2ca9c975e01fff6ca9..7959eedaf60539eeb30a5f00df5d1b18ff3cd8fe 100644 (file)
@@ -42,6 +42,7 @@
                     <li><link href="#Tables">Tables</link></li>
                     <li><link href="#RemoveShape">How to remove shapes</link></li>
                     <li><link href="#OLE">How to retrieve embedded OLE objects</link></li>
+                    <li><link href="#Sound">How to retrieve embedded sounds</link></li>
                     <li><link href="#Freeform">How to create shapes of arbitrary geometry</link></li>
                     <li><link href="#Graphics2D">Shapes and Graphics2D</link></li>
                     <li><link href="#Render">How to convert slides into images</link></li>
                     </source>
                   </section>
 
+                <anchor id="Sound"/>
+                <section><title>How to retrieve embedded sounds</title>
+                  <source>
+
+        FileInputStream is = new FileInputStream(args[0]);
+        SlideShow ppt = new SlideShow(is);
+        is.close();
+
+        SoundData[] sound = ppt.getSoundData();
+        for (int i = 0; i &lt; 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();
+            }
+        }
+                    </source>
+                  </section>
+                  
                 <anchor id="Freeform"/>
                 <section><title>How to create shapes of arbitrary geometry</title>
                   <source>
                   <p>
                     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: 
                   </p>
             <ul>
               <li>Java2D renders fonts differently vs PowerPoint. There are always some differences in the way the font glyphs are painted</li>   
index 438aab3f13cc505b44f3eb8f3e3143545468fb07..a4718a6d67e3879b600a76425351cd260696cadd 100755 (executable)
@@ -26,6 +26,7 @@
         <authors>
             <person name="Avik Sengupta" email="avik at apache dot org"/>
             <person name="Nick Burch" email="nick at apache dot org"/>
+            <person name="Yegor Kozlov" email="yegor at apache dot org"/>
         </authors>
     </header>
 
                        Powerpoint '97(-2007) file format. It <em>does not</em> support
                        the new PowerPoint 2007 .pptx file format, which is not OLE2 
                        based.</p>
-            <p>HSLF provides a way to read powerpoint presentations, and extract text from it.
-            It also provides some (currently limited) edit capabilities.
+    <p>HSLF provides a way to read, create or modify PowerPoint  presentations. In particular, it provides:
             </p>
+            <ul>
+                <li>api for data extraction (text, pictures, embedded objects, sounds)</li>
+                <li>usermodel api for creating, reading and modifying ppt files</li>
+            </ul>
             <note> 
                 This code currently lives the 
                 <link href="http://svn.apache.org/viewcvs.cgi/poi/trunk/src/scratchpad/">scratchpad area</link> 
index aa380620ecc1419e1fc77c8e68a23db76f2d082b..92eaaea0d13f0d9cebda42841a0a6153d3c60c75 100644 (file)
         </section>
         <section><title>HSLF for PowerPoint Documents</title>
        <p>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 <link
+         Java. It supports read and write capabilities. Please see <link
            href="./hslf/index.html">the HSLF project page for more
            information</link>.</p>
         </section>
index d888e2ed534c00574ddf0523f290a6d1b50728d8..a4620f5a94dea4f8e2be6580652a143d87379e68 100644 (file)
@@ -61,9 +61,9 @@
        <section><title>Files embeded in PowerPoint</title>
          <p>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.</p>
+         of the main PowerPoint file. 
+         <br/>See the <link href="./../hslf/how-to-shapes.html#OLE">HSLF Tutorial</link> 
+         for how to retrieve embedded OLE objects from a presentation</p>
        </section>
     </section>
 
index 50d4e448418f803fc46de0a433f0ebd10b9b9a8e..7992c62d1535f9d29307855a4ee0766c010797d3 100644 (file)
@@ -34,6 +34,7 @@
        <!-- Don't forget to update changes.xml too! -->
     <changes>
         <release version="3.0.3-beta1" date="2008-04-??">
+           <action dev="POI-DEVELOPERS" type="add">HSLF: Support for getting embedded sounds from slide show </action>
            <action dev="POI-DEVELOPERS" type="add">HSLF: Initial support for rendering slides into images</action>
            <action dev="POI-DEVELOPERS" type="add">HSLF: Support for getting OLE object data from slide show </action>
            <action dev="POI-DEVELOPERS" type="add">HSLF: Implemented more methods in PPGraphics2D</action>