I'm finding that when converting to ODT, hyperlinks do not acquire the font styles that I apply. Below is the code:
DocumentBuilder builder = new DocumentBuilder(_toDoc);
builder.MoveTo(par);
if (run.getStyleBool(vuObj.Styles.FONTBOLD))
builder.Font.Bold = true;
if (run.getStyleBool(vuObj.Styles.FONTITALIC))
builder.Font.Italic = true;
if (run.getStyleBool(vuObj.Styles.FONTSTRIKETHROUGH))
builder.Font.StrikeThrough = true;
int color = run.getStyleInt(vuObj.Styles.FONTCOLOR);
if (color != 0 && color != vuObj.Styles.COLOR_NONE)
builder.Font.Color = Color.FromArgb(0xff, Color.FromArgb(color));
if (run.getStyleInt(vuObj.Styles.FONTBGCOLOR) != vuObj.Styles.COLOR_NONE)
{
int bgColor = run.getStyleInt(vuObj.Styles.FONTBGCOLOR);
if (bgColor != vuObj.Styles.COLOR_NONE)
builder.Font.HighlightColor = Color.FromArgb(0xff, Color.FromArgb(bgColor));
}
string fontName = mapFontName(run.getStyleString(vuObj.Styles.FONTID));
builder.Font.Name = fontName;
builder.Font.Size = HIPSToPoints(run.getStyleInt(vuObj.Styles.FONTSIZE));
builder.Font.Underline = Underline.Single; // just for hlinks
builder.InsertHyperlink(text, hLinkUrl, false);
Regards,
Steve