This commit is contained in:
@@ -667,7 +667,7 @@ namespace VEPROMS.CSLA.Library
|
||||
string roid = lookup.GetROIDByAccPagID(sel.Text, spPrefix, igPrefix);
|
||||
if (roid != null)
|
||||
{
|
||||
string roidkey = string.Format("{0}:{1}",rofst.RODbID, roid);
|
||||
string roidkey = string.Format("{0}:{1}", rofst.RODbID, roid);
|
||||
if (!roids.Contains(roidkey))
|
||||
roids.Add(roidkey);
|
||||
}
|
||||
@@ -998,26 +998,44 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private static LBSelection FindRO()
|
||||
{
|
||||
LBSelection sel = MyApp.Selection;
|
||||
LBFind find = sel.Find;
|
||||
find.ClearFormatting();
|
||||
// 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
|
||||
// Special button to see the definitions of the various wildcards
|
||||
// [<] - Less-Than Character
|
||||
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
||||
// - Dash
|
||||
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
||||
// [>] - Greater-Than Character
|
||||
find.Text = "[<][!<> ]@-[!<> ]@[>]";
|
||||
//find.Wrap = LBWdFindWrap.wdFindStop;
|
||||
find.Wrap = LBWdFindWrap.wdFindContinue;
|
||||
find.MatchCase = false;
|
||||
find.MatchWholeWord = false;
|
||||
find.MatchWildcards = true;
|
||||
find.MatchSoundsLike = false;
|
||||
find.MatchAllWordForms = false;
|
||||
if (find.Execute()) return sel;
|
||||
int firstStart = 0;
|
||||
bool executeResult = false;
|
||||
LBSelection sel = null;
|
||||
while (!executeResult)
|
||||
{
|
||||
sel = MyApp.Selection;
|
||||
LBFind find = sel.Find;
|
||||
find.ClearFormatting();
|
||||
// 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
|
||||
// Special button to see the definitions of the various wildcards
|
||||
// [<] - Less-Than Character
|
||||
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
||||
// - Dash
|
||||
// [!<> ]@ - 1 or more characters not including Less-Than, Greater-Than or Space
|
||||
// [>] - Greater-Than Character
|
||||
find.Text = "[<][!<> ]@-[!<> ]@[>]";
|
||||
find.Wrap = LBWdFindWrap.wdFindContinue;
|
||||
find.MatchCase = false;
|
||||
find.MatchWholeWord = false;
|
||||
find.MatchWildcards = true;
|
||||
find.MatchSoundsLike = false;
|
||||
find.MatchAllWordForms = false;
|
||||
executeResult = find.Execute();
|
||||
// MS Word found 'invalid' ro when text had "[335.0<T<335.6<EFBFBD>C]" (not sure what problem was).
|
||||
// When this occurred, the selection was found, but it's end = 0, so move 1 char past it.
|
||||
// Also, need to simulate a loop by saving first position and if loop back to first position,
|
||||
// we are done with the search.
|
||||
if (sel.End == 0)
|
||||
{
|
||||
if (firstStart == sel.Start) return null;
|
||||
if (firstStart == 0)
|
||||
firstStart = sel.Start;
|
||||
sel.MoveStart(LBWdUnits.wdCharacter, 1);
|
||||
executeResult = false;
|
||||
}
|
||||
}
|
||||
if (executeResult) return sel;
|
||||
return null;
|
||||
}
|
||||
private static string CreatePDF(string fileName, bool openPdf)
|
||||
|
Reference in New Issue
Block a user