poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fannin...@apache.org
Subject svn commit: r1822758 - in /poi/trunk/src: java/org/apache/poi/sl/draw/DrawTextParagraph.java ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java
Date Wed, 31 Jan 2018 05:52:46 GMT
Author: fanningpj
Date: Wed Jan 31 05:52:46 2018
New Revision: 1822758

URL: http://svn.apache.org/viewvc?rev=1822758&view=rev
Log:
fix findbug issues introduced recently

Modified:
    poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java

Modified: poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java?rev=1822758&r1=1822757&r2=1822758&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java Wed Jan 31 05:52:46 2018
@@ -383,11 +383,11 @@ public class DrawTextParagraph implement
 
     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;
         }
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java?rev=1822758&r1=1822757&r2=1822758&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java Wed Jan 31 05:52:46
2018
@@ -99,7 +99,7 @@ public class XSLFTextRun implements Text
 
     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 Text
         }
 
         Double srcFontSize = r.getFontSize();
-        if (srcFontSize != getFontSize()) {
+        if (srcFontSize == null) {
+            if (getFontSize() != null) setFontSize(null);
+        } else if(!srcFontSize.equals(getFontSize())) {
             setFontSize(srcFontSize);
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message