diff options
Diffstat (limited to 'src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java index 17e5a70861..27a7520d42 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java @@ -32,7 +32,11 @@ public class XSSFFirstHeader extends XSSFHeaderFooter implements Header{ } public void setText(String text) { - getHeaderFooter().setFirstHeader(text); + if(text == null) { + getHeaderFooter().unsetFirstHeader(); + } else { + getHeaderFooter().setFirstHeader(text); + } } } |