poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1694374 [8/8] - in /poi/site/publish: ./ apidocs/ apidocs/org/apache/poi/class-use/ apidocs/org/apache/poi/hslf/blip/ apidocs/org/apache/poi/hslf/model/ apidocs/org/apache/poi/hslf/usermodel/ apidocs/org/apache/poi/hslf/usermodel/class-use...
Date Wed, 05 Aug 2015 23:27:08 GMT
Modified: poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/XSSFColor.html
URL: http://svn.apache.org/viewvc/poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/XSSFColor.html?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/XSSFColor.html (original)
+++ poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/XSSFColor.html Wed Aug  5 23:27:06
2015
@@ -235,66 +235,72 @@ extends <a href="../../../../../org/apac
 </tr>
 <tr class="rowColor">
 <td class="colFirst"><code>boolean</code></td>
+<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#hasTint()">hasTint</a></strong>()</code>
+<div class="block">A boolean value indicating if the ctColor has a tint or not</div>
+</td>
+</tr>
+<tr class="altColor">
+<td class="colFirst"><code>boolean</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#isAuto()">isAuto</a></strong>()</code>
 <div class="block">A boolean value indicating the ctColor is automatic and system ctColor
dependent.</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>boolean</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#isIndexed()">isIndexed</a></strong>()</code>
 <div class="block">A boolean value indicating the ctColor is Indexed</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>boolean</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#isRGB()">isRGB</a></strong>()</code>
 <div class="block">A boolean value indicating the ctColor is RGB or ARGB based</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>boolean</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#isThemed()">isThemed</a></strong>()</code>
 <div class="block">A boolean value indicating the ctColor is Theme based</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#setAuto(boolean)">setAuto</a></strong>(boolean&nbsp;auto)</code>
 <div class="block">A boolean value indicating the ctColor is automatic and system ctColor
dependent.</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#setIndexed(int)">setIndexed</a></strong>(int&nbsp;indexed)</code>
 <div class="block">Indexed ctColor value.</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#setRgb(byte[])">setRgb</a></strong>(byte[]&nbsp;rgb)</code>
 <div class="block">Standard Alpha Red Green Blue ctColor value (ARGB).</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#setRGB(byte[])">setRGB</a></strong>(byte[]&nbsp;rgb)</code>
 <div class="block">Standard Alpha Red Green Blue ctColor value (ARGB).</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#setTheme(int)">setTheme</a></strong>(int&nbsp;theme)</code>
 <div class="block">Index into the <clrScheme> collection, referencing a particular
<sysClr> or
   <srgbClr> value expressed in the Theme part.</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#setTint(double)">setTint</a></strong>(double&nbsp;tint)</code>
 <div class="block">Specifies the tint value applied to the ctColor.</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>static <a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html"
title="class in org.apache.poi.xssf.usermodel">XSSFColor</a></code></td>
 <td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html#toXSSFColor(org.apache.poi.ss.usermodel.Color)">toXSSFColor</a></strong>(<a
href="../../../../../org/apache/poi/ss/usermodel/Color.html" title="interface in org.apache.poi.ss.usermodel">Color</a>&nbsp;color)</code>&nbsp;</td>
 </tr>
@@ -439,6 +445,16 @@ extends <a href="../../../../../org/apac
 </dl>
 </li>
 </ul>
+<a name="hasTint()">
+<!--   -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>hasTint</h4>
+<pre>public&nbsp;boolean&nbsp;hasTint()</pre>
+<div class="block">A boolean value indicating if the ctColor has a tint or not</div>
+</li>
+</ul>
 <a name="getIndex()">
 <!--   -->
 </a>

Modified: poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/class-use/XSSFColor.html
URL: http://svn.apache.org/viewvc/poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/class-use/XSSFColor.html?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/class-use/XSSFColor.html (original)
+++ poi/site/publish/apidocs/org/apache/poi/xssf/usermodel/class-use/XSSFColor.html Wed Aug
 5 23:27:06 2015
@@ -104,7 +104,7 @@
 <tr class="altColor">
 <td class="colFirst"><code><a href="../../../../../../org/apache/poi/xssf/usermodel/XSSFColor.html"
title="class in org.apache.poi.xssf.usermodel">XSSFColor</a></code></td>
 <td class="colLast"><span class="strong">ThemesTable.</span><code><strong><a
