You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by vi...@apache.org on 2015/10/19 08:55:06 UTC

svn commit: r1709363 - in /poi/trunk/src/ooxml: java/org/apache/poi/xdgf/extractor/ java/org/apache/poi/xdgf/usermodel/section/ java/org/apache/poi/xdgf/usermodel/shape/ java/org/apache/poi/xdgf/util/ testcases/org/apache/poi/xdgf/extractor/

Author: virtuald
Date: Mon Oct 19 06:55:06 2015
New Revision: 1709363

URL: http://svn.apache.org/viewvc?rev=1709363&view=rev
Log:
XDGF: fix jenkins build errors

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java
    poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
    poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeTextVisitor.java
    poi/trunk/src/ooxml/java/org/apache/poi/xdgf/util/HierarchyPrinter.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java?rev=1709363&r1=1709362&r2=1709363&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java Mon Oct 19 06:55:06 2015
@@ -1,3 +1,19 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
 package org.apache.poi.xdgf.extractor;
 
 import java.io.IOException;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java?rev=1709363&r1=1709362&r2=1709363&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java Mon Oct 19 06:55:06 2015
@@ -32,6 +32,18 @@ public class CombinedIterable<T> impleme
 
     final SortedMap<Long, T> _baseItems;
     final SortedMap<Long, T> _masterItems;
+    
+    private static final class EmptyIterator<T> implements Iterator<T> {
+
+        public boolean hasNext() {
+            return false;
+        }
+
+        public T next() {
+            return null;
+        }
+        
+    }
 
     public CombinedIterable(SortedMap<Long, T> baseItems,
             SortedMap<Long, T> masterItems) {
@@ -47,7 +59,7 @@ public class CombinedIterable<T> impleme
         if (_masterItems != null)
             vmasterI = _masterItems.entrySet().iterator();
         else
-            vmasterI = Collections.emptyIterator();
+            vmasterI = new EmptyIterator<Entry<Long, T>>();
 
         return new Iterator<T>() {
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeTextVisitor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeTextVisitor.java?rev=1709363&r1=1709362&r2=1709363&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeTextVisitor.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeTextVisitor.java Mon Oct 19 06:55:06 2015
@@ -1,3 +1,19 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
 package org.apache.poi.xdgf.usermodel.shape;
 
 import java.awt.geom.AffineTransform;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xdgf/util/HierarchyPrinter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xdgf/util/HierarchyPrinter.java?rev=1709363&r1=1709362&r2=1709363&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xdgf/util/HierarchyPrinter.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xdgf/util/HierarchyPrinter.java Mon Oct 19 06:55:06 2015
@@ -24,6 +24,7 @@ import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.OutputStream;
 import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
 
 import org.apache.poi.xdgf.usermodel.XDGFPage;
 import org.apache.poi.xdgf.usermodel.XDGFShape;
@@ -37,13 +38,13 @@ import org.apache.poi.xdgf.usermodel.sha
 public class HierarchyPrinter {
 
     public static void printHierarchy(XDGFPage page, File outDir)
-            throws FileNotFoundException {
+            throws FileNotFoundException, UnsupportedEncodingException {
 
         File pageFile = new File(outDir, "page" + page.getPageNumber() + "-"
                 + Util.sanitizeFilename(page.getName()) + ".txt");
 
         OutputStream os = new FileOutputStream(pageFile);
-        PrintStream pos = new PrintStream(os);
+        PrintStream pos = new PrintStream(os, false, "utf-8");
 
         printHierarchy(page, pos);
 
@@ -70,7 +71,7 @@ public class HierarchyPrinter {
     }
 
     public static void printHierarchy(XmlVisioDocument document,
-            String outDirname) throws FileNotFoundException {
+            String outDirname) throws FileNotFoundException, UnsupportedEncodingException {
 
         File outDir = new File(outDirname);
 

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java?rev=1709363&r1=1709362&r2=1709363&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xdgf/extractor/TestXDGFVisioExtractor.java Mon Oct 19 06:55:06 2015
@@ -1,3 +1,19 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
 package org.apache.poi.xdgf.extractor;
 
 import java.io.IOException;



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