Replace a space with underline turned off after to a hard space with underline turned off after
Fixed B2014-086: Keystroke combinations in RTB should be not processed such as right align or center text.
This commit is contained in:
parent
ce33728734
commit
882c4eb7b9
@ -1816,6 +1816,21 @@ namespace Volian.Controls.Library
|
|||||||
if (e.Control)
|
if (e.Control)
|
||||||
{
|
{
|
||||||
IsControlChar = true;
|
IsControlChar = true;
|
||||||
|
if (e.Shift)
|
||||||
|
{
|
||||||
|
switch (e.KeyCode)
|
||||||
|
{
|
||||||
|
// The following keys are supported in underlying RTB (with ctrl+shift key),
|
||||||
|
// but PROMS should not do anything for that functionality:
|
||||||
|
case Keys.Add:
|
||||||
|
case Keys.Subtract:
|
||||||
|
case Keys.L:
|
||||||
|
e.Handled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
switch (e.KeyCode)
|
switch (e.KeyCode)
|
||||||
{
|
{
|
||||||
case Keys.X: //ctrl-X
|
case Keys.X: //ctrl-X
|
||||||
@ -1867,6 +1882,18 @@ namespace Volian.Controls.Library
|
|||||||
OnInsertPgBrk(this, new EventArgs());
|
OnInsertPgBrk(this, new EventArgs());
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
break;
|
break;
|
||||||
|
// The following keys are supported in underlying RTB (with ctrl key), but PROMS should not
|
||||||
|
// do anything for that functionality:
|
||||||
|
case Keys.R: // Right Align text
|
||||||
|
case Keys.L: // Left Align text
|
||||||
|
case Keys.E: // Center Align text
|
||||||
|
case Keys.D1: // Single space text (D1 is the '1' key)
|
||||||
|
case Keys.D2: // Double space text
|
||||||
|
case Keys.D5: // 1.5 space text
|
||||||
|
case Keys.H: // Find (proms uses Ctrl+F for find)
|
||||||
|
e.Handled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (((int)e.KeyCode) == 220) e.Handled = true;
|
if (((int)e.KeyCode) == 220) e.Handled = true;
|
||||||
|
@ -292,7 +292,14 @@ namespace Volian.Print.Library
|
|||||||
_StatRTB.Width = (int)w;
|
_StatRTB.Width = (int)w;
|
||||||
_StatRTB.Font = MyFlexGrid.Font;
|
_StatRTB.Font = MyFlexGrid.Font;
|
||||||
if (str.StartsWith(@"{\rtf"))
|
if (str.StartsWith(@"{\rtf"))
|
||||||
_StatRTB.Rtf = str.Replace(@"\~", @"\u160?");
|
// The 'Replace(@" \ulnone", @"\u160?\ulnone")' was added so that data in VEWCN SUR_WTC
|
||||||
|
// tables would print. There were a number of tables, for example in STN NB-106/8.1.6,
|
||||||
|
// that had a series of spaces underlined and these spaces were not underlined in the
|
||||||
|
// generated pdf. It seems that there is a problem somewhere in the rtb -> itextsharp
|
||||||
|
// level. This fixed the immediate problem. If there is 'b0' (bold off) after the
|
||||||
|
// space before the 'ulnone' the following won't work. Also, this change was not
|
||||||
|
// made in the non-table code. If the problem occurs there, it should be added.
|
||||||
|
_StatRTB.Rtf = str.Replace(@"\~", @"\u160?").Replace(@" \ulnone", @"\u160?\ulnone");
|
||||||
else
|
else
|
||||||
_StatRTB.Text = str;
|
_StatRTB.Text = str;
|
||||||
_StatRTB.SelectAll();
|
_StatRTB.SelectAll();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user