private uint FindAddBorder(CT_Border border) { //Find an existing border that matches this one, if not add a copy to the current source and update the reference. int findThis = border.ToString().GetHashCode(); uint index = 0; foreach (XSSFCellBorder existing in _stylesSource.GetBorders()) { if (findThis == existing.GetCTBorder().ToString().GetHashCode()) { return(index); } index++; } //404 border not found. Add it return((uint)_stylesSource.PutBorder(new XSSFCellBorder(border.Copy()))); }
public override int GetHashCode() { return(border.ToString().GetHashCode()); }