aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2017-08-19 16:31:28 +0000
committerDominik Stadler <centic@apache.org>2017-08-19 16:31:28 +0000
commit515f93ecd8bc4b3b1607b90b91c9b90fe957d29d (patch)
treeeaa55b06f00d08ff397fb98f5e00cc6ba9911c14 /src
parentc73a4570f82ae7c6654fd8c0ca4489141d662c04 (diff)
downloadpoi-515f93ecd8bc4b3b1607b90b91c9b90fe957d29d.tar.gz
poi-515f93ecd8bc4b3b1607b90b91c9b90fe957d29d.zip
Add more non-test classes in OOXMLLite and add another font-metric that appears
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1805516 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/ooxml/java/org/apache/poi/util/OOXMLLite.java14
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java11
-rw-r--r--src/ooxml/testcases/org/apache/poi/sl/TestFonts.java9
3 files changed, 22 insertions, 12 deletions
diff --git a/src/ooxml/java/org/apache/poi/util/OOXMLLite.java b/src/ooxml/java/org/apache/poi/util/OOXMLLite.java
index 4eaa825e57..e6dc38ce78 100644
--- a/src/ooxml/java/org/apache/poi/util/OOXMLLite.java
+++ b/src/ooxml/java/org/apache/poi/util/OOXMLLite.java
@@ -119,7 +119,19 @@ public final class OOXMLLite {
"TestFormulaEvaluatorOnXSSF\\$SS",
"TestMultiSheetFormulaEvaluatorOnXSSF\\$Result",
"TestMultiSheetFormulaEvaluatorOnXSSF\\$SS",
- "TestXSSFBugs\\$\\d"
+ "TestXSSFBugs\\$\\d",
+ "AddImageBench",
+ "AddImageBench_jmhType_B\\d",
+ "AddImageBench_benchCreatePicture_jmhTest",
+ "TestEvilUnclosedBRFixingInputStream\\$EvilUnclosedBRFixingInputStream",
+ "TempFileRecordingSXSSFWorkbookWithCustomZipEntrySource\\$TempFileRecordingSheetDataWriterWithDecorator",
+ "TestXSSFBReader\\$1",
+ "TestXSSFBReader\\$TestSheetHandler",
+ "TestFormulaEvaluatorOnXSSF\\$1",
+ "TestMultiSheetFormulaEvaluatorOnXSSF\\$1",
+ "TestZipPackagePropertiesMarshaller\\$1",
+ "SLCommonUtils",
+ "TestPPTX2PNG\\$1"
);
System.out.println("Collecting unit tests from " + _testDir);
collectTests(_testDir, _testDir, lst, ".+.class$", ".+(" + exclude + ").class");
diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
index 0bc6d3f5ac..1652b2a774 100644
--- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
+++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
@@ -27,7 +27,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -225,7 +224,7 @@ public class XSSFReader {
*/
SheetIterator(PackagePart wb) throws IOException {
- /**
+ /*
* The order of sheets is defined by the order of CTSheet elements in workbook.xml
*/
try {
@@ -251,7 +250,7 @@ public class XSSFReader {
Iterator<XSSFSheetRef> createSheetIteratorFromWB(PackagePart wb) throws IOException {
XMLSheetRefReader xmlSheetRefReader = new XMLSheetRefReader();
- XMLReader xmlReader = null;
+ XMLReader xmlReader;
try {
xmlReader = SAXHelper.newXMLReader();
} catch (ParserConfigurationException e) {
@@ -371,9 +370,7 @@ public class XSSFReader {
continue;
}
XSSFDrawing drawing = new XSSFDrawing(drawingsPart);
- for (XSSFShape shape : drawing.getShapes()){
- shapes.add(shape);
- }
+ shapes.addAll(drawing.getShapes());
}
} catch (XmlException e){
return null;
@@ -424,7 +421,7 @@ public class XSSFReader {
private static final String ID = "id";
private static final String NAME = "name";
- private final List<XSSFSheetRef> sheetRefs = new LinkedList();
+ private final List<XSSFSheetRef> sheetRefs = new LinkedList<XSSFSheetRef>();
// read <sheet name="Sheet6" sheetId="4" r:id="rId6"/>
// and add XSSFSheetRef(id="rId6", name="Sheet6") to sheetRefs
diff --git a/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java b/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java
index 434ea7a958..55630d8663 100644
--- a/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java
+++ b/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java
@@ -74,12 +74,13 @@ public class TestFonts {
// currently linux and mac return quite different values
private static final int[] expected_sizes = {
304, // windows 10, 1080p, MS Office 2016, system text scaling 100% instead of default 125%
- 306, //Windows 10, 15.6" 3840x2160
+ 306, // Windows 10, 15.6" 3840x2160
311, 312, 313, 318,
- 348, //Windows 10, 15.6" 3840x2160
+ 348, // Windows 10, 15.6" 3840x2160
362, // Windows 10, 13.3" 1080p high-dpi
- 377, 398, 399, //Mac
- 406 // Ubuntu Trusty, 15", 1680x1050
+ 372, // Ubuntu Xenial, 15", 1680x1050
+ 377, 398, 399, // Mac
+ 406 // Ubuntu Xenial, 15", 1680x1050
};
@BeforeClass