needed an empty replace words list – don’t inherit from parent (if null, was inheriting from parent)
This commit is contained in:
parent
ac46422ffe
commit
978ca38993
@ -1445,6 +1445,10 @@ namespace Volian.Controls.Library
|
|||||||
// Exclude Link Text from Replace Word process
|
// Exclude Link Text from Replace Word process
|
||||||
myMatches.AddLink(regFindLink, _MyFormat.PlantFormat.FormatData.SectData.ReplaceWordsInROs, _MyItemInfo.MyProcedure.MyDocVersion);
|
myMatches.AddLink(regFindLink, _MyFormat.PlantFormat.FormatData.SectData.ReplaceWordsInROs, _MyItemInfo.MyProcedure.MyDocVersion);
|
||||||
ReplaceStrList rsl = _MyFormat.PlantFormat.FormatData.SectData.ReplaceStrList;
|
ReplaceStrList rsl = _MyFormat.PlantFormat.FormatData.SectData.ReplaceStrList;
|
||||||
|
|
||||||
|
// The only way to get an 'empty' list is to have one 'dummy' replacestr, i.e. that has ReplaceWord as an empty string. If the
|
||||||
|
// ReplaceStrData xml node is empty, it does the inheritance and gets the 'base' format's list.
|
||||||
|
if (rsl.Count==1 && (rsl[0].ReplaceWord == null || rsl[0].ReplaceWord == "")) return Text;
|
||||||
// Loop through text looking for words to be replaced
|
// Loop through text looking for words to be replaced
|
||||||
foreach (ReplaceStr rs in rsl)
|
foreach (ReplaceStr rs in rsl)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user