poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1728737 - in /poi: site/src/documentation/content/xdocs/status.xml trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
Date Fri, 05 Feb 2016 22:03:45 GMT
Author: kiwiwings
Date: Fri Feb  5 22:03:44 2016
New Revision: 1728737

URL: http://svn.apache.org/viewvc?rev=1728737&view=rev
Log:
XSLF - fixed NPE when adding pictures with existing non-picture media files (e.g. movies)

Modified:
    poi/site/src/documentation/content/xdocs/status.xml
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java

Modified: poi/site/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1728737&r1=1728736&r2=1728737&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Fri Feb  5 22:03:44 2016
@@ -40,6 +40,7 @@
     </devs>
 
     <release version="3.14-beta2" date="2016-??-??">
+        <action dev="PD" type="fix">XSLF - fixed NPE when adding pictures with existing
non-picture media files (e.g. movies)</action>
         <action dev="PD" type="fix" fixes-bug="58885">Fixed preformance regression
after fixing bug 58443 when adding a merged region to an XSSFSheet.</action>
         <action dev="PD" type="add">Raised xmlsec version to 2.0.6</action>
         <action dev="PD" type="add" fixes-bug="47291">Cannot open link correctly which
insert in ppt</action>

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java?rev=1728737&r1=1728736&r2=1728737&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java Fri Feb  5
22:03:44 2016
@@ -163,7 +163,13 @@ public final class XSLFPictureData exten
             byte data[] = getData();
             checksum = IOUtils.calculateChecksum(data);
             
-            switch (getType()) {
+            PictureType pt = getType();
+            if (pt == null) {
+                origSize = new Dimension(1,1);
+                return;
+            }
+            
+            switch (pt) {
             case EMF:
                 origSize = new EMF.NativeHeader(data, 0).getSize();
                 break;



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


Mime
View raw message