ReadLabelFontSize
(
ExcelTableReader.ExcelTableRow oRow,
FontSizeConverter oFontSizeConverter,
IEdge oEdge
)
{
Debug.Assert(oRow != null);
Debug.Assert(oFontSizeConverter != null);
AssertValid();
String sLabelFontSize;
if ( !oRow.TryGetNonEmptyStringFromCell(
EdgeTableColumnNames.LabelFontSize, out sLabelFontSize) )
{
return;
}
Single fLabelFontSize;
if ( !Single.TryParse(sLabelFontSize, out fLabelFontSize) )
{
Range oInvalidCell = oRow.GetRangeForCell(
EdgeTableColumnNames.LabelFontSize);
OnWorkbookFormatError( String.Format(
"The cell {0} contains an invalid label font size. The label"
+ " font size, 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),
FontSizeConverter.MinimumFontSizeWorkbook,
FontSizeConverter.MaximumFontSizeWorkbook
),
oInvalidCell
);
}
oEdge.SetValue(ReservedMetadataKeys.PerEdgeLabelFontSize,
oFontSizeConverter.WorkbookToGraph(fLabelFontSize) );
}