ReadWidth
(
ExcelTableReader.ExcelTableRow oRow,
EdgeWidthConverter oEdgeWidthConverter,
IEdge oEdge
)
{
Debug.Assert(oRow != null);
Debug.Assert(oEdgeWidthConverter != null);
AssertValid();
String sWidth;
if ( !oRow.TryGetNonEmptyStringFromCell(EdgeTableColumnNames.Width,
out sWidth) )
{
return;
}
Single fWidth;
if ( !Single.TryParse(sWidth, out fWidth) )
{
Range oInvalidCell = oRow.GetRangeForCell(
EdgeTableColumnNames.Width);
OnWorkbookFormatError( String.Format(
"The cell {0} contains an invalid width. The edge width,"
+ " which is optional, must be a number. Any number is"
+ " acceptable, although {1} is used for any number less than"
+ " {1} and {2} is used for any number greater than {2}."
,
ExcelUtil.GetRangeAddress(oInvalidCell),
EdgeWidthConverter.MinimumWidthWorkbook,
EdgeWidthConverter.MaximumWidthWorkbook
),
oInvalidCell
);
}
oEdge.SetValue(ReservedMetadataKeys.PerEdgeWidth,
oEdgeWidthConverter.WorkbookToGraph(fWidth) );
}