/** * Returns the condition specification from the matcher, or <tt>null</tt> if * there is none. * * @param m The matcher for the format part. * * @return The condition specification or <tt>null</tt>. */ private CellFormatCondition GetCondition(Match m) { String mdesc = m.Groups[(CONDITION_OPERATOR_GROUP)].Value; if (mdesc == null || mdesc.Length == 0) { return(null); } return(CellFormatCondition.GetInstance(m.Groups[( CONDITION_OPERATOR_GROUP)].Value, m.Groups[(CONDITION_VALUE_GROUP)].Value)); }
/** * Create an object to represent a format part. * * @param desc The string to Parse. */ public CellFormatPart(String desc) { Match m = FORMAT_PAT.Match(desc); if (!m.Success) { throw new ArgumentException("Unrecognized format: " + "\"" + desc + "\""); } condition = GetCondition(m); type = GetCellFormatType(m); format = GetFormatter(m); }