AODL.Utils.ContentMocker.ConvertToCM C# (CSharp) Method

ConvertToCM() private method

private ConvertToCM ( string width ) : double
width string
return double
		private double ConvertToCM(string width)
		{
			try
			{
				bool isInch = SizeConverter.IsInch(width);
				NumberFormatInfo numberFormat = CultureInfo.InvariantCulture.NumberFormat;
				width = width.Replace(",", ".");
				double w = SizeConverter.GetDoubleFromAnOfficeSizeValue(width);
				if (isInch)
					w = SizeConverter.InchToCm(w);
				return w;
			}
			catch (System.FormatException e)
			{
				throw new ContentMockerException(string.Format(
					"Failed to convert {0} into decimal value", width),  e);
			}
		}