From 978ca389930bd09f128a6667cf422047313982fa Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 27 Nov 2012 15:12:32 +0000 Subject: [PATCH] =?UTF-8?q?needed=20an=20empty=20replace=20words=20list=20?= =?UTF-8?q?=E2=80=93=20don=E2=80=99t=20inherit=20from=20parent=20(if=20nul?= =?UTF-8?q?l,=20was=20inheriting=20from=20parent)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/DisplayText.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index f3b691f2..580ab014 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -1445,6 +1445,10 @@ namespace Volian.Controls.Library // Exclude Link Text from Replace Word process myMatches.AddLink(regFindLink, _MyFormat.PlantFormat.FormatData.SectData.ReplaceWordsInROs, _MyItemInfo.MyProcedure.MyDocVersion); 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 foreach (ReplaceStr rs in rsl) {