You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by jo...@apache.org on 2008/08/07 22:23:26 UTC

svn commit: r683699 - in /poi/trunk/src/scratchpad: src/org/apache/poi/hslf/ src/org/apache/poi/hslf/dev/ src/org/apache/poi/hslf/extractor/ src/org/apache/poi/hslf/usermodel/ testcases/org/apache/poi/hslf/extractor/ testcases/org/apache/poi/hslf/model...

Author: josh
Date: Thu Aug  7 13:23:26 2008
New Revision: 683699

URL: http://svn.apache.org/viewvc?rev=683699&view=rev
Log:
JDK 1.4 compatibility.  Some exception clean-up

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java?rev=683699&r1=683698&r2=683699&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java Thu Aug  7 13:23:26 2008
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hslf;
 
@@ -27,7 +24,12 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
 
 import org.apache.poi.POIDocument;
 import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException;
@@ -36,7 +38,6 @@
 import org.apache.poi.hslf.record.*;
 import org.apache.poi.hslf.usermodel.ObjectData;
 import org.apache.poi.hslf.usermodel.PictureData;
-import org.apache.poi.hslf.model.Shape;
 import org.apache.poi.poifs.filesystem.DirectoryNode;
 import org.apache.poi.poifs.filesystem.DocumentEntry;
 import org.apache.poi.poifs.filesystem.DocumentInputStream;
@@ -51,14 +52,10 @@
  *
  * @author Nick Burch
  */
