Added symbols for Trade Mark, Service Mark, Infinity, Proportional To, Ohm sign, Not Equal To, Copyright, Registered sign

Added logic to handle the Trade Mark symbol – RTF is automatically converting the Unicode to \’99 but PROMS StepRTB would not display it
This function was moved to CSLA Extension.  Commented out the code here, built without errors.  Remove this file from the SVG Library project.
This commit is contained in:
John Jenko 2016-06-22 13:14:32 +00:00
parent 1fb6bb2555
commit 3275c1f446
4 changed files with 633 additions and 615 deletions

Binary file not shown.

View File

@ -332,6 +332,9 @@ namespace VEPROMS.CSLA.Library
// as a precaution, convert any \~ to \u160?. This is for Hard spaces. see the commentary in the
// save portion of this code for an explanation.
text = text.Replace(@"\~", @"\u160?");
// convert \'99 to \u8482? this is for the trade mark symbol. For some reason RTF is automatically
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) do not show it
text = text.Replace(@"\'99", @"\u8482?");
text = text.Replace("\r\n", @"\line "); // replace a \r\n with a \line instead of a \par
text = text.Replace(@"\line", @"\pard\line");
text = text.Replace(@"\pard\pard\line", @"\pard\line");
@ -1146,6 +1149,9 @@ namespace VEPROMS.CSLA.Library
// SO, on the way out, convert any \~ to \u160?
string noExtraRtfStr = text.Replace(@"\~", @"\u160?");
noExtraRtfStr = noExtraRtfStr.Replace(@"\'a0", @"\u160?");
// convert \'99 to \u8482? this is for the trade mark symbol. For some reason RTF is automatically
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) do not show it
noExtraRtfStr = noExtraRtfStr.Replace(@"\'99", @"\u8482?");
// Check for two links in a row & if found, add separating rtf comment
// commands (these get removed in the richtextbox:
@ -1310,6 +1316,9 @@ namespace VEPROMS.CSLA.Library
// i.e. no longer a hardspace, and actually is converted to a regular space.
// SO, on the way out, convert any \~ to \u160?
retval = retval.Replace(@"\~", @"\u160?");
// convert \'99 to \u8482? this is for the trade mark symbol. For some reason RTF is automatically
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) do not show it
retval = retval.Replace(@"\'99", @"\u8482?");
// remove carriage return/newlines after \par commands (these are introduced by rtb
// for hard returns, goes into rtb as \par and comes out as \par\r\n):

View File

@ -1226,7 +1226,11 @@ namespace Volian.Controls.Library
e.Style.BackColor = solid;
// check whether the cell contains RTF
string rtfText = this.GetDataDisplay(e.Row, e.Col).Replace(@"\~", @"\u160?");
// convert \'99 to \u8482? this is for the trade mark symbol. For some reason RTF is automatically
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) do not show it
// Also convert \~ to a hard spece. Again RTF is automatically converting \u160? to \~ but will then convert
// the \~ to a regular space!
string rtfText = this.GetDataDisplay(e.Row, e.Col).Replace(@"\~", @"\u160?").Replace(@"\'99", @"\u8482?");
GridItem gi = Parent as GridItem;
if (gi != null)
{
@ -4625,8 +4629,12 @@ namespace Volian.Controls.Library
else if (_owner[row, col] != null)
{
string tmp = _owner[row, col].ToString();
// convert \'99 to \u8482? this is for the trade mark symbol. For some reason RTF is automatically
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) do not show it
// Also convert \~ to a hard spece. Again RTF is automatically converting \u160? to \~ but will then convert
// the \~ to a regular space!
if (tmp.StartsWith(@"{\rtf"))
Rtf = tmp.Replace(@"\~",@"\u160?");
Rtf = tmp.Replace(@"\~", @"\u160?").Replace(@"\'99", @"\u8482?");
else
Text = tmp;
}

File diff suppressed because it is too large Load Diff