aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java5
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java b/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java
index 76572de746..7898317e8d 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java
@@ -22,6 +22,7 @@ import java.util.Iterator;
import org.apache.poi.hssf.model.InternalWorkbook;
import org.apache.poi.hssf.record.LabelSSTRecord;
import org.apache.poi.hssf.record.common.UnicodeString;
+import org.apache.poi.hssf.record.common.UnicodeString.FormatRun;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.RichTextString;
/**
@@ -147,10 +148,10 @@ public final class HSSFRichTextString implements Comparable<HSSFRichTextString>,
//Need to clear the current formatting between the startIndex and endIndex
_string = cloneStringIfRequired();
- Iterator formatting = _string.formatIterator();
+ Iterator<FormatRun> formatting = _string.formatIterator();
if (formatting != null) {
while (formatting.hasNext()) {
- UnicodeString.FormatRun r = (UnicodeString.FormatRun)formatting.next();
+ UnicodeString.FormatRun r = formatting.next();
if ((r.getCharacterPos() >= startIndex) && (r.getCharacterPos() < endIndex))
formatting.remove();
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
index 44070b1b55..46aa352566 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
@@ -18,7 +18,6 @@
package org.apache.poi.xssf.usermodel;
import java.util.Iterator;
-import java.util.Map;
import java.util.TreeMap;
import org.apache.poi.ss.SpreadsheetVersion;