F2019-065: Allow uppercase of high level steps to be defined in the format
This commit is contained in:
parent
7e09b365e0
commit
31a5978a90
Binary file not shown.
@ -270,6 +270,9 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted, bool underlineAfterDashSpace, E_EditPrintMode epMode)
|
private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted, bool underlineAfterDashSpace, E_EditPrintMode epMode)
|
||||||
{
|
{
|
||||||
int profileDepth = ProfileTimer.Push(">>>> CreateRtf");
|
int profileDepth = ProfileTimer.Push(">>>> CreateRtf");
|
||||||
|
// F2019-065: Upper case if step format has flag
|
||||||
|
if (_MyItemInfo != null && wordsShouldBeReplaced && _MyItemInfo.IsStep && _MyItemInfo.FormatStepData.UpperCase)
|
||||||
|
text = UpCaseStep(text);
|
||||||
// Adjust RO display
|
// Adjust RO display
|
||||||
if (ROsShouldBeAdjusted)
|
if (ROsShouldBeAdjusted)
|
||||||
{
|
{
|
||||||
@ -426,7 +429,27 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
// F2019-065: Upper case if step format has flag
|
||||||
|
private string UpCaseStep(string text)
|
||||||
|
{
|
||||||
|
// upper case all text except in links/symbols
|
||||||
|
RtfToDisplayTextElements(text);
|
||||||
|
StringBuilder sret = new StringBuilder();
|
||||||
|
foreach (displayTextElement vte in DisplayTextElementList)
|
||||||
|
{
|
||||||
|
if (vte.Type == E_TextElementType.Text)
|
||||||
|
sret.Append(vte.Text.ToUpper());
|
||||||
|
else if (vte.Type == E_TextElementType.Symbol)
|
||||||
|
sret.Append(vte.Text);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
displayLinkElement dle = vte as displayLinkElement;
|
||||||
|
sret.Append(dle.TextAndLink);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
string mdtxt = sret.ToString();
|
||||||
|
return mdtxt;
|
||||||
|
}
|
||||||
private string FixDiffUnitROReplaceWords(string text)
|
private string FixDiffUnitROReplaceWords(string text)
|
||||||
{
|
{
|
||||||
if (_MyFormat == null) return text;
|
if (_MyFormat == null) return text;
|
||||||
|
@ -5034,6 +5034,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _UnderlineAfterDashSpace, "@UnderlineAfterDashSpace");
|
return LazyLoad(ref _UnderlineAfterDashSpace, "@UnderlineAfterDashSpace");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// F2019-065: Allow uppercase of high level steps to be defined in the format
|
||||||
|
private LazyLoad<bool> _UpperCase;
|
||||||
|
public bool UpperCase
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _UpperCase, "@UpperCase");
|
||||||
|
}
|
||||||
|
}
|
||||||
private LazyLoad<bool> _SpaceIn;
|
private LazyLoad<bool> _SpaceIn;
|
||||||
public bool SpaceIn
|
public bool SpaceIn
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user