From: Andreas Beeker Date: Mon, 9 Nov 2015 01:28:31 +0000 (+0000) Subject: #53192 - Images in ppt file have wrong width when convering ppt to png X-Git-Tag: REL_3_14_BETA1~134 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4f46092b35e5ed18074fb997b16e9da5d2fb5766;p=poi.git #53192 - Images in ppt file have wrong width when convering ppt to png git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713332 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java index 474d357137..0bd364b9e9 100644 --- a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java +++ b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java @@ -298,21 +298,26 @@ public class DrawTextParagraph implements Drawable { 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 (cap) { - case ALL: c = Character.toUpperCase(c); break; - case SMALL: c = Character.toLowerCase(c); break; - case NONE: break; + 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; } - - buf.append(c); } return buf.toString(); diff --git a/test-data/slideshow/bug53192.ppt b/test-data/slideshow/bug53192.ppt new file mode 100644 index 0000000000..54797b5aad Binary files /dev/null and b/test-data/slideshow/bug53192.ppt differ