Fixed issue where adding builtin types pushed other formats later in the list.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353677 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8f5847ee81
commit
fd8f48f7d7
@ -232,7 +232,12 @@ public class HSSFDataFormat
|
||||
while ( i.hasNext() )
|
||||
{
|
||||
ind = i.nextIndex();
|
||||
formats.add( ind, i.next() );
|
||||
if ( formats.size() < ind + 1 )
|
||||
{
|
||||
formats.setSize( ind + 1 );
|
||||
}
|
||||
|
||||
formats.set( ind, i.next() );
|
||||
}
|
||||
movedBuiltins = true;
|
||||
}
|
||||
@ -247,7 +252,7 @@ public class HSSFDataFormat
|
||||
ind = workbook.getFormat( format, true );
|
||||
if ( formats.size() <= ind )
|
||||
formats.setSize( ind + 1 );
|
||||
formats.add( ind, format );
|
||||
formats.set( ind, format );
|
||||
|
||||
return (short) ind;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user