aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawTextParagraph.java6
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java6
2 files changed, 7 insertions, 5 deletions
diff --git a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
index c0c7eb21fd..78979c97b4 100644
--- a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
+++ b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
@@ -383,11 +383,11 @@ public class DrawTextParagraph implements Drawable {
String getRenderableText(TextRun tr) {
String txt = tr.getRawText();
- txt.replace("\t", tab2space(tr)).replace("\u000b", "\n");
+ txt = txt.replace("\t", tab2space(tr)).replace("\u000b", "\n");
switch (tr.getTextCap()) {
- case ALL: txt.toUpperCase(LocaleUtil.getUserLocale()); break;
- case SMALL: txt.toLowerCase(LocaleUtil.getUserLocale()); break;
+ case ALL: txt = txt.toUpperCase(LocaleUtil.getUserLocale()); break;
+ case SMALL: txt = txt.toLowerCase(LocaleUtil.getUserLocale()); break;
case NONE: break;
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java
index 4c12a38d11..47a712df80 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java
@@ -99,7 +99,7 @@ public class XSLFTextRun implements TextRun {
String getRenderableText(String txt) {
// TODO: finish support for tabs
- txt.replace("\t", " ");
+ txt = txt.replace("\t", " ");
switch (getTextCap()) {
case ALL:
@@ -589,7 +589,9 @@ public class XSLFTextRun implements TextRun {
}
Double srcFontSize = r.getFontSize();
- if (srcFontSize != getFontSize()) {
+ if (srcFontSize == null) {
+ if (getFontSize() != null) setFontSize(null);
+ } else if(!srcFontSize.equals(getFontSize())) {
setFontSize(srcFontSize);
}