You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2015/11/09 02:28:32 UTC

svn commit: r1713332 - in /poi: site/src/documentation/content/xdocs/status.xml trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java trunk/test-data/slideshow/bug53192.ppt

Author: kiwiwings
Date: Mon Nov  9 01:28:31 2015
New Revision: 1713332

URL: http://svn.apache.org/viewvc?rev=1713332&view=rev
Log:
#53192 - Images in ppt file have wrong width when convering ppt to png

Added:
    poi/trunk/test-data/slideshow/bug53192.ppt   (with props)
Modified:
    poi/site/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.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=1713332&r1=1713331&r2=1713332&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Mon Nov  9 01:28:31 2015
@@ -40,6 +40,7 @@
     </devs>
 
     <release version="3.14-beta1" date="2015-11-??">
+        <action dev="PD" type="fix" fixes-bug="53192">Images in ppt file have wrong width when convering ppt to png</action>
         <action dev="PD" type="add">Add support for HSLF metro blobs</action>
         <action dev="PD" type="fix" fixes-bug="52297">Bullets are not aligned properly while converting ppt slide to image</action>
         <action dev="PD" type="fix" fixes-bug="55265">DataFormatter correct support for alternate number grouping characters, eg 1234 + #'##0 = 1'234 not 1,234</action>

Modified: poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java?rev=1713332&r1=1713331&r2=1713332&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java Mon Nov  9 01:28:31 2015
@@ -298,21 +298,26 @@ public class DrawTextParagraph implement
         TextCap cap = tr.getTextCap();
         String tabs = null;
         for (char c : tr.getRawText().toCharArray()) {
-            if(c == '\t') {
-                if (tabs == null) {
-                    tabs = tab2space(tr);
-                }
-                buf.append(tabs);
-                continue;
+            switch (c) {
+                case '\t':
+                    if (tabs == null) {
+                        tabs = tab2space(tr);
+                    }
+                    buf.append(tabs);
+                    break;
+                case '\u000b':
+                    buf.append('\n');
+                    break;
+                default:
+                    switch (cap) {
+                        case ALL: c = Character.toUpperCase(c); break;
+                        case SMALL: c = Character.toLowerCase(c); break;
+                        case NONE: break;
+                    }
+    
+                    buf.append(c);
+                    break;
             }
-
-            switch (cap) {
-                case ALL: c = Character.toUpperCase(c); break;
-                case SMALL: c = Character.toLowerCase(c); break;
-                case NONE: break;
-            }
-
-            buf.append(c);
         }
 
         return buf.toString();

Added: poi/trunk/test-data/slideshow/bug53192.ppt
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/slideshow/bug53192.ppt?rev=1713332&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/test-data/slideshow/bug53192.ppt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



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