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;
|
string token = m.Groups[1].Value;
|
||||||
switch (token[1])
|
switch (token[1])
|
||||||
{
|
{
|
||||||
case '_':
|
case '_': // B2020-100 New Non-Breaking Hyphen
|
||||||
return token.Trim() ; // B2020-104 with .NET 4.8, a hard dash is represented as "\_" in the RTF
|
return token.Trim();
|
||||||
case '\\':
|
case '\\':
|
||||||
return token;
|
return token;
|
||||||
case 'u':
|
case 'u':
|
||||||
|
@ -319,12 +319,14 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_RtfPrefix == null)
|
//B2020-100 RHM Use SelectionFont rather than the font from the format file.
|
||||||
{
|
//if (_RtfPrefix == null)
|
||||||
|
//{
|
||||||
StringBuilder selectedRtfSB = new StringBuilder();
|
StringBuilder selectedRtfSB = new StringBuilder();
|
||||||
AddFontTable(selectedRtfSB, FormatFont, FontIsFixed(FormatFont));
|
//AddFontTable(selectedRtfSB, FormatFont, FontIsFixed(FormatFont));
|
||||||
|
AddFontTable(selectedRtfSB, SelectionFont, FontIsFixed(FormatFont));
|
||||||
_RtfPrefix = selectedRtfSB.ToString();
|
_RtfPrefix = selectedRtfSB.ToString();
|
||||||
}
|
//}
|
||||||
return _RtfPrefix + @"\f1\fs" + FormatFont.SizeInPoints * 2 + " ";
|
return _RtfPrefix + @"\f1\fs" + FormatFont.SizeInPoints * 2 + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1317,10 +1319,12 @@ namespace Volian.Controls.Library
|
|||||||
int position = SelectionStart;
|
int position = SelectionStart;
|
||||||
SelectedRtf = RtfPrefixForSymbols + str + @"}";
|
SelectedRtf = RtfPrefixForSymbols + str + @"}";
|
||||||
Select(position, 1);
|
Select(position, 1);
|
||||||
RTBAPI.SetFontStyle(this, fs);
|
|
||||||
Select(position + 1, 0);
|
Select(position + 1, 0);
|
||||||
if (FieldToEdit == E_FieldToEdit.StepText)
|
if (FieldToEdit == E_FieldToEdit.StepText)
|
||||||
|
{
|
||||||
SelectionFont = MyItemInfo.GetItemFont().WindowsFont;
|
SelectionFont = MyItemInfo.GetItemFont().WindowsFont;
|
||||||
|
RTBAPI.SetFontStyle(this, fs);// B2020-100 Keep the font style
|
||||||
|
}
|
||||||
else
|
else
|
||||||
// if doing properties for folder, docversion, proc or sect, don't get item's font.
|
// if doing properties for folder, docversion, proc or sect, don't get item's font.
|
||||||
SelectionFont = locfont;
|
SelectionFont = locfont;
|
||||||
|
@ -904,7 +904,7 @@ public string Path
|
|||||||
}
|
}
|
||||||
private iTextSharp.text.Paragraph RtfToParagraph(string rtf, iTextSharp.text.Font mySymFont,int r, int c)
|
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);
|
IRtfDocument rtfDoc = RtfInterpreterTool.BuildDoc(rtf);
|
||||||
Rtf2iTextSharp rtf2IText = new Rtf2iTextSharp(rtfDoc);
|
Rtf2iTextSharp rtf2IText = new Rtf2iTextSharp(rtfDoc);
|
||||||
rtf2IText.DefaultFont = mySymFont;
|
rtf2IText.DefaultFont = mySymFont;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user