B2026-070 –Barakah Word Section with less than sign

This commit is contained in:
2026-08-04 07:57:01 -04:00
parent 478d35890d
commit 6c2eee0cbc
@@ -1258,7 +1258,7 @@ namespace VEPROMS.CSLA.Library
int lastStart = sel == null ? 0 : sel.Start; int lastStart = sel == null ? 0 : sel.Start;
while (sel != null) while (sel != null)
{ {
if (!string.IsNullOrEmpty(sel.Text)) if (!string.IsNullOrEmpty(sel.Text))
{ {
@@ -1438,7 +1438,7 @@ namespace VEPROMS.CSLA.Library
lastStart = sel.Start; lastStart = sel.Start;
sel = FindRO(); sel = FindRO();
if (sel != null && !string.IsNullOrEmpty(sel.Text) && sel.Start == lastStart) if (sel != null && !string.IsNullOrEmpty(sel.Text) && sel.Start == lastStart)
{ {
@@ -2124,22 +2124,22 @@ namespace VEPROMS.CSLA.Library
bool executeResult = false; bool executeResult = false;
LBSelection sel = null; LBSelection sel = null;
while (!executeResult) while (!executeResult)
{ {
sel = MyApp.Selection; sel = MyApp.Selection;
LBFind find = sel.Find; LBFind find = sel.Find;
find.ClearFormatting(); find.ClearFormatting();
// Search string format - this is MSWord wildcard format // Search string format - this is MSWord wildcard format
// If you do a search in MSWord, make sure wildcard box is checked and then press the // If you do a search in MSWord, make sure wildcard box is checked and then press the
// Special button to see the definitions of the various wildcards // Special button to see the definitions of the various wildcards
// [<] - Less-Than Character // [<] - Less-Than Character
// [!<> -]@ - 1 or more characters not including Less-Than, Greater-Than, Dash or Space // [!<> -]@ - 1 or more characters not including Less-Than, Greater-Than, Dash or Space
// - Dash // - Dash
// [!<>]@ - 1 or more characters not including Less-Than, Greater-Than. // [!<>]@ - 1 or more characters not including Less-Than, Greater-Than.
// a space be included as part of the accessory page id (Callaway, EOP Addendum 37) // a space be included as part of the accessory page id (Callaway, EOP Addendum 37)
// [>] - Greater-Than Character // [>] - Greater-Than Character
find.Text = "[<][!<> -]@-[!<>]@[>]"; find.Text = "[<][!<> -]@-[!<>]@[>]";
find.Wrap = LBWdFindWrap.wdFindContinue; find.Wrap = LBWdFindWrap.wdFindContinue;
find.MatchCase = false; find.MatchCase = false;
find.MatchWholeWord = false; find.MatchWholeWord = false;
@@ -2159,14 +2159,18 @@ namespace VEPROMS.CSLA.Library
{ {
tryagain = false; tryagain = false;
executeResult = find.Execute(); executeResult = find.Execute();
// B2022-053 if the found text does not begin with a "<" and end with a ">", then // 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. // move past that text and try the Word Find function again.
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections // B2022-088: [JPR] Find Doc Ro button not working in Word Sections
// B2022-098: [JPR] ROs not being resolved in Word Sections // B2022-098: [JPR] ROs not being resolved in Word Sections
// B2026-070: When there is a less-then sign (<) followed by a numeric value in a Word attachment (inside of a table), PROMS thinks the user put in an RO token will generate an RO not found error in the following table row who's text contains <U-Name>.
if (executeResult && !string.IsNullOrEmpty(sel.Text) && !sel.Text.StartsWith("<") && !sel.Text.EndsWith(">")) if (executeResult && !string.IsNullOrEmpty(sel.Text) && !sel.Text.StartsWith("<") && !sel.Text.EndsWith(">"))
{ {
sel.MoveStart(LBWdUnits.wdCharacter, sel.Text.Length - 1); int location = sel.Start + sel.Text.Length - 1; //do not do this inline - this needs captured before WholeStory
tryagain = true;
sel.WholeStory();
sel.MoveStart(LBWdUnits.wdCharacter, location);
tryagain = true;
} }
} while (tryagain); } while (tryagain);
@@ -2191,7 +2195,7 @@ namespace VEPROMS.CSLA.Library
sel.MoveStart(LBWdUnits.wdCharacter, 1); sel.MoveStart(LBWdUnits.wdCharacter, 1);
executeResult = false; executeResult = false;
} }
} }
if (executeResult) return sel; if (executeResult) return sel;