href="../../../../../../org/apache/poi/xssf/model/ThemesTable.html#getThemeColor(int)">getThemeColor</a></strong>(int&nbsp;idx)</code>
-<div class="block">Convert a theme "index" into a color.</div>
+<div class="block">Convert a theme "index" (as used by fonts etc) into a color.</div>
 </td>
 </tr>
 </tbody>

Modified: poi/site/publish/apidocs/org/apache/poi/xssf/util/NumericRanges.html
URL: http://svn.apache.org/viewvc/poi/site/publish/apidocs/org/apache/poi/xssf/util/NumericRanges.html?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/apidocs/org/apache/poi/xssf/util/NumericRanges.html (original)
+++ poi/site/publish/apidocs/org/apache/poi/xssf/util/NumericRanges.html Wed Aug  5 23:27:06
2015
@@ -204,7 +204,8 @@ extends java.lang.Object</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>NO_OVERLAPS</h4>
-<pre>public static&nbsp;int NO_OVERLAPS</pre>
+<pre>public static final&nbsp;int NO_OVERLAPS</pre>
+<dl><dt><span class="strong">See Also:</span></dt><dd><a
href="../../../../../constant-values.html#org.apache.poi.xssf.util.NumericRanges.NO_OVERLAPS">Constant
Field Values</a></dd></dl>
 </li>
 </ul>
 <a name="OVERLAPS_1_MINOR">
@@ -213,7 +214,8 @@ extends java.lang.Object</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>OVERLAPS_1_MINOR</h4>
-<pre>public static&nbsp;int OVERLAPS_1_MINOR</pre>
+<pre>public static final&nbsp;int OVERLAPS_1_MINOR</pre>
+<dl><dt><span class="strong">See Also:</span></dt><dd><a
href="../../../../../constant-values.html#org.apache.poi.xssf.util.NumericRanges.OVERLAPS_1_MINOR">Constant
Field Values</a></dd></dl>
 </li>
 </ul>
 <a name="OVERLAPS_2_MINOR">
@@ -222,7 +224,8 @@ extends java.lang.Object</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>OVERLAPS_2_MINOR</h4>
-<pre>public static&nbsp;int OVERLAPS_2_MINOR</pre>
+<pre>public static final&nbsp;int OVERLAPS_2_MINOR</pre>
+<dl><dt><span class="strong">See Also:</span></dt><dd><a
href="../../../../../constant-values.html#org.apache.poi.xssf.util.NumericRanges.OVERLAPS_2_MINOR">Constant
Field Values</a></dd></dl>
 </li>
 </ul>
 <a name="OVERLAPS_1_WRAPS">
@@ -231,7 +234,8 @@ extends java.lang.Object</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>OVERLAPS_1_WRAPS</h4>
-<pre>public static&nbsp;int OVERLAPS_1_WRAPS</pre>
+<pre>public static final&nbsp;int OVERLAPS_1_WRAPS</pre>
+<dl><dt><span class="strong">See Also:</span></dt><dd><a
href="../../../../../constant-values.html#org.apache.poi.xssf.util.NumericRanges.OVERLAPS_1_WRAPS">Constant
Field Values</a></dd></dl>
 </li>
 </ul>
 <a name="OVERLAPS_2_WRAPS">
@@ -240,7 +244,8 @@ extends java.lang.Object</pre>
 <ul class="blockListLast">
 <li class="blockList">
 <h4>OVERLAPS_2_WRAPS</h4>
-<pre>public static&nbsp;int OVERLAPS_2_WRAPS</pre>
+<pre>public static final&nbsp;int OVERLAPS_2_WRAPS</pre>
+<dl><dt><span class="strong">See Also:</span></dt><dd><a
href="../../../../../constant-values.html#org.apache.poi.xssf.util.NumericRanges.OVERLAPS_2_WRAPS">Constant
Field Values</a></dd></dl>
 </li>
 </ul>
 </li>

Modified: poi/site/publish/apidocs/overview-tree.html
URL: http://svn.apache.org/viewvc/poi/site/publish/apidocs/overview-tree.html?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/apidocs/overview-tree.html (original)
+++ poi/site/publish/apidocs/overview-tree.html Wed Aug  5 23:27:06 2015
@@ -3269,6 +3269,7 @@
 <li type="circle">org.apache.poi.sl.usermodel.<a href="org/apache/poi/sl/usermodel/TextRun.TextCap.html"
title="enum in org.apache.poi.sl.usermodel"><span class="strong">TextRun.TextCap</span></a></li>
 <li type="circle">org.apache.poi.sl.usermodel.<a href="org/apache/poi/sl/usermodel/TextShape.TextDirection.html"
