poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abea...@apache.org
Subject svn commit: r1874704 - /poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFTitle.java
Date Mon, 02 Mar 2020 23:57:02 GMT
Author: abearez
Date: Mon Mar  2 23:57:01 2020
New Revision: 1874704

URL: http://svn.apache.org/viewvc?rev=1874704&view=rev
Log:
Remove chart title when given text is null

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFTitle.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFTitle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFTitle.java?rev=1874704&r1=1874703&r2=1874704&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFTitle.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFTitle.java Mon Mar  2
23:57:01 2020
@@ -58,10 +58,16 @@ public class XDDFTitle {
     }
 
     public void setText(String text) {
-        if (!title.isSetLayout()) {
-            title.addNewLayout();
+        if (text == null) {
+            if (title.isSetTx()) {
+                title.unsetTx();
+            }
+        } else{
+            if (!title.isSetLayout()) {
+                title.addNewLayout();
+            }
+            getBody().setText(text);
         }
-        getBody().setText(text);
     }
 
     public void setOverlay(Boolean overlay) {



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


Mime
View raw message