C2019-043 convert “->” to the right arrow symbol and “<-“ to the left arrow symbol in RO return values if the UseDashGreaterLessThenForArrowsInROValue format flag is set
This commit is contained in:
parent
5bac79bf8e
commit
8aad90ad87
@ -967,9 +967,21 @@ namespace Volian.Controls.Library
|
||||
// SelectionLength = 0;
|
||||
// //OnModeChange(this, new StepRTBModeChangeEventArgs(ViewRTB?E_ViewMode.View:E_ViewMode.Edit));
|
||||
//}
|
||||
public string InsertSymbolInRO(string val)
|
||||
{
|
||||
string retval = val;
|
||||
// C2019-043 convert a "->" to the Right Arrow symbol and a "<-" to the Left Arrow Symbol
|
||||
// note that at the dash character gets convert to a non-breaking hyphen "\u8209?"
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseDashGreaterLessThenForArrowsInROValue)
|
||||
{
|
||||
retval = retval.Replace("\\u8209?>", GetAddSymbolTextForROs(@"\u8594?")); // Right Arrow
|
||||
retval = retval.Replace("<\\u8209?", GetAddSymbolTextForROs(@"\u8592?")); // Left Arrow
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
public void InsertRO(string value, string link)
|
||||
{
|
||||
AddRtfLink(value, link);
|
||||
AddRtfLink(InsertSymbolInRO(value), link);
|
||||
}
|
||||
public void InsertTran(string value, string link)
|
||||
{
|
||||
@ -1318,6 +1330,10 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
return (@"{\f1\fs" + this.Font.SizeInPoints * 2 + @" " + symtxt + @"}"); // B2016-281 fixed font selection when inserting a symbol character
|
||||
}
|
||||
private string GetAddSymbolTextForROs(string symtxt)
|
||||
{
|
||||
return (@"\f1\fs" + this.Font.SizeInPoints * 2 + @" " + symtxt); //C2019-043 Don't need curly braces when used in RO return value
|
||||
}
|
||||
public void AddRtfLink(string linkUrl, string linkValue)
|
||||
{
|
||||
if (CreateParams.ClassName == "RICHEDIT50W")
|
||||
|
Loading…
x
Reference in New Issue
Block a user