title="enum in org.apache.poi.sl.usermodel"><span class="strong">TextShape.TextDirection</span></a></li>
 <li type="circle">org.apache.poi.sl.usermodel.<a href="org/apache/poi/sl/usermodel/TextShape.TextAutofit.html"
title="enum in org.apache.poi.sl.usermodel"><span class="strong">TextShape.TextAutofit</span></a></li>
+<li type="circle">org.apache.poi.sl.usermodel.<a href="org/apache/poi/sl/usermodel/PictureData.PictureType.html"
title="enum in org.apache.poi.sl.usermodel"><span class="strong">PictureData.PictureType</span></a></li>
 <li type="circle">org.apache.poi.sl.usermodel.<a href="org/apache/poi/sl/usermodel/StrokeStyle.LineCap.html"
title="enum in org.apache.poi.sl.usermodel"><span class="strong">StrokeStyle.LineCap</span></a></li>
 <li type="circle">org.apache.poi.sl.usermodel.<a href="org/apache/poi/sl/usermodel/StrokeStyle.LineDash.html"
title="enum in org.apache.poi.sl.usermodel"><span class="strong">StrokeStyle.LineDash</span></a></li>
 <li type="circle">org.apache.poi.sl.usermodel.<a href="org/apache/poi/sl/usermodel/StrokeStyle.LineCompound.html"
title="enum in org.apache.poi.sl.usermodel"><span class="strong">StrokeStyle.LineCompound</span></a></li>
@@ -3323,6 +3324,7 @@
 <li type="circle">org.apache.poi.openxml4j.opc.<a href="org/apache/poi/openxml4j/opc/EncryptionOption.html"
title="enum in org.apache.poi.openxml4j.opc"><span class="strong">EncryptionOption</span></a></li>
 <li type="circle">org.apache.poi.xslf.usermodel.<a href="org/apache/poi/xslf/usermodel/SlideLayout.html"
title="enum in org.apache.poi.xslf.usermodel"><span class="strong">SlideLayout</span></a></li>
 <li type="circle">org.apache.poi.xslf.usermodel.<a href="org/apache/poi/xslf/usermodel/Placeholder.html"
title="enum in org.apache.poi.xslf.usermodel"><span class="strong">Placeholder</span></a></li>
+<li type="circle">org.apache.poi.xssf.model.<a href="org/apache/poi/xssf/model/ThemesTable.ThemeElement.html"
title="enum in org.apache.poi.xssf.model"><span class="strong">ThemesTable.ThemeElement</span></a></li>
 <li type="circle">org.apache.poi.xssf.usermodel.<a href="org/apache/poi/xssf/usermodel/TextDirection.html"
title="enum in org.apache.poi.xssf.usermodel"><span class="strong">TextDirection</span></a></li>
 <li type="circle">org.apache.poi.xssf.usermodel.<a href="org/apache/poi/xssf/usermodel/TextAlign.html"
title="enum in org.apache.poi.xssf.usermodel"><span class="strong">TextAlign</span></a></li>
 <li type="circle">org.apache.poi.xssf.usermodel.<a href="org/apache/poi/xssf/usermodel/TextFontAlign.html"
title="enum in org.apache.poi.xssf.usermodel"><span class="strong">TextFontAlign</span></a></li>

