Package org.formulacompiler.spreadsheet.internal.excel.xlsx.loader

Examples of org.formulacompiler.spreadsheet.internal.excel.xlsx.loader.NumberFormat


    final int nfContext = getContext();
    StartElement se;
    while ((se = find( XMLConstants.Main.NUMBER_FORMAT, nfContext )) != null) {
      final String id = se.getAttributeByName( XMLConstants.Main.NUMBER_FORMAT_ID ).getValue();
      final String code = se.getAttributeByName( XMLConstants.Main.NUMBER_FORMAT_CODE ).getValue();
      formats.put( id, new NumberFormat( code ) );
    }

    return formats;
  }
View Full Code Here


  private static NumberFormat getNumberFormatCode( Map<String, NumberFormat> _numberFormats, Attribute _numberFormatId )
  {
    if (_numberFormatId == null)
      return null;
    if (_numberFormats != null) {
      final NumberFormat numberFormat = _numberFormats.get( _numberFormatId.getValue() );
      if (numberFormat != null)
        return numberFormat;
    }
    return NumberFormat.getPredefinedNumberFormat( _numberFormatId.getValue() );
  }
View Full Code Here

      final int baseStyleIdValue = baseStyleId == null ? DEFAULT_BASE_STYLE_ID : Integer.parseInt( baseStyleId.getValue() );
      final Style base = baseStyleId != null ? _baseStyles.get( baseStyleIdValue ) : null;

      final Attribute numberFormatId = se.getAttributeByName( XMLConstants.Main.NUMBER_FORMAT_ID );
      final Attribute applyNumberFormat = se.getAttributeByName( XMLConstants.Main.FORMAT_APPLY_NUMBER_FORMAT );
      final NumberFormat numberFormat = getNumberFormatCode( _numberFormats, numberFormatId );
      final Style style;
      if (base == null)
        style = new Style( 0, numberFormat,
            applyNumberFormat != null && getApplyNumberFormat( applyNumberFormat ) );
      else
View Full Code Here

TOP

Related Classes of org.formulacompiler.spreadsheet.internal.excel.xlsx.loader.NumberFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.