#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
This commit is contained in:
Andreas Beeker 2015-11-09 01:28:31 +00:00
parent b3a0500abb
commit 4f46092b35
2 changed files with 19 additions and 14 deletions

View File

@ -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 (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();

Binary file not shown.