Modified: poi/site/publish/changes.html
URL: http://svn.apache.org/viewvc/poi/site/publish/changes.html?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/changes.html (original)
+++ poi/site/publish/changes.html Wed Aug  5 23:27:06 2015
@@ -261,6 +261,18 @@ if (VERSION > 3) {
 <ul>
         
 <li>
+<img class="icon" alt="fix" src="images/fix.jpg"> <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=57786">57786</a>
- XSLFFreeformShape ignores quadratic bezier curves</li>
+        
+<li>
+<img class="icon" alt="fix" src="images/fix.jpg"> <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=58206">58206</a>
- provide a mechanism to find slide layouts by name</li>
+        
+<li>
+<img class="icon" alt="fix" src="images/fix.jpg"> <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=58204">58204</a>
- STYLE: ShapeContainer interface makes internal getShapesList() redundant</li>
+        
+<li>
+<img class="icon" alt="add" src="images/add.jpg"> <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=58190">58190</a>
- The current picture handling uses raw integers for types and index, replace with enum and
reference</li>
+        
+<li>
 <img class="icon" alt="fix" src="images/fix.jpg"> <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=58203">58203</a>
- Apparently Maven uses plurals for all artifacts except javadocs, so tweak our naming to
make it happy</li>
         
 <li>

Modified: poi/site/publish/changes.rss
URL: http://svn.apache.org/viewvc/poi/site/publish/changes.rss?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/changes.rss (original)
+++ poi/site/publish/changes.rss Wed Aug  5 23:27:06 2015
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
-<rss version="0.91"><channel><title>POI Changes</title><link>http://poi.apache.org/changes.html</link><description>POI
Changes</description><language>en-us</language><item><title>
fix(bug 58203)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58203) - Apparently Maven uses plurals for all artifacts except
javadocs, so tweak our naming to make it happy</description></item><item><title>
add(bug 58193)</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers (bug 58193) - Use input stream rather than byte array for checksum etc.</description></item><item><title>
add(bug 58200)</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers (bug 58200) - SXSSF support for evaluating formula cells, provided the
cell and all its references are within the current window</description></item><item><title>
fix(bug 58098)</title><link>http://poi.apache.org/changes.html</link><description>

 fix by POI Developers (bug 58098) - Avoid NPE in cleanup if NPOIFSFileSystem is opened on
a locked File under Windows</description></item><item><title> add</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers - Merged common_sl branch to trunk</description></item><item><title>
fix(bug 57571)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 57571) - Fix creating comments for XSSF/SXSSF, regression was introduced
via bug 54920</description></item><item><title> fix(bug 58175)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58175) - Fix creating comments for XSSF/SXSSF, regression was introduced
via bug 54920</description></item><item><title> fix(bug 58156)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58156) - Possible data corruption in hasPOIFSHeader and hasOOXMLHeader</description></item><item><title>
add(b
 ug 58130)</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers (bug 58130) - Conditional Formatting support for DataBars, Icon Sets
/ Multi-States, and Color Scales</description></item></channel></rss>
\ No newline at end of file
+<rss version="0.91"><channel><title>POI Changes</title><link>http://poi.apache.org/changes.html</link><description>POI
Changes</description><language>en-us</language><item><title>
fix(bug 57786)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 57786) - XSLFFreeformShape ignores quadratic bezier curves</description></item><item><title>
fix(bug 58206)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58206) - provide a mechanism to find slide layouts by name</description></item><item><title>
fix(bug 58204)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58204) - STYLE: ShapeContainer interface makes internal getShapesList()
redundant</description></item><item><title> add(bug 58190)</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers (bug 58190) - The current picture handling uses raw integers for types
and index
 , replace with enum and reference</description></item><item><title>
fix(bug 58203)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58203) - Apparently Maven uses plurals for all artifacts except
javadocs, so tweak our naming to make it happy</description></item><item><title>
add(bug 58193)</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers (bug 58193) - Use input stream rather than byte array for checksum etc.</description></item><item><title>
add(bug 58200)</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers (bug 58200) - SXSSF support for evaluating formula cells, provided the
cell and all its references are within the current window</description></item><item><title>
fix(bug 58098)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58098) - Avoid NPE in cleanup if NPOIFSFileSystem is opened on
a locked File under Wi
 ndows</description></item><item><title> add</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers - Merged common_sl branch to trunk</description></item><item><title>
fix(bug 57571)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 57571) - Fix creating comments for XSSF/SXSSF, regression was introduced
via bug 54920</description></item><item><title> fix(bug 58175)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58175) - Fix creating comments for XSSF/SXSSF, regression was introduced
via bug 54920</description></item><item><title> fix(bug 58156)</title><link>http://poi.apache.org/changes.html</link><description>
fix by POI Developers (bug 58156) - Possible data corruption in hasPOIFSHeader and hasOOXMLHeader</description></item><item><title>
add(bug 58130)</title><link>http://poi.apache.org/changes.html</link><description>
add by POI Developers (bug 58130) 
 - Conditional Formatting support for DataBars, Icon Sets / Multi-States, and Color Scales</description></item></channel></rss>
\ No newline at end of file

