mirror of https://github.com/apache/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
This commit is contained in:
parent
b3a0500abb
commit
4f46092b35
|
@ -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.
Loading…
Reference in New Issue