B2019-171: Use format flag to handle differences between formats for uppercasing of ROs
B2019-171: Add flag to handle differences between formats for uppercasing of ROs
This commit is contained in:
parent
4034ca8c18
commit
443162a944
@ -180,6 +180,19 @@ namespace VEPROMS.CSLA.Library
|
|||||||
@"\par\par\par ");
|
@"\par\par\par ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// B2018-041 this logic was moved to fix this bug, but it is needed to keep Braidwood print of Procedure ROs to remain consistent with how it was
|
||||||
|
// before the fix. Replace Hard Hyphens with normal hyphen so the PDF search for hyphens will work properly
|
||||||
|
// B2019-171: added a format flag, DoSpaceDashBeforeROResolve, so that this fix for B2018-041 would not affect Braidwood/Byron, RO's that were defined
|
||||||
|
// as Procedures should not have the text uppercased.
|
||||||
|
if (itemInfo.ActiveFormat.PlantFormat.FormatData.ROData.DoSpaceDashBeforeROResolve)
|
||||||
|
{
|
||||||
|
if (text.Contains(@"\u8209?") && epMode == E_EditPrintMode.Print)
|
||||||
|
{
|
||||||
|
// Handle RTF Tokens followed immediately by a hard hyphen
|
||||||
|
text = Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u8209\?", " -");
|
||||||
|
text = text.Replace(@"\u8209?", "-");
|
||||||
|
}
|
||||||
|
}
|
||||||
// Replace backslash symbol with normal backslash so the PDF search for backslashes will work properly
|
// Replace backslash symbol with normal backslash so the PDF search for backslashes will work properly
|
||||||
if (text.Contains(@"\u9586?") && epMode == E_EditPrintMode.Print)
|
if (text.Contains(@"\u9586?") && epMode == E_EditPrintMode.Print)
|
||||||
{
|
{
|
||||||
@ -278,18 +291,24 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
// B2018-041 moved this logic here from DisplayText() so the it does not defeat the Upcase RO's after Dash logic
|
// B2018-041 moved this logic here from DisplayText() so the it does not defeat the Upcase RO's after Dash logic
|
||||||
// Replace Hard Hyphens with normal hyphen so the PDF search for hyphens will work properly
|
// Replace Hard Hyphens with normal hyphen so the PDF search for hyphens will work properly
|
||||||
|
// B2019-171: added a format flag, DoSpaceDashBeforeROResolve, so that this fix for B2018-041 would not affect Braidwood/Byron, RO's that were defined
|
||||||
|
// as Procedures should not have the text uppercased.
|
||||||
|
if (_MyItemInfo == null || !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.ROData.DoSpaceDashBeforeROResolve)
|
||||||
|
{
|
||||||
if (text.Contains(@"\u8209?") && epMode == E_EditPrintMode.Print)
|
if (text.Contains(@"\u8209?") && epMode == E_EditPrintMode.Print)
|
||||||
{
|
{
|
||||||
// Handle RTF Tokens followed immediately by a hard hyphen
|
// Handle RTF Tokens followed immediately by a hard hyphen
|
||||||
text = Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u8209\?", " -");
|
text = Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u8209\?", " -");
|
||||||
text = text.Replace(@"\u8209?", "-");
|
text = text.Replace(@"\u8209?", "-");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// if in print mode, view mode, or non-active richtextbox do replace words. Only if in
|
// if in print mode, view mode, or non-active richtextbox do replace words. Only if in
|
||||||
// actual edit mode are replace words left as is.
|
// actual edit mode are replace words left as is.
|
||||||
// But don't do ReplaceWords if the TurnOffReplaceWords format flag is set
|
// But don't do ReplaceWords if the TurnOffReplaceWords format flag is set
|
||||||
if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords)
|
if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords)
|
||||||
{
|
{
|
||||||
int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2");
|
int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2");
|
||||||
|
|
||||||
text = DoReplaceWords2(text);
|
text = DoReplaceWords2(text);
|
||||||
ProfileTimer.Pop(profileDepth1);
|
ProfileTimer.Pop(profileDepth1);
|
||||||
}
|
}
|
||||||
|
@ -6830,6 +6830,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _CapFirstLetterInHighRO, "@CapFirstLetterInHighRO");
|
return LazyLoad(ref _CapFirstLetterInHighRO, "@CapFirstLetterInHighRO");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private LazyLoad<bool> _DoSpaceDashBeforeROResolve;
|
||||||
|
public bool DoSpaceDashBeforeROResolve
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _DoSpaceDashBeforeROResolve, "@DoSpaceDashBeforeROResolve");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user