B2022-053 Fix to finding and resolving all of the RO tokens in Word sections. Word is having a problem finding RO tokens when text in the same Word Table row contains a “<” used as the less than symbol.
This commit is contained in:
parent
58b1c04011
commit
4f987dc7fc
@ -1761,7 +1761,25 @@ namespace VEPROMS.CSLA.Library
|
||||
find.MatchWildcards = true;
|
||||
find.MatchSoundsLike = false;
|
||||
find.MatchAllWordForms = false;
|
||||
executeResult = find.Execute();
|
||||
// B2022-053 in a Barakah word attachment (ST procedure set procedure DG-5204) the RO tokens are not resolved after a certain
|
||||
// point in a table.
|
||||
// Turns out this happens when a table cell had text that begins with a "<" and it does not end with a ">" and there is no
|
||||
// space or other word following that text in the table cell. For example, there was a table cell who's text
|
||||
// was "<90" cause the Word Find command to return an entire table row which cause PROMS to stop processing
|
||||
// the rest of the Word attachment section.
|
||||
bool tryagain = false;
|
||||
do
|
||||
{
|
||||
tryagain = false;
|
||||
executeResult = find.Execute();
|
||||
// B2022-053 if the found text does not begin with a "<" and end with a ">", then
|
||||
// move past that text and try the Word Find function again.
|
||||
if (executeResult && !sel.Text.StartsWith("<") && !sel.Text.EndsWith(">"))
|
||||
{
|
||||
sel.MoveStart(LBWdUnits.wdCharacter, sel.Text.Length-1);
|
||||
tryagain = true;
|
||||
}
|
||||
} while (tryagain);
|
||||
if (!executeResult)
|
||||
return null;
|
||||
// B2019-123 Word 2019 returns true when find string was not found
|
||||
|
Loading…
x
Reference in New Issue
Block a user