mirror of
https://github.com/apache/poi.git
synced 2025-02-21 17:45:07 +00:00
[bug-67510] issue with empty num format on chart axes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913674 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
74151ffa5b
commit
e95a4d84d0
@ -146,10 +146,10 @@ public abstract class XDDFChartAxis implements HasShapeProperties {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return axis number format
|
||||
* @return axis number format (can be null if no number format is set)
|
||||
*/
|
||||
public String getNumberFormat() {
|
||||
return getCTNumFmt().getFormatCode();
|
||||
return hasNumberFormat() ? getCTNumFmt().getFormatCode() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,11 +17,6 @@
|
||||
|
||||
package org.apache.poi.xssf.usermodel.charts;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@ -38,6 +33,8 @@ import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public final class TestXSSFChartAxis {
|
||||
|
||||
private static final double EPSILON = 1E-7;
|
||||
@ -52,6 +49,8 @@ public final class TestXSSFChartAxis {
|
||||
XSSFClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, 1, 10, 30);
|
||||
XSSFChart chart = drawing.createChart(anchor);
|
||||
axis = chart.createValueAxis(AxisPosition.BOTTOM);
|
||||
// no format set yet
|
||||
assertNull(axis.getNumberFormat());
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
|
Loading…
x
Reference in New Issue
Block a user