Skip to content

Commit

Permalink
fix findbug issues introduced recently
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1822758 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pjfanning committed Jan 31, 2018
1 parent 3f2ae2e commit 940f438
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
Expand Up @@ -383,11 +383,11 @@ protected String getRenderableText(Graphics2D graphics, TextRun tr) {

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;
}

Expand Down
6 changes: 4 additions & 2 deletions src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java
Expand Up @@ -99,7 +99,7 @@ String getRenderableText() {

String getRenderableText(String txt) {
// TODO: finish support for tabs
txt.replace("\t", " ");
txt = txt.replace("\t", " ");

switch (getTextCap()) {
case ALL:
Expand Down Expand Up @@ -589,7 +589,9 @@ void copy(XSLFTextRun r) {
}

Double srcFontSize = r.getFontSize();
if (srcFontSize != getFontSize()) {
if (srcFontSize == null) {
if (getFontSize() != null) setFontSize(null);
} else if(!srcFontSize.equals(getFontSize())) {
setFontSize(srcFontSize);
}

Expand Down

0 comments on commit 940f438

Please sign in to comment.