|
|
|
|
|
|
|
|
tblBorderType.SetAttributeValue(XName.Get("space", DocX.w.NamespaceName), (border.Space).ToString());
|
|
|
tblBorderType.SetAttributeValue(XName.Get("space", DocX.w.NamespaceName), (border.Space).ToString());
|
|
|
|
|
|
|
|
|
// The color attribute is used for the border color
|
|
|
// The color attribute is used for the border color
|
|
|
tblBorderType.SetAttributeValue(XName.Get("color", DocX.w.NamespaceName), ColorTranslator.ToHtml(border.Color));
|
|
|
|
|
|
|
|
|
tblBorderType.SetAttributeValue(XName.Get("color", DocX.w.NamespaceName), border.Color.ToHex());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If color is not a Color, something is wrong with this attributes value, so remove it
|
|
|
// If color is not a Color, something is wrong with this attributes value, so remove it
|
|
|
try
|
|
|
try
|
|
|
{
|
|
|
{
|
|
|
b.Color = ColorTranslator.FromHtml(color.Value);
|
|
|
|
|
|
|
|
|
b.Color = ColorTranslator.FromHtml(string.Format("#{0}", color.Value));
|
|
|
}
|
|
|
}
|
|
|
catch
|
|
|
catch
|
|
|
{
|
|
|
{
|
|
|
|
|
|
|
|
|
tcBorderType.SetAttributeValue(XName.Get("space", DocX.w.NamespaceName), (border.Space).ToString());
|
|
|
tcBorderType.SetAttributeValue(XName.Get("space", DocX.w.NamespaceName), (border.Space).ToString());
|
|
|
|
|
|
|
|
|
// The color attribute is used for the border color
|
|
|
// The color attribute is used for the border color
|
|
|
tcBorderType.SetAttributeValue(XName.Get("color", DocX.w.NamespaceName), ColorTranslator.ToHtml(border.Color));
|
|
|
|
|
|
|
|
|
tcBorderType.SetAttributeValue(XName.Get("color", DocX.w.NamespaceName), border.Color.ToHex());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If color is not a Color, something is wrong with this attributes value, so remove it
|
|
|
// If color is not a Color, something is wrong with this attributes value, so remove it
|
|
|
try
|
|
|
try
|
|
|
{
|
|
|
{
|
|
|
b.Color = ColorTranslator.FromHtml(color.Value);
|
|
|
|
|
|
|
|
|
b.Color = ColorTranslator.FromHtml(string.Format("#{0}", color.Value));
|
|
|
}
|
|
|
}
|
|
|
catch
|
|
|
catch
|
|
|
{
|
|
|
{
|