poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1805516 - in /poi/trunk/src/ooxml: java/org/apache/poi/util/OOXMLLite.java java/org/apache/poi/xssf/eventusermodel/XSSFReader.java testcases/org/apache/poi/sl/TestFonts.java
Date Sat, 19 Aug 2017 16:31:28 GMT
Author: centic
Date: Sat Aug 19 16:31:28 2017
New Revision: 1805516

URL: http://svn.apache.org/viewvc?rev=1805516&view=rev
Log:
Add more non-test classes in OOXMLLite and add another font-metric that appears

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java?rev=1805516&r1=1805515&r2=1805516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java Sat Aug 19 16:31:28 2017
@@ -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");

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java?rev=1805516&r1=1805515&r2=1805516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java Sat Aug 19
16:31:28 2017
@@ -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

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java?rev=1805516&r1=1805515&r2=1805516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/sl/TestFonts.java Sat Aug 19 16:31:28 2017
@@ -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



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


Mime
View raw message