mirror of https://github.com/apache/poi.git
Fix a 1.6ism
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1069974 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
71d3ec25d8
commit
95269a6ad4
|
@ -494,8 +494,13 @@ public class XSSFRichTextString implements RichTextString {
|
|||
}
|
||||
|
||||
if(startIndex > 0 && !formats.containsKey(startIndex)) {
|
||||
Map.Entry<Integer, CTRPrElt> he = formats.higherEntry(startIndex); //TODO TreeMap#higherEntry is JDK 1.6 only!
|
||||
if(he != null) formats.put(startIndex, he.getValue());
|
||||
// If there's a format that starts later in the string, make it start now
|
||||
for(Map.Entry<Integer, CTRPrElt> entry : formats.entrySet()) {
|
||||
if(entry.getKey() > startIndex) {
|
||||
formats.put(startIndex, entry.getValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
formats.put(endIndex, fmt);
|
||||
|
||||
|
|
Loading…
Reference in New Issue