public String toString() { if ( value instanceof Number ) { return String.valueOf( value ); } return FormulaUtil.quoteString( String.valueOf( value ) ); }
public String toString() { if (value instanceof Number) { return String.valueOf(value); } return FormulaUtil.quoteString(String.valueOf(value)); }
public static String quoteReference( final String reference ) { if ( reference == null ) { throw new NullPointerException(); } final char[] referenceChars = reference.toCharArray(); if ( isQuotingNeeded( referenceChars ) == false ) { return '[' + reference + ']'; } return '[' + quoteString( reference ) + ']'; }
public static String quoteReference(final String reference) { if (reference == null) { throw new NullPointerException(); } final char[] referenceChars = reference.toCharArray(); if (isQuotingNeeded(referenceChars) == false) { return '[' + reference + ']'; } return '[' + quoteString(reference) + ']'; }
return FormulaUtil.quoteString( formula.substring( 1 ) ); return FormulaUtil.quoteString( formula );
return FormulaUtil.quoteString(formula.substring(1)); return FormulaUtil.quoteString(formula);
/** * Returns the value contained in the editor. * * @return the value contained in the editor */ public Object getCellEditorValue() { final Object selectedItem = comboBox.getSelectedItem(); if ( "".equals( selectedItem ) || selectedItem == null ) { return null; } String text = String.valueOf( selectedItem ); if ( text.startsWith( "'" ) ) { text = "=" + FormulaUtil.quoteString( text.substring( 1 ) ); } if ( isFormulaFragment() ) { return FormulaUtil.createFormulaFromUIText( text ); } return text; }
return new TypeValuePair( TextType.TYPE, HtmlCharacterEntities.getEntityParser().encodeEntities( textResult ) ); } else if ( encodingResult.equals( "formula-string" ) ) { return new TypeValuePair( TextType.TYPE, FormulaUtil.quoteString( textResult ) ); } else if ( encodingResult.equals( "formula-reference" ) ) { return new TypeValuePair( TextType.TYPE, FormulaUtil.quoteReference( textResult ) );