return baseStyleId;
}
private int createCellStyle( int _baseStyleId, boolean _isDate, boolean _isTime )
{
final XmlNode node = this.xmlCellStyleXfs.get( _baseStyleId ).clone();
final Style style;
if (!_isDate && !_isTime) {
style = new Style( _baseStyleId, NumberFormat.getPredefinedNumberFormat( "0" ), false );
node.addAttribute( XMLConstants.Main.FORMAT_STYLE_ID, Integer.toString( _baseStyleId ) );
}
else {
final int numberFormatId;
if (_isDate)
if (_isTime)
numberFormatId = DEFAULT_DATETIME_NF;
else
numberFormatId = DEFAULT_DATE_NF;
else
numberFormatId = DEFAULT_TIME_NF;
style = new Style( _baseStyleId, NumberFormat.getPredefinedNumberFormat( numberFormatId ), true );
node.addAttribute( XMLConstants.Main.FORMAT_STYLE_ID, Integer.toString( _baseStyleId ) );
node.addAttribute( XMLConstants.Main.FORMAT_APPLY_NUMBER_FORMAT, XMLConstants.TRUE );
node.addAttribute( XMLConstants.Main.NUMBER_FORMAT_ID, Integer.toString( numberFormatId ) );
}
this.styles.add( style );
this.xmlCellXfs.add( node );
return this.xmlCellXfs.size() - 1;