B2020-100 Wolf Creek (Carolee) reported issues with adding a hyphen in the middle of Table text that was bolded and underlined.
This commit is contained in:
parent
49bda264f9
commit
da6ecf841b
@ -1294,8 +1294,8 @@ namespace VEPROMS.CSLA.Library
|
||||
string token = m.Groups[1].Value;
|
||||
switch (token[1])
|
||||
{
|
||||
case '_':
|
||||
return token.Trim() ; // B2020-104 with .NET 4.8, a hard dash is represented as "\_" in the RTF
|
||||
case '_': // B2020-100 New Non-Breaking Hyphen
|
||||
return token.Trim();
|
||||
case '\\':
|
||||
return token;
|
||||
case 'u':
|
||||
|
@ -319,12 +319,14 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_RtfPrefix == null)
|
||||
{
|
||||
//B2020-100 RHM Use SelectionFont rather than the font from the format file.
|
||||
//if (_RtfPrefix == null)
|
||||
//{
|
||||
StringBuilder selectedRtfSB = new StringBuilder();
|
||||
AddFontTable(selectedRtfSB, FormatFont, FontIsFixed(FormatFont));
|
||||
//AddFontTable(selectedRtfSB, FormatFont, FontIsFixed(FormatFont));
|
||||
AddFontTable(selectedRtfSB, SelectionFont, FontIsFixed(FormatFont));
|
||||
_RtfPrefix = selectedRtfSB.ToString();
|
||||
}
|
||||
//}
|
||||
return _RtfPrefix + @"\f1\fs" + FormatFont.SizeInPoints * 2 + " ";
|
||||
}
|
||||
}
|
||||
@ -1317,10 +1319,12 @@ namespace Volian.Controls.Library
|
||||
int position = SelectionStart;
|
||||
SelectedRtf = RtfPrefixForSymbols + str + @"}";
|
||||
Select(position, 1);
|
||||
RTBAPI.SetFontStyle(this, fs);
|
||||
Select(position + 1, 0);
|
||||
if (FieldToEdit == E_FieldToEdit.StepText)
|
||||
{
|
||||
SelectionFont = MyItemInfo.GetItemFont().WindowsFont;
|
||||
RTBAPI.SetFontStyle(this, fs);// B2020-100 Keep the font style
|
||||
}
|
||||
else
|
||||
// if doing properties for folder, docversion, proc or sect, don't get item's font.
|
||||
SelectionFont = locfont;
|
||||
|
@ -904,7 +904,7 @@ public string Path
|
||||
}
|
||||
private iTextSharp.text.Paragraph RtfToParagraph(string rtf, iTextSharp.text.Font mySymFont,int r, int c)
|
||||
{
|
||||
rtf=FixRTFToPrint(rtf,r,c);
|
||||
rtf = FixRTFToPrint(rtf, r, c).Replace(@"\_", "-");//B2020-100 RHM Convert new form of non-breaking hyphen to hyphen
|
||||
IRtfDocument rtfDoc = RtfInterpreterTool.BuildDoc(rtf);
|
||||
Rtf2iTextSharp rtf2IText = new Rtf2iTextSharp(rtfDoc);
|
||||
rtf2IText.DefaultFont = mySymFont;
|
||||
|
Loading…
x
Reference in New Issue
Block a user