-
-public class HSLFSlideShow extends POIDocument
-{
+public final class HSLFSlideShow extends POIDocument {
     // For logging
     private POILogger logger = POILogFactory.getLogger(this.getClass());
 
-	private InputStream istream;
-
 	// Holds metadata on where things are in our document
 	private CurrentUserAtom currentUser;
 
@@ -101,11 +98,9 @@
 	 * @param inputStream the source of the data
 	 * @throws IOException if there is a problem while parsing the document.
 	 */
-	public HSLFSlideShow(InputStream inputStream) throws IOException
-	{
+	public HSLFSlideShow(InputStream inputStream) throws IOException {
 		//do Ole stuff
 		this(new POIFSFileSystem(inputStream));
-		istream = inputStream;
 	}
 
 	/**
@@ -160,29 +155,21 @@
 		// Look for Picture Streams:
 		readPictures();
 	}
-
 	/**
 	 * Constructs a new, empty, Powerpoint document.
 	 */
-	public HSLFSlideShow() throws IOException 
-	{
-		this(HSLFSlideShow.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt"));
-	}
-
-	/**
-	 * Shuts things down. Closes underlying streams etc
-	 *
-	 * @throws IOException
-	 */
-	public void close() throws IOException
-	{
-		if(istream != null) {
-			istream.close();
+	public static final HSLFSlideShow create() {
+		InputStream is = HSLFSlideShow.class.getResourceAsStream("data/empty.ppt");
+		if (is == null) {
+			throw new RuntimeException("Missing resource 'empty.ppt'");
+		}
+		try {
+			return new HSLFSlideShow(is);
+		} catch (IOException e) {
+			throw new RuntimeException(e);
 		}
-		filesystem = null;
 	}
 
-
 	/**
 	 * Extracts the main PowerPoint document stream from the 
 	 *  POI file, ready to be passed 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java?rev=683699&r1=683698&r2=683699&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java Thu Aug  7 13:23:26 2008
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,19 +14,14 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hslf.dev;
 
-import java.util.*;
-import java.io.*;
-
-import org.apache.poi.ddf.*;
-import org.apache.poi.hslf.*;
-import org.apache.poi.hslf.record.*;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 
-import org.apache.poi.util.LittleEndian;
+import org.apache.poi.hslf.HSLFSlideShow;
+import org.apache.poi.hslf.record.Record;
 
 /**
  * This class provides a way to view the contents of a powerpoint file.
@@ -36,9 +30,7 @@
  *
  * @author Nick Burch
  */
-
-public class SlideShowRecordDumper
-{
+public final class SlideShowRecordDumper {
   private HSLFSlideShow doc;
 
   /**
@@ -57,7 +49,6 @@
 	SlideShowRecordDumper foo = new SlideShowRecordDumper(filename);
 
 	foo.printDump();
-	foo.close();
   }
 
 
@@ -73,19 +64,6 @@
 	doc = new HSLFSlideShow(fileName);
   }
 
-  /**
-   * Shuts things down. Closes underlying streams etc
-   *
-   * @throws IOException
-   */
-  public void close() throws IOException
-  {
-	if(doc != null) {
-		doc.close();
-	}
-	doc = null;
-  }
-
 
   public void printDump() throws IOException {
 	// Prints out the records in the tree

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java?rev=683699&r1=683698&r2=683699&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java Thu Aug  7 13:23:26 2008
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,21 +14,23 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hslf.extractor;
 
-import java.io.*;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.HashSet;
 
 import org.apache.poi.POIOLE2TextExtractor;
+import org.apache.poi.hslf.HSLFSlideShow;
+import org.apache.poi.hslf.model.Comment;
+import org.apache.poi.hslf.model.HeadersFooters;
+import org.apache.poi.hslf.model.Notes;
+import org.apache.poi.hslf.model.Slide;
+import org.apache.poi.hslf.model.TextRun;
+import org.apache.poi.hslf.usermodel.SlideShow;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
-import org.apache.poi.hslf.*;
-import org.apache.poi.hslf.model.*;
-import org.apache.poi.hslf.record.Comment2000;
-import org.apache.poi.hslf.record.Record;
-import org.apache.poi.hslf.usermodel.*;
 
 /**
  * This class can be used to extract text from a PowerPoint file.
@@ -37,9 +38,7 @@
  *
  * @author Nick Burch
  */
-
-public class PowerPointExtractor extends POIOLE2TextExtractor
-{
+public final class PowerPointExtractor extends POIOLE2TextExtractor {
 	private HSLFSlideShow _hslfshow;
 	private SlideShow _show;
 	private Slide[] _slides;
@@ -74,7 +73,6 @@
 
 	PowerPointExtractor ppe = new PowerPointExtractor(file);
 	System.out.println(ppe.getText(true,notes,comments));
-	ppe.close();
   }
 
 	/**
@@ -111,16 +109,6 @@
 	}
 
 	/**
-	 * Shuts down the underlying streams
-	 */
-	public void close() throws IOException {
-		_hslfshow.close();
-		_hslfshow = null;
-		_show = null;
-		_slides = null;
-	}
-
-	/**
 	 * Should a call to getText() return slide text?
 	 * Default is yes
 	 */

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java?rev=683699&r1=683698&r2=683699&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java Thu Aug  7 13:23:26 2008
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,24 +14,53 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hslf.usermodel;
 
-import java.util.*;
 import java.awt.Dimension;
-import java.io.*;
-
-import org.apache.poi.ddf.*;
-import org.apache.poi.hslf.*;
-import org.apache.poi.hslf.model.*;
-import org.apache.poi.hslf.model.Notes;
-import org.apache.poi.hslf.model.Slide;
-import org.apache.poi.hslf.record.SlideListWithText.*;
-import org.apache.poi.hslf.record.*;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.apache.poi.ddf.EscherBSERecord;
+import org.apache.poi.ddf.EscherContainerRecord;
+import org.apache.poi.ddf.EscherOptRecord;
+import org.apache.poi.ddf.EscherRecord;
+import org.apache.poi.hslf.HSLFSlideShow;
 import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException;
 import org.apache.poi.hslf.exceptions.HSLFException;
+import org.apache.poi.hslf.model.HeadersFooters;
+import org.apache.poi.hslf.model.Notes;
+import org.apache.poi.hslf.model.PPFont;
+import org.apache.poi.hslf.model.Picture;
+import org.apache.poi.hslf.model.Shape;
+import org.apache.poi.hslf.model.Slide;
+import org.apache.poi.hslf.model.SlideMaster;
+import org.apache.poi.hslf.model.TitleMaster;
+import org.apache.poi.hslf.record.Document;
+import org.apache.poi.hslf.record.DocumentAtom;
+import org.apache.poi.hslf.record.FontCollection;
+import org.apache.poi.hslf.record.FontEntityAtom;
+import org.apache.poi.hslf.record.HeadersFootersContainer;
+import org.apache.poi.hslf.record.ParentAwareRecord;
+import org.apache.poi.hslf.record.PersistPtrHolder;
+import org.apache.poi.hslf.record.PositionDependentRecord;
+import org.apache.poi.hslf.record.PositionDependentRecordContainer;
+import org.apache.poi.hslf.record.Record;
+import org.apache.poi.hslf.record.RecordContainer;
+import org.apache.poi.hslf.record.RecordTypes;
+import org.apache.poi.hslf.record.SlideListWithText;
+import org.apache.poi.hslf.record.SlidePersistAtom;
+import org.apache.poi.hslf.record.UserEditAtom;
+import org.apache.poi.hslf.record.SlideListWithText.SlideAtomsSet;
 import org.apache.poi.util.ArrayUtil;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
@@ -48,9 +76,7 @@
  * @author Nick Burch
  * @author Yegor kozlov
  */
-
-public class SlideShow
-{
+public final class SlideShow {
   // What we're based on
   private HSLFSlideShow _hslfSlideShow;
 
@@ -90,8 +116,7 @@
    *
    * @param hslfSlideShow the HSLFSlideShow to base on
    */
-  public SlideShow(HSLFSlideShow hslfSlideShow) throws IOException
-  {
+  public SlideShow(HSLFSlideShow hslfSlideShow) {
 	// Get useful things from our base slideshow
     _hslfSlideShow = hslfSlideShow;
 	_records = _hslfSlideShow.getRecords();
@@ -111,8 +136,8 @@
   /**
    * Constructs a new, empty, Powerpoint document.
    */
-  public SlideShow() throws IOException {
-	this(new HSLFSlideShow());
+  public SlideShow() {
+	this(HSLFSlideShow.create());
   }
 
     /**

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java?rev=683699&r1=683698&r2=683699&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TextExtractor.java Thu Aug  7 13:23:26 2008
@@ -229,12 +229,12 @@
 		ppe = new PowerPointExtractor(filename);
 
 		String text = ppe.getText();
-		assertFalse("Comments not in by default", text.contains("This is a test comment"));
+		assertFalse("Comments not in by default", contains(text, "This is a test comment"));
 		
 		ppe.setCommentsByDefault(true);
 		
 		text = ppe.getText();
-		assertTrue("Unable to find expected word in text\n" + text, text.contains("This is a test comment"));
+		assertTrue("Unable to find expected word in text\n" + text, contains(text, "This is a test comment"));
 
 		
 		// And another file
@@ -242,12 +242,12 @@
 		ppe = new PowerPointExtractor(filename);
 
 		text = ppe.getText();
-		assertFalse("Comments not in by default", text.contains("testdoc"));
+		assertFalse("Comments not in by default", contains(text, "testdoc"));
 		
 		ppe.setCommentsByDefault(true);
 		
 		text = ppe.getText();
-		assertTrue("Unable to find expected word in text\n" + text, text.contains("testdoc"));
+		assertTrue("Unable to find expected word in text\n" + text, contains(text, "testdoc"));
     }
     
     /**
@@ -266,13 +266,13 @@
 		ppe = new PowerPointExtractor(hslf);
 
 		text = ppe.getText();
-		assertFalse("Unable to find expected word in text\n" + text, text.contains("testdoc"));
-        assertFalse("Unable to find expected word in text\n" + text, text.contains("test phrase"));
+		assertFalse("Unable to find expected word in text\n" + text, contains(text, "testdoc"));
+        assertFalse("Unable to find expected word in text\n" + text, contains(text, "test phrase"));
         
         ppe.setNotesByDefault(true);
 		text = ppe.getText();
-		assertTrue("Unable to find expected word in text\n" + text, text.contains("testdoc"));
-        assertTrue("Unable to find expected word in text\n" + text, text.contains("test phrase"));
+		assertTrue("Unable to find expected word in text\n" + text, contains(text, "testdoc"));
+        assertTrue("Unable to find expected word in text\n" + text, contains(text, "test phrase"));
 
         
 		// And with a footer, also on notes
@@ -285,12 +285,16 @@
 		ppe = new PowerPointExtractor(filename);
 
 		text = ppe.getText();
-		assertFalse("Unable to find expected word in text\n" + text, text.contains("testdoc"));
-        assertFalse("Unable to find expected word in text\n" + text, text.contains("test phrase"));
+		assertFalse("Unable to find expected word in text\n" + text, contains(text, "testdoc"));
+        assertFalse("Unable to find expected word in text\n" + text, contains(text, "test phrase"));
 
         ppe.setNotesByDefault(true);
 		text = ppe.getText();
-		assertTrue("Unable to find expected word in text\n" + text, text.contains("testdoc"));
-        assertTrue("Unable to find expected word in text\n" + text, text.contains("test phrase"));
+		assertTrue("Unable to find expected word in text\n" + text, contains(text, "testdoc"));
+        assertTrue("Unable to find expected word in text\n" + text, contains(text, "test phrase"));
     }
+
+	private static boolean contains(String text, String searchString) {
+		return text.indexOf(searchString) >=0;
+	}
 }

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java?rev=683699&r1=683698&r2=683699&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java Thu Aug  7 13:23:26 2008
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,58 +14,43 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hslf.model;
 
-import java.io.*;
-import java.util.List;
-import java.util.ArrayList;
+import java.io.File;
+import java.io.FileInputStream;
+
+import junit.framework.TestCase;
 
 import org.apache.poi.hslf.HSLFSlideShow;
 import org.apache.poi.hslf.usermodel.ObjectData;
 import org.apache.poi.hslf.usermodel.PictureData;
 import org.apache.poi.hslf.usermodel.SlideShow;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
-import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.hwpf.HWPFDocument;
-import org.apache.poi.hwpf.usermodel.Range;
-import org.apache.poi.hwpf.usermodel.Paragraph;
-
-import junit.framework.TestCase;
 
-public class TestOleEmbedding extends TestCase
-{
+public final class TestOleEmbedding extends TestCase {
     /**
      * Tests support for OLE objects.
      *
      * @throws Exception if an error occurs.
      */
-    public void testOleEmbedding2003() throws Exception
-    {
+    public void testOleEmbedding2003() throws Exception {
         String dirname = System.getProperty("HSLF.testdata.path");
         File file = new File(dirname, "ole2-embedding-2003.ppt");
         HSLFSlideShow slideShow = new HSLFSlideShow(new FileInputStream(file));
-        try
-        {
-            // Placeholder EMFs for clients that don't support the OLE components.
-            PictureData[] pictures = slideShow.getPictures();
-            assertEquals("Should be two pictures", 2, pictures.length);
-            //assertDigestEquals("Wrong data for picture 1", "8d1fbadf4814f321bb1ccdd056e3c788", pictures[0].getData());
-            //assertDigestEquals("Wrong data for picture 2", "987a698e83559cf3d38a0deeba1cc63b", pictures[1].getData());
-
-            // Actual embedded objects.
-            ObjectData[] objects = slideShow.getEmbeddedObjects();
-            assertEquals("Should be two objects", 2, objects.length);
-            //assertDigestEquals("Wrong data for objecs 1", "0d1fcc61a83de5c4894dc0c88e9a019d", objects[0].getData());
-            //assertDigestEquals("Wrong data for object 2", "b323604b2003a7299c77c2693b641495", objects[1].getData());
-        }
-        finally
-        {
-            slideShow.close();
-        }
+        // Placeholder EMFs for clients that don't support the OLE components.
+        PictureData[] pictures = slideShow.getPictures();
+        assertEquals("Should be two pictures", 2, pictures.length);
+        //assertDigestEquals("Wrong data for picture 1", "8d1fbadf4814f321bb1ccdd056e3c788", pictures[0].getData());
+        //assertDigestEquals("Wrong data for picture 2", "987a698e83559cf3d38a0deeba1cc63b", pictures[1].getData());
+
+        // Actual embedded objects.
+        ObjectData[] objects = slideShow.getEmbeddedObjects();
+        assertEquals("Should be two objects", 2, objects.length);
+        //assertDigestEquals("Wrong data for objecs 1", "0d1fcc61a83de5c4894dc0c88e9a019d", objects[0].getData());
+        //assertDigestEquals("Wrong data for object 2", "b323604b2003a7299c77c2693b641495", objects[1].getData());
     }
 
     public void testOLEShape() throws Exception {

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java?rev=683699&r1=683698&r2=683699&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java Thu Aug  7 13:23:26 2008
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hslf.usermodel;
 
@@ -36,7 +33,7 @@
  *
  * @author Nick Burch (nick at torchbox dot com)
  */
-public class TestAddingSlides extends TestCase {
+public final class TestAddingSlides extends TestCase {
 	// An empty SlideShow
 	private HSLFSlideShow hss_empty;
 	private SlideShow ss_empty;
@@ -53,7 +50,7 @@
 	 * Create/open the slideshows
 	 */
 	public void setUp() throws Exception {
-		hss_empty = new HSLFSlideShow();
+		hss_empty = HSLFSlideShow.create();
 		ss_empty = new SlideShow(hss_empty);
 		
 		String dirname = System.getProperty("HSLF.testdata.path");
@@ -82,8 +79,8 @@
         Record[] _records = hss_empty.getRecords();
         for (int i = 0; i < _records.length; i++) {
             Record record = _records[i];
-            if(_records[i].getRecordType() == RecordTypes.UserEditAtom.typeID) {
-                usredit = (UserEditAtom)_records[i];
+            if(record.getRecordType() == RecordTypes.UserEditAtom.typeID) {
+                usredit = (UserEditAtom)record;
             }
        }
        assertNotNull(usredit);



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