Modified: poi/site/publish/slideshow/how-to-shapes.html
URL: http://svn.apache.org/viewvc/poi/site/publish/slideshow/how-to-shapes.html?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/slideshow/how-to-shapes.html (original)
+++ poi/site/publish/slideshow/how-to-shapes.html Wed Aug  5 23:27:06 2015
@@ -414,16 +414,8 @@ if (VERSION > 3) {
         // picture data
         byte[] data = pict.getData();
 
-        int type = pict.getType();
-        String ext;
-        switch (type) {
-            case HSLFPictureShape.JPEG: ext = ".jpg"; break;
-            case HSLFPictureShape.PNG: ext = ".png"; break;
-            case HSLFPictureShape.WMF: ext = ".wmf"; break;
-            case HSLFPictureShape.EMF: ext = ".emf"; break;
-            case HSLFPictureShape.PICT: ext = ".pict"; break;
-            default: continue;
-        }
+        PictureData.PictureType type = pict.getType();
+        String ext = type.extension;
         FileOutputStream out = new FileOutputStream("pict_" + idx + ext);
         out.write(data);
         out.close();
@@ -431,9 +423,9 @@ if (VERSION > 3) {
     }
 
     // add a new picture to this slideshow and insert it in a new slide
-    idx = ppt.addPicture(new File("clock.jpg"), HSLFPictureShape.JPEG);
+    HSLFPictureData pd = ppt.addPicture(new File("clock.jpg"), PictureData.PictureType.JPEG);
 
-    HSLFPictureShape pictNew = new HSLFPictureShape(idx);
+    HSLFPictureShape pictNew = new HSLFPictureShape(pd);
 
     // set image position in the slide
     pictNew.setAnchor(new java.awt.Rectangle(100, 100, 300, 200));
@@ -449,16 +441,10 @@ if (VERSION > 3) {
             HSLFPictureShape pict = (HSLFPictureShape) sh;
             HSLFPictureData pictData = pict.getPictureData();
             byte[] data = pictData.getData();
-            int type = pictData.getType();
-            if (type == HSLFPictureShape.JPEG) {
-                FileOutputStream out = new FileOutputStream("slide0_" + idx + ".jpg");
-                out.write(data);
-                out.close();
-            } else if (type == HSLFPictureShape.PNG) {
-                FileOutputStream out = new FileOutputStream("slide0_" + idx + ".png");
-                out.write(data);
-                out.close();
-            }
+            PictureData.PictureType type = pictData.getType();
+            FileOutputStream out = new FileOutputStream("slide0_" + idx + type.extension);
+            out.write(data);
+            out.close();
             idx++;
         }
     }
@@ -508,9 +494,9 @@ if (VERSION > 3) {
     HSLFSlideMaster master = ppt.getSlideMasters().get(0);
 
     HSLFFill fill = master.getBackground().getFill();
-    int idx = ppt.addPicture(new File("background.png"), HSLFPictureShape.PNG);
+    HSLFPictureData pd = ppt.addPicture(new File("background.png"), PictureData.PictureType.PNG);
     fill.setFillType(HSLFFill.FILL_PICTURE);
-    fill.setPictureData(idx);
+    fill.setPictureData(pd);
                   </pre>
                 
                 
@@ -527,9 +513,9 @@ if (VERSION > 3) {
     // Without this line it will use master's background.
     slide.setFollowMasterBackground(false);
     HSLFFill fill = slide.getBackground().getFill();
-    int idx = ppt.addPicture(new File("background.png"), HSLFPictureShape.PNG);
+    HSLFPictureData pd = ppt.addPicture(new File("background.png"), PictureData.PictureType.PNG);
     fill.setFillType(HSLFFill.FILL_PATTERN);
-    fill.setPictureData(idx);
+    fill.setPictureData(pd);    
                   </pre>
                 
                 

Modified: poi/site/publish/slideshow/xslf-cookbook.html
URL: http://svn.apache.org/viewvc/poi/site/publish/slideshow/xslf-cookbook.html?rev=1694374&r1=1694373&r2=1694374&view=diff
==============================================================================
--- poi/site/publish/slideshow/xslf-cookbook.html (original)
+++ poi/site/publish/slideshow/xslf-cookbook.html Wed Aug  5 23:27:06 2015
@@ -394,13 +394,13 @@ if (VERSION > 3) {
 </div>
                     
 <pre class="code">
-        XMLSlideShow ppt = new XMLSlideShow();
-        XSLFSlide slide = ppt.createSlide();
-        
-        byte[] pictureData = IOUtils.toByteArray(new FileInputStream("image.png"));
+    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);
+    XSLFPictureData pd = ppt.addPicture(pictureData, PictureData.PictureType.PNG);
+    XSLFPictureShape pic = slide.createPicture(pd);
                     </pre>
                 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message